├── .gitignore ├── CMakeLists.txt ├── LICENSE ├── README.md ├── atp ├── AtpCommon.h.in ├── CMakeLists.txt ├── share │ └── atp │ │ ├── atpConfig.json │ │ ├── crossCorrConfig.json │ │ ├── descriptorConfig.json │ │ ├── nasaConfig.json │ │ └── testConfig.json ├── src │ ├── AtpAnnotatedImage.cpp │ ├── AtpAnnotatedImage.h │ ├── AtpConfig.cpp │ ├── AtpConfig.h │ ├── AtpGenerator.cpp │ ├── AtpGenerator.h │ ├── AtpOpenCV.cpp │ ├── AtpOpenCV.h │ ├── AtpTileSource.cpp │ ├── AtpTileSource.h │ ├── AutoTiePoint.cpp │ ├── AutoTiePoint.h │ ├── CMakeLists.txt │ ├── MatchPoint.h │ ├── ossimAtpPluginInit.cpp │ ├── ossimAtpTool.cpp │ ├── ossimAtpTool.h │ ├── ossimAtpToolFactory.cpp │ ├── ossimAtpToolFactory.h │ ├── ossimCorrelationSource.cpp │ ├── ossimCorrelationSource.h │ ├── ossimDescriptorSource.cpp │ └── ossimDescriptorSource.h └── test │ ├── CMakeLists.txt │ ├── atp-config-test.cpp │ ├── atp-pax-test.cpp │ ├── atp-residuals.cpp │ ├── atp-test.cpp │ └── data │ ├── atp-algorithms.json │ ├── atp-generate.json │ └── atp-params.json ├── aws ├── CMakeLists.txt ├── README.md └── src │ ├── CMakeLists.txt │ ├── S3HeaderCache.cpp │ ├── S3HeaderCache.h │ ├── S3StreamDefaults.cpp │ ├── S3StreamDefaults.h │ ├── ossimAwsPluginInit.cpp │ ├── ossimAwsStreamFactory.cpp │ ├── ossimAwsStreamFactory.h │ ├── ossimS3IStream.h │ ├── ossimS3StreamBuffer.cpp │ └── ossimS3StreamBuffer.h ├── cnes ├── CMakeLists.txt ├── README.md ├── src │ ├── AlosPalsar │ │ ├── AlosPalsarData.cpp │ │ ├── AlosPalsarData.h │ │ ├── AlosPalsarDataFileDescriptor.cpp │ │ ├── AlosPalsarDataFileDescriptor.h │ │ ├── AlosPalsarDataSetSummary.cpp │ │ ├── AlosPalsarDataSetSummary.h │ │ ├── AlosPalsarFacilityData.cpp │ │ ├── AlosPalsarFacilityData.h │ │ ├── AlosPalsarFileDescriptor.cpp │ │ ├── AlosPalsarFileDescriptor.h │ │ ├── AlosPalsarLeader.cpp │ │ ├── AlosPalsarLeader.h │ │ ├── AlosPalsarLeaderFactory.cpp │ │ ├── AlosPalsarLeaderFactory.h │ │ ├── AlosPalsarMapProjectionData.cpp │ │ ├── AlosPalsarMapProjectionData.h │ │ ├── AlosPalsarPlatformPositionData.cpp │ │ ├── AlosPalsarPlatformPositionData.h │ │ ├── AlosPalsarPositionVectorRecord.cpp │ │ ├── AlosPalsarPositionVectorRecord.h │ │ ├── AlosPalsarRadiometricData.cpp │ │ ├── AlosPalsarRadiometricData.h │ │ ├── AlosPalsarRecord.cpp │ │ ├── AlosPalsarRecord.h │ │ ├── AlosPalsarRecordFactory.cpp │ │ ├── AlosPalsarRecordFactory.h │ │ ├── AlosPalsarRecordHeader.cpp │ │ ├── AlosPalsarRecordHeader.h │ │ ├── AlosPalsarSignalData.cpp │ │ └── AlosPalsarSignalData.h │ ├── CMakeLists.txt │ ├── EnvisatAsar │ │ ├── AntennaElevationPatterns.cpp │ │ ├── AntennaElevationPatterns.h │ │ ├── ChirpParameters.cpp │ │ ├── ChirpParameters.h │ │ ├── DopplerCentroidParameters.cpp │ │ ├── DopplerCentroidParameters.h │ │ ├── EnvisatAsarData.cpp │ │ ├── EnvisatAsarData.h │ │ ├── EnvisatAsarDataFactory.cpp │ │ ├── EnvisatAsarDataFactory.h │ │ ├── EnvisatAsarRecord.cpp │ │ ├── EnvisatAsarRecord.h │ │ ├── EnvisatAsarRecordFactory.cpp │ │ ├── EnvisatAsarRecordFactory.h │ │ ├── GeolocationGrid.cpp │ │ ├── GeolocationGrid.h │ │ ├── MainProcessingParameters.cpp │ │ ├── MainProcessingParameters.h │ │ ├── SQ_ADSR.cpp │ │ ├── SQ_ADSR.h │ │ ├── SRGRConversionParameters.cpp │ │ ├── SRGRConversionParameters.h │ │ ├── dsd.cpp │ │ ├── dsd.h │ │ ├── mph.cpp │ │ ├── mph.h │ │ ├── sph.cpp │ │ └── sph.h │ ├── RadarSat │ │ ├── CommonRecord │ │ │ ├── AttitudeData.cpp │ │ │ ├── AttitudeData.h │ │ │ ├── BeamInformationRecord.cpp │ │ │ ├── BeamInformationRecord.h │ │ │ ├── BeamPixelCountRecord.cpp │ │ │ ├── BeamPixelCountRecord.h │ │ │ ├── CompensationDataRecord.cpp │ │ │ ├── CompensationDataRecord.h │ │ │ ├── DataHistogramRecord.cpp │ │ │ ├── DataHistogramRecord.h │ │ │ ├── DataHistogramSignalData.cpp │ │ │ ├── DataHistogramSignalData.h │ │ │ ├── DataPointDataRecord.cpp │ │ │ ├── DataPointDataRecord.h │ │ │ ├── DataQuality.cpp │ │ │ ├── DataQuality.h │ │ │ ├── DataSetSummary.cpp │ │ │ ├── DataSetSummary.h │ │ │ ├── DopplerCentroidEstimateRecord.cpp │ │ │ ├── DopplerCentroidEstimateRecord.h │ │ │ ├── FileDescriptor.cpp │ │ │ ├── FileDescriptor.h │ │ │ ├── MisregistrationRecord.cpp │ │ │ ├── MisregistrationRecord.h │ │ │ ├── ProcessingParameters.cpp │ │ │ ├── ProcessingParameters.h │ │ │ ├── RadiometricCompensationData.cpp │ │ │ ├── RadiometricCompensationData.h │ │ │ ├── RadiometricData.cpp │ │ │ ├── RadiometricData.h │ │ │ ├── RadiometryUncertaintyRecord.cpp │ │ │ ├── RadiometryUncertaintyRecord.h │ │ │ ├── SRGRCoefficientSetRecord.cpp │ │ │ ├── SRGRCoefficientSetRecord.h │ │ │ ├── TemperatureSettingsRecord.cpp │ │ │ └── TemperatureSettingsRecord.h │ │ ├── Data │ │ │ ├── Data.cpp │ │ │ ├── Data.h │ │ │ ├── DataFactory.cpp │ │ │ ├── DataFactory.h │ │ │ ├── ImageOptionsFileDescriptor.cpp │ │ │ ├── ImageOptionsFileDescriptor.h │ │ │ ├── ProcessedDataRecord.cpp │ │ │ └── ProcessedDataRecord.h │ │ ├── Leader │ │ │ ├── DataHistogramProcessedData.cpp │ │ │ ├── DataHistogramProcessedData.h │ │ │ ├── Leader.cpp │ │ │ ├── Leader.h │ │ │ ├── LeaderFactory.cpp │ │ │ ├── LeaderFactory.h │ │ │ ├── PlatformPositionData.cpp │ │ │ ├── PlatformPositionData.h │ │ │ ├── PositionVectorRecord.cpp │ │ │ └── PositionVectorRecord.h │ │ ├── RadarSatRecord.cpp │ │ ├── RadarSatRecord.h │ │ ├── RadarSatRecordFactory.cpp │ │ ├── RadarSatRecordFactory.h │ │ ├── RadarSatRecordHeader.cpp │ │ ├── RadarSatRecordHeader.h │ │ ├── Trailer │ │ │ ├── Trailer.cpp │ │ │ ├── Trailer.h │ │ │ ├── TrailerFactory.cpp │ │ │ └── TrailerFactory.h │ │ └── VolumeDir │ │ │ ├── FilePointerRecord.cpp │ │ │ ├── FilePointerRecord.h │ │ │ ├── TextRecord.cpp │ │ │ ├── TextRecord.h │ │ │ ├── VolumeDescriptorRecord.cpp │ │ │ ├── VolumeDescriptorRecord.h │ │ │ ├── VolumeDir.cpp │ │ │ ├── VolumeDir.h │ │ │ ├── VolumeDirFactory.cpp │ │ │ └── VolumeDirFactory.h │ ├── erssar │ │ ├── ErsSarDataSetSummary.cpp │ │ ├── ErsSarDataSetSummary.h │ │ ├── ErsSarFacilityData.cpp │ │ ├── ErsSarFacilityData.h │ │ ├── ErsSarFileDescriptor.cpp │ │ ├── ErsSarFileDescriptor.h │ │ ├── ErsSarLeader.cpp │ │ ├── ErsSarLeader.h │ │ ├── ErsSarLeaderFactory.cpp │ │ ├── ErsSarLeaderFactory.h │ │ ├── ErsSarMapProjectionData.cpp │ │ ├── ErsSarMapProjectionData.h │ │ ├── ErsSarPlatformPositionData.cpp │ │ ├── ErsSarPlatformPositionData.h │ │ ├── ErsSarPositionVectorRecord.cpp │ │ ├── ErsSarPositionVectorRecord.h │ │ ├── ErsSarRecord.cpp │ │ ├── ErsSarRecord.h │ │ ├── ErsSarRecordFactory.cpp │ │ ├── ErsSarRecordFactory.h │ │ ├── ErsSarRecordHeader.cpp │ │ └── ErsSarRecordHeader.h │ ├── ossimAlosPalsarModel.cpp │ ├── ossimAlosPalsarModel.h │ ├── ossimCosmoSkymedModel.cpp │ ├── ossimCosmoSkymedModel.h │ ├── ossimEnvisatAsarModel.cpp │ ├── ossimEnvisatAsarModel.h │ ├── ossimErsSarModel.cpp │ ├── ossimErsSarModel.h │ ├── ossimFormosatDimapSupportData.cpp │ ├── ossimFormosatDimapSupportData.h │ ├── ossimFormosatModel.cpp │ ├── ossimFormosatModel.h │ ├── ossimGeometricSarSensorModel.cpp │ ├── ossimGeometricSarSensorModel.h │ ├── ossimPleiadesDimapSupportData.cpp │ ├── ossimPleiadesDimapSupportData.h │ ├── ossimPleiadesModel.cpp │ ├── ossimPleiadesModel.h │ ├── ossimPluginCommon.cpp │ ├── ossimPluginCommon.h │ ├── ossimPluginInit.cpp │ ├── ossimPluginProjectionFactory.cpp │ ├── ossimPluginProjectionFactory.h │ ├── ossimPluginReaderFactory.cpp │ ├── ossimPluginReaderFactory.h │ ├── ossimRadarSat2Model.cpp │ ├── ossimRadarSat2Model.h │ ├── ossimRadarSat2ProductDoc.cpp │ ├── ossimRadarSat2ProductDoc.h │ ├── ossimRadarSat2RPCModel.cpp │ ├── ossimRadarSat2RPCModel.h │ ├── ossimRadarSat2TiffReader.cpp │ ├── ossimRadarSat2TiffReader.h │ ├── ossimRadarSatModel.cpp │ ├── ossimRadarSatModel.h │ ├── ossimSpot6DimapSupportData.cpp │ ├── ossimSpot6DimapSupportData.h │ ├── ossimSpot6Model.cpp │ ├── ossimSpot6Model.h │ ├── ossimTerraSarModel.cpp │ ├── ossimTerraSarModel.h │ ├── ossimTerraSarProductDoc.cpp │ ├── ossimTerraSarProductDoc.h │ ├── ossimTerraSarTiffReader.cpp │ ├── ossimTerraSarTiffReader.h │ ├── ossimTileMapModel.cpp │ ├── ossimTileMapModel.h │ └── otb │ │ ├── Arithmetic.h │ │ ├── CivilDateTime.cpp │ │ ├── CivilDateTime.h │ │ ├── Coordinate.cpp │ │ ├── Coordinate.h │ │ ├── Ephemeris.cpp │ │ ├── Ephemeris.h │ │ ├── Equation.cpp │ │ ├── Equation.h │ │ ├── GMSTDateTime.cpp │ │ ├── GMSTDateTime.h │ │ ├── GalileanEphemeris.cpp │ │ ├── GalileanEphemeris.h │ │ ├── GeodesicCoordinate.cpp │ │ ├── GeodesicCoordinate.h │ │ ├── GeographicEphemeris.cpp │ │ ├── GeographicEphemeris.h │ │ ├── HermiteInterpolator.cpp │ │ ├── HermiteInterpolator.h │ │ ├── ImageNoise.cpp │ │ ├── ImageNoise.h │ │ ├── IncidenceAngles.cpp │ │ ├── IncidenceAngles.h │ │ ├── InfoIncidenceAngle.cpp │ │ ├── InfoIncidenceAngle.h │ │ ├── InfoSceneCoord.cpp │ │ ├── InfoSceneCoord.h │ │ ├── JSDDateTime.cpp │ │ ├── JSDDateTime.h │ │ ├── JulianDate.cpp │ │ ├── JulianDate.h │ │ ├── MJDDateTime.cpp │ │ ├── MJDDateTime.h │ │ ├── Noise.cpp │ │ ├── Noise.h │ │ ├── PlatformPosition.cpp │ │ ├── PlatformPosition.h │ │ ├── RadarSat2NoiseLevel.cpp │ │ ├── RadarSat2NoiseLevel.h │ │ ├── RectangularCoordinate.cpp │ │ ├── RectangularCoordinate.h │ │ ├── RefPoint.cpp │ │ ├── RefPoint.h │ │ ├── SarSensor.cpp │ │ ├── SarSensor.h │ │ ├── SceneCoord.cpp │ │ ├── SceneCoord.h │ │ ├── Sensor.cpp │ │ ├── Sensor.h │ │ ├── SensorParams.cpp │ │ └── SensorParams.h └── test │ └── CMakeLists.txt ├── dem ├── CMakeLists.txt ├── README.md ├── src │ ├── CMakeLists.txt │ ├── ossimDemPluginInit.cpp │ ├── ossimDemTool.cpp │ ├── ossimDemTool.h │ ├── ossimDemToolConfig.cpp │ ├── ossimDemToolConfig.h │ ├── ossimDemToolFactory.cpp │ └── ossimDemToolFactory.h └── test │ ├── CMakeLists.txt │ ├── data │ └── asp-params.json │ └── dem-test.cpp ├── fftw3 ├── CMakeLists.txt ├── README.md └── src │ ├── CMakeLists.txt │ ├── ossimFftw3Factory.cpp │ ├── ossimFftw3Factory.h │ ├── ossimFftw3Filter.cpp │ ├── ossimFftw3Filter.h │ └── ossimFftw3PluginInit.cpp ├── gdal ├── CMakeLists.txt ├── README.md ├── src │ ├── CMakeLists.txt │ ├── gdal.vcproj │ ├── macosx │ │ └── libgdalplugin │ │ │ └── libgdalplugin.xcodeproj │ │ │ └── project.pbxproj │ ├── ossimEsriShapeFileFilter.cpp │ ├── ossimEsriShapeFileFilter.h │ ├── ossimGdalDataset.cpp │ ├── ossimGdalDataset.h │ ├── ossimGdalElevationDataFactory.cpp │ ├── ossimGdalElevationDatabaseFactory.h │ ├── ossimGdalFactory.cpp │ ├── ossimGdalFactory.h │ ├── ossimGdalImageElevationDatabase.cpp │ ├── ossimGdalImageElevationDatabase.h │ ├── ossimGdalImageWriterFactory.cpp │ ├── ossimGdalImageWriterFactory.h │ ├── ossimGdalInfoFactory.cpp │ ├── ossimGdalInfoFactory.h │ ├── ossimGdalObjectFactory.cpp │ ├── ossimGdalObjectFactory.h │ ├── ossimGdalOgrVectorAnnotation.cpp │ ├── ossimGdalOgrVectorAnnotation.h │ ├── ossimGdalOverviewBuilder.cpp │ ├── ossimGdalOverviewBuilder.h │ ├── ossimGdalOverviewBuilderFactory.cpp │ ├── ossimGdalOverviewBuilderFactory.h │ ├── ossimGdalPluginInit.cpp │ ├── ossimGdalProjectionFactory.cpp │ ├── ossimGdalProjectionFactory.h │ ├── ossimGdalTileSource.cpp │ ├── ossimGdalTileSource.h │ ├── ossimGdalTiledDataset.cpp │ ├── ossimGdalTiledDataset.h │ ├── ossimGdalType.cpp │ ├── ossimGdalType.h │ ├── ossimGdalWriter.cpp │ ├── ossimGdalWriter.h │ ├── ossimHdfInfo.cpp │ ├── ossimHdfInfo.h │ ├── ossimHdfReader.cpp │ ├── ossimHdfReader.h │ ├── ossimOgcWktTranslator.cpp │ ├── ossimOgcWktTranslator.h │ ├── ossimOgrGdalTileSource.cpp │ ├── ossimOgrGdalTileSource.h │ ├── ossimOgrInfo.cpp │ ├── ossimOgrInfo.h │ ├── ossimOgrVectorTileSource.cpp │ ├── ossimOgrVectorTileSource.h │ ├── ossimShapeDatabase.cpp │ ├── ossimShapeDatabase.h │ ├── ossimShapeFile.cpp │ ├── ossimShapeFile.h │ ├── ossimShpElevIndex.cpp │ ├── ossimShpElevIndex.h │ └── shapefil.h └── test │ ├── CMakeLists.txt │ └── README.txt ├── geopdf ├── CMakeLists.txt ├── README.md ├── src │ ├── CMakeLists.txt │ ├── ossimGeoPdfInfo.cpp │ ├── ossimGeoPdfInfo.h │ ├── ossimGeoPdfInfoFactory.cpp │ ├── ossimGeoPdfInfoFactory.h │ ├── ossimGeoPdfPluginInit.cpp │ ├── ossimGeoPdfReader.cpp │ ├── ossimGeoPdfReader.h │ ├── ossimGeoPdfReaderFactory.cpp │ └── ossimGeoPdfReaderFactory.h └── test │ └── CMakeLists.txt ├── hdf5_archived ├── CMakeLists.txt ├── README.md ├── src │ ├── CMakeLists.txt │ ├── old_h5 │ │ ├── ossimH5GridModel.cpp │ │ ├── ossimH5GridModel.h │ │ ├── ossimH5ImageDataset.cpp │ │ ├── ossimH5ImageDataset.h │ │ ├── ossimH5Info.cpp │ │ ├── ossimH5Info.h │ │ ├── ossimH5InfoFactory.cpp │ │ ├── ossimH5InfoFactory.h │ │ ├── ossimH5Options.cpp │ │ ├── ossimH5Options.h │ │ ├── ossimH5PluginInit.cpp │ │ ├── ossimH5ProjectionFactory.cpp │ │ ├── ossimH5ProjectionFactory.h │ │ ├── ossimH5Reader.cpp │ │ ├── ossimH5Reader.h │ │ ├── ossimH5ReaderFactory.cpp │ │ ├── ossimH5ReaderFactory.h │ │ ├── ossimH5Util.cpp │ │ └── ossimH5Util.h │ ├── ossimHdf5PluginHandlerFactory.cpp │ ├── ossimHdf5PluginHandlerFactory.h │ ├── ossimHdf5PluginInit.cpp │ ├── ossimViirsHandler.cpp │ └── ossimViirsHandler.h └── test │ └── CMakeLists.txt ├── jpeg12 ├── CMakeLists.txt ├── LICENSE ├── README.md └── src │ ├── CMakeLists.txt │ ├── ossimJpeg12NitfReader.cpp │ ├── ossimJpeg12NitfReader.h │ ├── ossimJpeg12PluginInit.cpp │ ├── ossimJpeg12ReaderFactory.cpp │ ├── ossimJpeg12ReaderFactory.h │ ├── ossimJpegMemSrc12.cpp │ └── ossimJpegMemSrc12.h ├── kakadu ├── .gitignore ├── CMakeLists.txt ├── LICENSE ├── README.md ├── src │ ├── CMakeLists.txt │ ├── ossimJpipProjectionFactory.cpp │ ├── ossimJpipProjectionFactory.h │ ├── ossimKakaduCodecFactory.cpp │ ├── ossimKakaduCodecFactory.h │ ├── ossimKakaduCommon.cpp │ ├── ossimKakaduCommon.h │ ├── ossimKakaduCompressedTarget.cpp │ ├── ossimKakaduCompressedTarget.h │ ├── ossimKakaduCompressor.cpp │ ├── ossimKakaduCompressor.h │ ├── ossimKakaduJ2kCodec.cpp │ ├── ossimKakaduJ2kCodec.h │ ├── ossimKakaduJ2kReader.cpp │ ├── ossimKakaduJ2kReader.h │ ├── ossimKakaduJp2Reader.cpp │ ├── ossimKakaduJp2Reader.h │ ├── ossimKakaduJp2Writer.cpp │ ├── ossimKakaduJp2Writer.h │ ├── ossimKakaduJpipHandler.cpp │ ├── ossimKakaduJpipHandler.h │ ├── ossimKakaduJpipHandlerFactory.cpp │ ├── ossimKakaduJpipHandlerFactory.h │ ├── ossimKakaduJpipImageGeometryFactory.cpp │ ├── ossimKakaduJpipImageGeometryFactory.h │ ├── ossimKakaduJpipInfo.cpp │ ├── ossimKakaduJpipInfo.h │ ├── ossimKakaduJpipInfoFactory.cpp │ ├── ossimKakaduJpipInfoFactory.h │ ├── ossimKakaduKeywords.h │ ├── ossimKakaduMessaging.h │ ├── ossimKakaduNitfOverviewBuilder.cpp │ ├── ossimKakaduNitfOverviewBuilder.h │ ├── ossimKakaduNitfReader.cpp │ ├── ossimKakaduNitfReader.h │ ├── ossimKakaduNitfWriter.cpp │ ├── ossimKakaduNitfWriter.h │ ├── ossimKakaduOverviewBuilderFactory.cpp │ ├── ossimKakaduOverviewBuilderFactory.h │ ├── ossimKakaduPluginInit.cpp │ ├── ossimKakaduReaderFactory.cpp │ ├── ossimKakaduReaderFactory.h │ ├── ossimKakaduWriterFactory.cpp │ └── ossimKakaduWriterFactory.h └── test │ ├── CMakeLists.txt │ └── README.txt ├── kml ├── CMakeLists.txt ├── README.md ├── src │ ├── CMakeLists.txt │ ├── ossimKmlSuperOverlayPluginInit.cpp │ ├── ossimKmlSuperOverlayReader.cpp │ ├── ossimKmlSuperOverlayReader.h │ ├── ossimKmlSuperOverlayReaderFactory.cpp │ ├── ossimKmlSuperOverlayReaderFactory.h │ ├── ossimKmlSuperOverlayWriter.cpp │ ├── ossimKmlSuperOverlayWriter.h │ ├── ossimKmlSuperOverlayWriterFactory.cpp │ └── ossimKmlSuperOverlayWriterFactory.h └── test │ └── CMakeLists.txt ├── mrsid ├── .gitignore ├── CMakeLists.txt ├── LICENSE ├── README.md ├── src │ ├── CMakeLists.txt │ ├── ossimMG4LidarReader.cpp │ ├── ossimMG4LidarReader.h │ ├── ossimMrSidPluginInit.cpp │ ├── ossimMrSidReader.cpp │ ├── ossimMrSidReader.h │ ├── ossimMrSidReaderFactory.cpp │ ├── ossimMrSidReaderFactory.h │ ├── ossimMrSidWriter.cpp │ ├── ossimMrSidWriter.h │ ├── ossimMrSidWriterFactory.cpp │ └── ossimMrSidWriterFactory.h └── test │ ├── CMakeLists.txt │ └── README.txt ├── opencv ├── CMakeLists.txt ├── README.md ├── src │ ├── CMakeLists.txt │ ├── ossimIvtGeomXform.cpp │ ├── ossimIvtGeomXform.h │ ├── ossimIvtGeomXformVisitor.cpp │ ├── ossimIvtGeomXformVisitor.h │ ├── ossimOpenCvObjectFactory.cpp │ ├── ossimOpenCvObjectFactory.h │ ├── ossimOpenCvPluginInit.cpp │ ├── ossimTieMeasurementGenerator.cpp │ └── ossimTieMeasurementGenerator.h └── test │ └── CMakeLists.txt ├── openjpeg ├── CMakeLists.txt ├── README.md ├── src │ ├── CMakeLists.txt │ ├── ossimOpjColor.cpp │ ├── ossimOpjColor.h │ ├── ossimOpjCommon.cpp │ ├── ossimOpjCommon.h │ ├── ossimOpjCompressor.cpp │ ├── ossimOpjCompressor.h │ ├── ossimOpjJp2Reader.cpp │ ├── ossimOpjJp2Reader.h │ ├── ossimOpjJp2Writer.cpp │ ├── ossimOpjJp2Writer.h │ ├── ossimOpjKeywords.h │ ├── ossimOpjNitfReader.cpp │ ├── ossimOpjNitfReader.h │ ├── ossimOpjPluginInit.cpp │ ├── ossimOpjReaderFactory.cpp │ ├── ossimOpjReaderFactory.h │ ├── ossimOpjWriterFactory.cpp │ └── ossimOpjWriterFactory.h └── test │ └── CMakeLists.txt ├── pdal ├── CMakeLists.txt ├── LICENSE ├── README.md ├── src │ ├── CMakeLists.txt │ ├── ossimPdalFileReader.cpp │ ├── ossimPdalFileReader.h │ ├── ossimPdalPluginInit.cpp │ ├── ossimPdalReader.cpp │ ├── ossimPdalReader.h │ ├── ossimPdalReaderFactory.cpp │ ├── ossimPdalReaderFactory.h │ ├── ossimRialtoReader.cpp │ └── ossimRialtoReader.h └── test │ ├── CMakeLists.txt │ ├── README.md │ ├── autzen.las │ ├── autzen.xml │ ├── pdal-EXPECTED.tif │ ├── plugin-test.cpp │ └── rialto-EXPECTED.tif ├── png ├── CMakeLists.txt ├── README.md ├── src │ ├── CMakeLists.txt │ ├── ossimPngCodec.cpp │ ├── ossimPngCodec.h │ ├── ossimPngCodecFactory.cpp │ ├── ossimPngCodecFactory.h │ ├── ossimPngPluginInit.cpp │ ├── ossimPngReader.cpp │ ├── ossimPngReader.h │ ├── ossimPngReaderFactory.cpp │ ├── ossimPngReaderFactory.h │ ├── ossimPngWriter.cpp │ ├── ossimPngWriter.h │ ├── ossimPngWriterFactory.cpp │ └── ossimPngWriterFactory.h └── test │ └── CMakeLists.txt ├── potrace ├── CMakeLists.txt ├── LICENSE ├── README.md └── src │ ├── CMakeLists.txt │ ├── auxiliary.h │ ├── backend_geojson.c │ ├── backend_geojson.h │ ├── bitmap.h │ ├── bitmap_io.c │ ├── bitmap_io.h │ ├── bitops.h │ ├── curve.c │ ├── curve.h │ ├── decompose.c │ ├── decompose.h │ ├── greymap.c │ ├── greymap.h │ ├── imginfo.h │ ├── lists.h │ ├── ossimPotracePluginInit.cpp │ ├── ossimPotraceTool.cpp │ ├── ossimPotraceTool.h │ ├── ossimPotraceToolFactory.cpp │ ├── ossimPotraceToolFactory.h │ ├── platform.h │ ├── potracelib.c │ ├── potracelib.h │ ├── progress.h │ ├── trace.c │ ├── trace.h │ └── trans.h ├── reg ├── CMakeLists.txt ├── README.md ├── src │ ├── CMakeLists.txt │ ├── ossimRegPluginInit.cpp │ ├── ossimRegTool.cpp │ ├── ossimRegTool.h │ ├── ossimRegToolFactory.cpp │ └── ossimRegToolFactory.h └── test │ ├── CMakeLists.txt │ ├── detect-test.cpp │ └── match-test.cpp ├── shapelib ├── CMakeLists.txt └── apps │ ├── CMakeLists.txt │ └── ossim-img2shp.cpp ├── sqlite ├── CMakeLists.txt ├── README.md ├── src │ ├── CMakeLists.txt │ ├── ossimGpkgContentsRecord.cpp │ ├── ossimGpkgContentsRecord.h │ ├── ossimGpkgDatabaseRecordBase.cpp │ ├── ossimGpkgDatabaseRecordBase.h │ ├── ossimGpkgInfo.cpp │ ├── ossimGpkgInfo.h │ ├── ossimGpkgNsgTileMatrixExtentRecord.cpp │ ├── ossimGpkgNsgTileMatrixExtentRecord.h │ ├── ossimGpkgReader.cpp │ ├── ossimGpkgReader.h │ ├── ossimGpkgSpatialRefSysRecord.cpp │ ├── ossimGpkgSpatialRefSysRecord.h │ ├── ossimGpkgTileEntry.cpp │ ├── ossimGpkgTileEntry.h │ ├── ossimGpkgTileMatrixRecord.cpp │ ├── ossimGpkgTileMatrixRecord.h │ ├── ossimGpkgTileMatrixSetRecord.cpp │ ├── ossimGpkgTileMatrixSetRecord.h │ ├── ossimGpkgTileRecord.cpp │ ├── ossimGpkgTileRecord.h │ ├── ossimGpkgUtil.cpp │ ├── ossimGpkgUtil.h │ ├── ossimGpkgWriter.cpp │ ├── ossimGpkgWriter.h │ ├── ossimSqliteConstants.h │ ├── ossimSqliteInfoFactory.cpp │ ├── ossimSqliteInfoFactory.h │ ├── ossimSqlitePluginInit.cpp │ ├── ossimSqliteReaderFactory.cpp │ ├── ossimSqliteReaderFactory.h │ ├── ossimSqliteUtil.cpp │ ├── ossimSqliteUtil.h │ ├── ossimSqliteWriterFactory.cpp │ └── ossimSqliteWriterFactory.h └── test │ └── CMakeLists.txt └── web ├── CMakeLists.txt ├── README.md ├── src ├── CMakeLists.txt ├── CurlHeaderCache.cpp ├── CurlHeaderCache.h ├── CurlStreamDefaults.cpp ├── CurlStreamDefaults.h ├── ossimCurlHttpRequest.cpp ├── ossimCurlHttpRequest.h ├── ossimCurlIStream.h ├── ossimCurlStreamBuffer.cpp ├── ossimCurlStreamBuffer.h ├── ossimCurlStreamFactory.cpp ├── ossimCurlStreamFactory.h ├── ossimWebPluginInit.cpp ├── ossimWebPluginRequestFactory.cpp └── ossimWebPluginRequestFactory.h └── test └── CMakeLists.txt /.gitignore: -------------------------------------------------------------------------------- 1 | csm3/src/ossimCsm3Config.h 2 | atp/AtpCommon.h 3 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2015 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | 23 | -------------------------------------------------------------------------------- /atp/AtpCommon.h.in: -------------------------------------------------------------------------------- 1 | //************************************************************************************************** 2 | // 3 | // OSSIM Open Source Geospatial Data Processing Library 4 | // See top level LICENSE.txt file for license information 5 | // 6 | //************************************************************************************************** 7 | #define OSSIM_HAS_OPENCV_HIGHGUI @OPENCV_HIGHGUI_FOUND@ 8 | #define CINFO ossimNotify(ossimNotifyLevel_INFO) 9 | #define CWARN ossimNotify(ossimNotifyLevel_WARN) 10 | #define CFATAL ossimNotify(ossimNotifyLevel_FATAL) 11 | -------------------------------------------------------------------------------- /atp/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | PROJECT(ossim-atp-plugin) 2 | Message("################## Setting up ossim-atp-plugin #########################") 3 | 4 | cmake_minimum_required(VERSION 2.8) 5 | 6 | find_package( JsonCpp ) 7 | if( JSONCPP_FOUND ) 8 | include_directories( ${JSONCPP_INCLUDE_DIR} ) 9 | set( requiredLibs ${requiredLibs} ${JSONCPP_LIBRARY} ) 10 | message("Found JsonCpp" ) 11 | else( JSONCPP_FOUND ) 12 | message( FATAL_ERROR "Could not find required JsonCpp package!" ) 13 | endif( JSONCPP_FOUND ) 14 | 15 | message(" OPENCV_HOME = <${OPENCV_HOME}>") 16 | find_package(OpenCV) 17 | if( OPENCV_FOUND ) 18 | include_directories( ${OPENCV_INCLUDE_DIR} ) 19 | set( requiredLibs ${requiredLibs} ${OPENCV_LIBRARIES} ) 20 | message( "Found OpenCV" ) 21 | else( OPENCV_FOUND ) 22 | message( FATAL "Could not find OpenCV package. " ) 23 | endif( OPENCV_FOUND ) 24 | 25 | set (CMAKE_CXX_STANDARD 11) 26 | 27 | add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/src ) 28 | add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/test ) 29 | 30 | # Share install targets (configuration JSON files): 31 | FILE(GLOB ossim_atp_json ${${PROJECT_NAME}_SOURCE_DIR}/share/atp/*.json) 32 | INSTALL(FILES ${ossim_atp_json} DESTINATION share/ossim/atp COMPONENT ossim) 33 | 34 | CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/AtpCommon.h.in ${CMAKE_CURRENT_SOURCE_DIR}/AtpCommon.h @ONLY) 35 | 36 | 37 | message("################## end of ossim-atp-plugin setup #########################") 38 | -------------------------------------------------------------------------------- /atp/share/atp/nasaConfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "parameters": [ 3 | { 4 | "name": "algorithm", 5 | "descr": "Algorithm used for generating tiepoints. This can also be specified one level up in the JSON.", 6 | "type": "string", 7 | "value": "nasa" 8 | }, 9 | { 10 | "name": "NOT_YET_IMPLEMENTED", 11 | "descr": "NOT_YET_IMPLEMENTED", 12 | "type": "string", 13 | "value": "NOT_YET_IMPLEMENTED" 14 | } 15 | ] 16 | } 17 | -------------------------------------------------------------------------------- /atp/src/AtpConfig.h: -------------------------------------------------------------------------------- 1 | //************************************************************************************************** 2 | // 3 | // OSSIM Open Source Geospatial Data Processing Library 4 | // See top level LICENSE.txt file for license information 5 | // 6 | //************************************************************************************************** 7 | 8 | #pragma once 9 | 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | 17 | namespace ATP 18 | { 19 | /** 20 | * Singleton class maintaining parameters affecting the automatic tie point generation. 21 | * The state is imported and exported via JSON. There are default configuration files that must 22 | * be part of the install, that are accessed by this class. Custom settings can also be st 23 | */ 24 | class OSSIM_PLUGINS_DLL AtpConfig : public ossim::JsonConfig 25 | { 26 | public: 27 | //! Singleton implementation. 28 | static AtpConfig& instance(); 29 | 30 | //! Destructor 31 | virtual ~AtpConfig(); 32 | 33 | bool readConfig(const std::string& configName=""); 34 | 35 | private: 36 | AtpConfig(); 37 | AtpConfig(const AtpConfig& /*hide_this*/) {} 38 | 39 | }; 40 | 41 | } 42 | -------------------------------------------------------------------------------- /atp/src/AtpOpenCV.h: -------------------------------------------------------------------------------- 1 | //************************************************************************************************** 2 | // 3 | // OSSIM Open Source Geospatial Data Processing Library 4 | // See top level LICENSE.txt file for license information 5 | // 6 | //************************************************************************************************** 7 | #ifndef AtpOpenCV_HEADER 8 | #define AtpOpenCV_HEADER 9 | 10 | #include 11 | #include 12 | #include 13 | 14 | class ossimImageData; 15 | 16 | //! THESE FUNCTIONS REQUIRE OPENCV 17 | 18 | namespace ATP 19 | { 20 | //! Converts an ossimImageData pointer to an IplImage for use in OpenCV. 21 | //! Warning: This function allocates memory, all non-null pointers should be 22 | //! free'd using cvReleaseImage. 23 | IplImage *convertToIpl(const ossimImageData* data); 24 | IplImage *convertToIpl32(const ossimImageData* data); 25 | 26 | //! Converts an IPL image to an ossimImageData object: 27 | void copyIplToOid(IplImage* ipl, ossimImageData* oid); 28 | void copyIpl32ToOid(IplImage* ipl, ossimImageData* oid); 29 | 30 | } 31 | #endif 32 | -------------------------------------------------------------------------------- /atp/src/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | set(LIB_NAME ossim_atp_plugin) 2 | 3 | cmake_minimum_required(VERSION 2.8) 4 | 5 | message(" OSSIM_INSTALL_PREFIX = <${OSSIM_INSTALL_PREFIX}>") 6 | message(" OSSIM_DEV_HOME = <${OSSIM_DEV_HOME}>") 7 | 8 | file(GLOB_RECURSE OSSIMPLUGIN_SRCS *.cpp *.c) 9 | file(GLOB_RECURSE OSSIMPLUGIN_HEADERS *.h) 10 | 11 | # Adjust the install library path: 12 | if(OSSIM_INSTALL_PLUGINS_WITH_VERSION) 13 | set(INSTALL_LIBRARY_DIR "${INSTALL_LIBRARY_DIR}/ossim-${OSSIM_VERSION}/plugins") 14 | else(OSSIM_INSTALL_PLUGINS_WITH_VERSION) 15 | set(INSTALL_LIBRARY_DIR "${INSTALL_LIBRARY_DIR}/ossim/plugins") 16 | endif(OSSIM_INSTALL_PLUGINS_WITH_VERSION) 17 | if(WIN32) 18 | set(INSTALL_RUNTIME_DIR "${INSTALL_RUNTIME_DIR}/ossim/plugins") 19 | endif() 20 | 21 | OSSIM_LINK_LIBRARY(${LIB_NAME} 22 | COMPONENT_NAME ossim TYPE "${OSSIM_PLUGIN_LINK_TYPE}" 23 | LIBRARIES ${OSSIM_LIBRARY} ${requiredLibs} 24 | HEADERS "${OSSIMPLUGIN_HEADERS}" 25 | SOURCE_FILES "${OSSIMPLUGIN_SRCS}" 26 | INSTALL_LIB) 27 | 28 | -------------------------------------------------------------------------------- /atp/src/ossimAtpPluginInit.cpp: -------------------------------------------------------------------------------- 1 | //************************************************************************************************** 2 | // 3 | // OSSIM Open Source Geospatial Data Processing Library 4 | // See top level LICENSE.txt file for license information 5 | // 6 | //************************************************************************************************** 7 | 8 | #include "ossimAtpToolFactory.h" 9 | #include 10 | #include 11 | 12 | extern "C" 13 | { 14 | ossimSharedObjectInfo atpInfo; 15 | 16 | const char* getAtpDescription() 17 | { 18 | return "ossim-atp tool plugin\n"; 19 | } 20 | 21 | int getAtpNumberOfClassNames() 22 | { 23 | return 1; 24 | } 25 | 26 | const char* getAtpClassName(int idx) 27 | { 28 | if (idx == 0) 29 | { 30 | return "ossimAtpTool"; 31 | } 32 | return (const char*)0; 33 | } 34 | 35 | /* Note symbols need to be exported on windoze... */ 36 | OSSIM_PLUGINS_DLL void ossimSharedLibraryInitialize(ossimSharedObjectInfo** info) 37 | { 38 | atpInfo.getDescription = getAtpDescription; 39 | atpInfo.getNumberOfClassNames = getAtpNumberOfClassNames; 40 | atpInfo.getClassName = getAtpClassName; 41 | 42 | *info = &atpInfo; 43 | 44 | /* Register the utility... */ 45 | ossimToolRegistry::instance()->registerFactory(ATP::ossimAtpToolFactory::instance()); 46 | 47 | } 48 | 49 | /* Note symbols need to be exported on windoze... */ 50 | OSSIM_PLUGINS_DLL void ossimSharedLibraryFinalize() 51 | { 52 | ossimToolRegistry::instance()->unregisterFactory(ATP::ossimAtpToolFactory::instance()); 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /atp/src/ossimAtpToolFactory.cpp: -------------------------------------------------------------------------------- 1 | //************************************************************************************************** 2 | // 3 | // OSSIM Open Source Geospatial Data Processing Library 4 | // See top level LICENSE.txt file for license information 5 | // 6 | //************************************************************************************************** 7 | 8 | #include "ossimAtpToolFactory.h" 9 | #include "ossimAtpTool.h" 10 | #include 11 | 12 | using namespace std; 13 | 14 | namespace ATP 15 | { 16 | ossimAtpToolFactory* ossimAtpToolFactory::s_instance = 0; 17 | 18 | ossimAtpToolFactory* ossimAtpToolFactory::instance() 19 | { 20 | if (!s_instance) 21 | s_instance = new ossimAtpToolFactory; 22 | return s_instance; 23 | } 24 | 25 | ossimAtpToolFactory::ossimAtpToolFactory() 26 | { 27 | } 28 | 29 | ossimAtpToolFactory::~ossimAtpToolFactory() 30 | { 31 | ossimToolRegistry::instance()->unregisterFactory(this); 32 | } 33 | 34 | ossimTool* ossimAtpToolFactory::createTool(const std::string& argName) const 35 | { 36 | ossimString utilName (argName); 37 | utilName.downcase(); 38 | 39 | if ((utilName == "atp") || (argName == "ossimAtpTool")) 40 | return new ossimAtpTool; 41 | 42 | return 0; 43 | } 44 | 45 | void ossimAtpToolFactory::getCapabilities(std::map& capabilities) const 46 | { 47 | capabilities.insert(pair("atp", ossimAtpTool::DESCRIPTION)); 48 | } 49 | 50 | std::map ossimAtpToolFactory::getCapabilities() const 51 | { 52 | std::map result; 53 | getCapabilities(result); 54 | return result; 55 | } 56 | 57 | void ossimAtpToolFactory::getTypeNameList(vector& typeList) const 58 | { 59 | typeList.push_back("ossimAtpTool"); 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /atp/src/ossimAtpToolFactory.h: -------------------------------------------------------------------------------- 1 | //************************************************************************************************** 2 | // 3 | // OSSIM Open Source Geospatial Data Processing Library 4 | // See top level LICENSE.txt file for license information 5 | // 6 | //************************************************************************************************** 7 | 8 | #ifndef ossimAtpToolFactory_HEADER 9 | #define ossimAtpToolFactory_HEADER 1 10 | 11 | #include 12 | #include 13 | 14 | class ossimString; 15 | class ossimFilename; 16 | class ossimKeywordlist; 17 | 18 | namespace ATP { 19 | 20 | class OSSIM_PLUGINS_DLL ossimAtpToolFactory: public ossimToolFactoryBase 21 | { 22 | public: 23 | static ossimAtpToolFactory* instance(); 24 | 25 | virtual ~ossimAtpToolFactory(); 26 | virtual ossimTool* createTool(const std::string& typeName) const; 27 | virtual void getTypeNameList(std::vector& typeList) const; 28 | virtual void getCapabilities(std::map& capabilities) const; 29 | virtual std::map getCapabilities() const; 30 | 31 | protected: 32 | ossimAtpToolFactory(); 33 | ossimAtpToolFactory(const ossimAtpToolFactory&); 34 | void operator=(const ossimAtpToolFactory&); 35 | 36 | /** static instance of this class */ 37 | static ossimAtpToolFactory* s_instance; 38 | 39 | }; 40 | } 41 | #endif /* end of #ifndef ossimAtpToolFactory_HEADER */ 42 | -------------------------------------------------------------------------------- /atp/src/ossimCorrelationSource.h: -------------------------------------------------------------------------------- 1 | //************************************************************************************************** 2 | // 3 | // OSSIM Open Source Geospatial Data Processing Library 4 | // See top level LICENSE.txt file for license information 5 | // 6 | //************************************************************************************************** 7 | #ifndef ossimCorrelationSource_HEADER 8 | #define ossimCorrelationSource_HEADER 9 | 10 | #include "AutoTiePoint.h" 11 | #include "AtpConfig.h" 12 | #include "AtpTileSource.h" 13 | #include 14 | #include 15 | #include 16 | namespace ATP 17 | { 18 | /** 19 | * Finds auto-tie-points using the corss-correlation-based matching algorithm 20 | */ 21 | class OSSIMDLLEXPORT ossimCorrelationSource : public AtpTileSource 22 | { 23 | public: 24 | ossimCorrelationSource(); 25 | ossimCorrelationSource(ossimConnectableObject::ConnectableObjectList& inputSources); 26 | ossimCorrelationSource(AtpGenerator* generator); 27 | 28 | virtual ~ossimCorrelationSource(); 29 | 30 | virtual void initialize(); 31 | 32 | virtual ossimRefPtr getTile(const ossimIrect& origin, ossim_uint32 rLevel=0); 33 | 34 | /** For engineering use in annotating CMP image */ 35 | unsigned int getNominalCmpPatchSize() const { return m_nominalCmpPatchSize; } 36 | 37 | protected: 38 | //! Given an image tile, locates prominent features in that tile. Use 39 | void findFeatures(const ossimImageData* data, std::vector& featurePts); 40 | 41 | bool correlate(std::shared_ptr atp); 42 | 43 | bool OpenCVCorrelation(std::shared_ptr atp, 44 | const ossimImageData* refpatch, 45 | const ossimImageData* cmppatch); 46 | 47 | unsigned int m_nominalCmpPatchSize; 48 | 49 | }; 50 | } 51 | #endif /* #ifndef ossimCorrelationSource_HEADER */ 52 | -------------------------------------------------------------------------------- /atp/src/ossimDescriptorSource.h: -------------------------------------------------------------------------------- 1 | //************************************************************************************************** 2 | // 3 | // OSSIM Open Source Geospatial Data Processing Library 4 | // See top level LICENSE.txt file for license information 5 | // 6 | //************************************************************************************************** 7 | #ifndef ossimDescriptorSource_HEADER 8 | #define ossimDescriptorSource_HEADER 9 | 10 | #include "AutoTiePoint.h" 11 | #include "AtpConfig.h" 12 | #include "AtpTileSource.h" 13 | #include 14 | #include 15 | #include 16 | #include 17 | 18 | namespace ATP 19 | { 20 | /** 21 | * Finds auto-tie-points using the descriptor-based matching algorithm 22 | */ 23 | class OSSIMDLLEXPORT ossimDescriptorSource : public AtpTileSource 24 | { 25 | public: 26 | ossimDescriptorSource(AtpGenerator* generator); 27 | 28 | virtual ~ossimDescriptorSource(); 29 | 30 | virtual void initialize(); 31 | 32 | virtual ossimRefPtr getTile(const ossimIrect& origin, ossim_uint32 rLevel=0); 33 | 34 | private: 35 | struct SortFunc 36 | { 37 | bool operator()(cv::KeyPoint lhs, cv::KeyPoint rhs) 38 | { return (lhs.response > rhs.response); }; 39 | } sortFunc; 40 | 41 | ossimDescriptorSource(); 42 | ossimDescriptorSource(ossimConnectableObject::ConnectableObjectList& inputSources); 43 | 44 | unsigned int m_cmpPatchInflation; 45 | }; 46 | } 47 | #endif /* #ifndef ossimDescriptorSource_HEADER */ 48 | -------------------------------------------------------------------------------- /atp/test/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required (VERSION 2.8) 2 | 3 | # Get the library suffix for lib or lib64. 4 | get_property(LIB64 GLOBAL PROPERTY FIND_LIBRARY_USE_LIB64_PATHS) 5 | if(LIB64) 6 | set(LIBSUFFIX 64) 7 | else() 8 | set(LIBSUFFIX "") 9 | endif() 10 | 11 | set(requiredLibs ${requiredLibs} ossim_atp_plugin ) 12 | 13 | message("requiredLibs = ${requiredLibs}") 14 | add_executable(atp-config-test atp-config-test.cpp ) 15 | set_target_properties(atp-config-test PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin") 16 | target_link_libraries( atp-config-test ${requiredLibs} ) 17 | 18 | add_executable(atp-test atp-test.cpp ) 19 | set_target_properties(atp-test PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin") 20 | target_link_libraries( atp-test ${requiredLibs} ) 21 | 22 | add_executable(atp-residuals atp-residuals.cpp) 23 | set_target_properties(atp-residuals PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin") 24 | target_link_libraries(atp-residuals ${requiredLibs} ) 25 | 26 | add_executable(atp-pax-test atp-pax-test.cpp) 27 | set_target_properties(atp-pax-test PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin") 28 | target_link_libraries(atp-pax-test ${requiredLibs} ) 29 | 30 | -------------------------------------------------------------------------------- /atp/test/data/atp-algorithms.json: -------------------------------------------------------------------------------- 1 | { 2 | "service": "autoTiePoint", 3 | "method": "getAlgorithms" 4 | } 5 | 6 | -------------------------------------------------------------------------------- /atp/test/data/atp-generate.json: -------------------------------------------------------------------------------- 1 | { 2 | "service": "autoTiePoint", 3 | "method": "generate", 4 | "algorithm": "crosscorr", 5 | "photoblock" : { 6 | "images" : [ 7 | { 8 | "entryIndex" : 0, 9 | "filename" : "/data/Stereo/test/sub/ref.tif", 10 | "imageId" : "19JUL15WV030800015JUL19101909-P1BS_R1C1-056263760010_01_P001 " 11 | }, 12 | { 13 | "entryIndex" : 0, 14 | "filename" : "/data/Stereo/test/sub/cmp.tif", 15 | "imageId" : "19JUL15WV030800015JUL19102002-P1BS_R1C1-056263760010_01_P001 " 16 | } 17 | ] 18 | }, 19 | "parameters": { 20 | "numFeaturesPerTile": 20, 21 | "maxPercentResMagDiff": 0.1, 22 | "maxResAngleDiff": 10, 23 | "percentConsistentThreshold": 0.5, 24 | "minNumConsistentNeighbors": 1, 25 | "maxNumMatchesPerFeature": 2, 26 | "peakThreshold": 0.5, 27 | "correlationMethod": 5, 28 | "corrWindowSize": 31, 29 | "corrStepSize": 1, 30 | "useRasterMode": true, 31 | "featureSearchTileSize": 256, 32 | "searchGridSize": 5, 33 | "minNumTiles": 15, 34 | "diagnosticLevel": 1 35 | } 36 | } 37 | 38 | -------------------------------------------------------------------------------- /atp/test/data/atp-params.json: -------------------------------------------------------------------------------- 1 | { 2 | "service": "autoTiePoint", 3 | "method": "getParameters", 4 | "algorithm": "crosscorr" 5 | } 6 | 7 | -------------------------------------------------------------------------------- /aws/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/src ${CMAKE_CURRENT_BINARY_DIR}/src) 2 | 3 | # No test yet. 4 | #IF(BUILD_OSSIM_TESTS) 5 | # add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/test ${CMAKE_CURRENT_BINARY_DIR}/test) 6 | #ENDIF() 7 | -------------------------------------------------------------------------------- /aws/README.md: -------------------------------------------------------------------------------- 1 | # ossim-aws-plugin 2 | Plugin to interface with files in AWS S3 buckets. 3 | -------------------------------------------------------------------------------- /aws/src/S3HeaderCache.h: -------------------------------------------------------------------------------- 1 | #ifndef ossimS3HeaderCache_HEADER 2 | #define ossimS3HeaderCache_HEADER 3 | #include 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include // For std::unique_lock 9 | #include 10 | 11 | namespace ossim 12 | { 13 | class S3HeaderCacheNode 14 | { 15 | public: 16 | S3HeaderCacheNode(ossim_int64 filesize) 17 | :m_timestamp(ossimTimer::instance()->tick()), 18 | m_filesize(filesize) 19 | { 20 | 21 | } 22 | 23 | ossimTimer::Timer_t m_timestamp; 24 | ossim_int64 m_filesize; 25 | }; 26 | 27 | class S3HeaderCache 28 | { 29 | public: 30 | typedef std::shared_ptr Node_t; 31 | typedef std::string Key_t; 32 | typedef ossim_int64 TimeIndex_t; 33 | typedef std::map CacheType; 34 | typedef std::map CacheTimeIndexType; 35 | 36 | S3HeaderCache(); 37 | ~S3HeaderCache(); 38 | bool getCachedFilesize(const Key_t& key, ossim_int64& filesize)const; 39 | void addHeader(const Key_t& key, Node_t& node); 40 | void setMaxCacheEntries(ossim_int64 maxEntries); 41 | static std::shared_ptr instance(); 42 | 43 | protected: 44 | void shrinkEntries(); 45 | 46 | static std::shared_ptr m_instance; 47 | mutable std::mutex m_mutex; 48 | 49 | CacheType m_cache; 50 | CacheTimeIndexType m_cacheTime; 51 | ossim_int64 m_maxCacheEntries; 52 | 53 | }; 54 | } 55 | 56 | #endif 57 | -------------------------------------------------------------------------------- /aws/src/S3StreamDefaults.h: -------------------------------------------------------------------------------- 1 | #ifndef S3StreamDefaults_HEADER 2 | #define S3StreamDefaults_HEADER 1 3 | #include 4 | 5 | namespace ossim{ 6 | 7 | 8 | class S3StreamDefaults 9 | { 10 | public: 11 | static void loadDefaults(); 12 | 13 | static ossim_int64 m_readBlocksize; 14 | static ossim_int64 m_nReadCacheHeaders; 15 | static bool m_cacheInvalidLocations; 16 | }; 17 | 18 | } 19 | 20 | #endif 21 | -------------------------------------------------------------------------------- /aws/src/ossimS3IStream.h: -------------------------------------------------------------------------------- 1 | #ifndef ossimS3IStream_HEADER 2 | #define ossimS3IStream_HEADER 1 3 | #include 4 | #include 5 | #include "ossimS3StreamBuffer.h" 6 | 7 | namespace ossim{ 8 | 9 | class S3IStream : public ossim::istream 10 | { 11 | public: 12 | S3IStream():std::istream(&m_s3membuf) 13 | {} 14 | 15 | void open (const char* connectionString, 16 | const ossimKeywordlist& options, 17 | 18 | std::ios_base::openmode mode) 19 | { 20 | open(std::string(connectionString), options, mode); 21 | } 22 | void open (const std::string& connectionString, 23 | const ossimKeywordlist& options, 24 | std::ios_base::openmode mode) 25 | { 26 | if(m_s3membuf.open(connectionString, options, mode)) 27 | { 28 | clear(); 29 | } 30 | else 31 | { 32 | setstate(std::ios::failbit); 33 | } 34 | } 35 | 36 | virtual ossim_int64 getFileSize() const 37 | { 38 | return (ossim_int64)m_s3membuf.getFileSize(); 39 | } 40 | 41 | ossim_uint64 getBlockSize() const 42 | { 43 | return m_s3membuf.getBlockSize(); 44 | } 45 | 46 | protected: 47 | S3StreamBuffer m_s3membuf; 48 | }; 49 | } 50 | 51 | #endif 52 | -------------------------------------------------------------------------------- /cnes/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/src ${CMAKE_CURRENT_BINARY_DIR}/src) 2 | 3 | #IF(BUILD_OSSIM_TESTS) 4 | # add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/test ${CMAKE_CURRENT_BINARY_DIR}/test) 5 | #ENDIF() 6 | 7 | 8 | -------------------------------------------------------------------------------- /cnes/README.md: -------------------------------------------------------------------------------- 1 | # ossim-cnes-plugin 2 | Plugin for various sensors and image formats developed by Centre National d'Etudes Spatiales (CNES) 3 | -------------------------------------------------------------------------------- /cnes/src/AlosPalsar/AlosPalsarLeaderFactory.cpp: -------------------------------------------------------------------------------- 1 | //---------------------------------------------------------------------------- 2 | // 3 | // "Copyright Centre National d'Etudes Spatiales" 4 | // "Copyright Centre for Remote Imaging, Sensing and Processing" 5 | // 6 | // License: LGPL 7 | // 8 | // See LICENSE.txt file in the top level directory for more details. 9 | // 10 | //---------------------------------------------------------------------------- 11 | // $Id$ 12 | 13 | #include 14 | 15 | #include 16 | #include 17 | #include 18 | #include 19 | #include 20 | 21 | namespace ossimplugins 22 | { 23 | 24 | AlosPalsarLeaderFactory::AlosPalsarLeaderFactory() 25 | { 26 | RegisterRecord(17, new AlosPalsarFacilityData()); 27 | RegisterRecord(5, new AlosPalsarRadiometricData()); 28 | RegisterRecord(3, new AlosPalsarPlatformPositionData()); 29 | // RegisterRecord(3, new AlosPalsarMapProjectionData());// 30 | RegisterRecord(2, new AlosPalsarDataSetSummary()); 31 | RegisterRecord(1, new AlosPalsarFileDescriptor()); 32 | } 33 | 34 | AlosPalsarLeaderFactory::~AlosPalsarLeaderFactory() 35 | { 36 | 37 | } 38 | 39 | } 40 | -------------------------------------------------------------------------------- /cnes/src/AlosPalsar/AlosPalsarLeaderFactory.h: -------------------------------------------------------------------------------- 1 | //---------------------------------------------------------------------------- 2 | // 3 | // "Copyright Centre National d'Etudes Spatiales" 4 | // "Copyright Centre for Remote Imaging, Sensing and Processing" 5 | // 6 | // License: LGPL 7 | // 8 | // See LICENSE.txt file in the top level directory for more details. 9 | // 10 | //---------------------------------------------------------------------------- 11 | // $Id$ 12 | 13 | #ifndef AlosPalsarLeaderFactory_h 14 | #define AlosPalsarLeaderFactory_h 15 | 16 | 17 | #include 18 | #include 19 | 20 | namespace ossimplugins 21 | { 22 | 23 | /** 24 | * @ingroup AlosPalsarLeaderFile 25 | * @brief This class is a facory able to construct Record base classes 26 | */ 27 | class AlosPalsarLeaderFactory : public AlosPalsarRecordFactory 28 | { 29 | public: 30 | /** 31 | * @brief Contstructor 32 | */ 33 | AlosPalsarLeaderFactory(); 34 | /** 35 | * @brief Destructor 36 | */ 37 | ~AlosPalsarLeaderFactory(); 38 | 39 | 40 | protected: 41 | 42 | 43 | private: 44 | }; 45 | } 46 | #endif 47 | -------------------------------------------------------------------------------- /cnes/src/AlosPalsar/AlosPalsarRadiometricData.cpp: -------------------------------------------------------------------------------- 1 | //---------------------------------------------------------------------------- 2 | // 3 | // "Copyright Centre National d'Etudes Spatiales" 4 | // "Copyright Centre for Remote Imaging, Sensing and Processing" 5 | // 6 | // License: LGPL 7 | // 8 | // See LICENSE.txt file in the top level directory for more details. 9 | // 10 | //---------------------------------------------------------------------------- 11 | // $Id$ 12 | 13 | #include 14 | 15 | namespace ossimplugins 16 | { 17 | 18 | 19 | AlosPalsarRadiometricData::AlosPalsarRadiometricData() : AlosPalsarRecord("radio_data_rec") 20 | { 21 | } 22 | 23 | AlosPalsarRadiometricData::~AlosPalsarRadiometricData() 24 | { 25 | } 26 | 27 | std::ostream& operator<<(std::ostream& os, const AlosPalsarRadiometricData& data) 28 | { 29 | os << "calibration_factor:" << data._calibration_factor << std::endl; 30 | 31 | return os; 32 | } 33 | 34 | std::istream& operator>>(std::istream& is, AlosPalsarRadiometricData& data) 35 | { 36 | char buf[9]; 37 | 38 | is.seekg(8, std::ios::cur); 39 | 40 | is.read(buf, 8); 41 | buf[8] = '\0'; 42 | data._calibration_factor = atof(buf); 43 | 44 | is.seekg(9824, std::ios::cur); //skip the rest of the radiometric data record 45 | is.seekg(12477692, std::ios::cur); //skip to the 11th facility-related data record 46 | 47 | return is; 48 | } 49 | 50 | AlosPalsarRadiometricData::AlosPalsarRadiometricData(const AlosPalsarRadiometricData& rhs): 51 | AlosPalsarRecord(rhs) 52 | { 53 | _calibration_factor = rhs._calibration_factor; 54 | } 55 | 56 | AlosPalsarRadiometricData& AlosPalsarRadiometricData::operator=(const AlosPalsarRadiometricData& rhs) 57 | { 58 | _calibration_factor = rhs._calibration_factor; 59 | 60 | return *this; 61 | } 62 | 63 | } 64 | -------------------------------------------------------------------------------- /cnes/src/AlosPalsar/AlosPalsarRecord.cpp: -------------------------------------------------------------------------------- 1 | //---------------------------------------------------------------------------- 2 | // 3 | // "Copyright Centre National d'Etudes Spatiales" 4 | // "Copyright Centre for Remote Imaging, Sensing and Processing" 5 | // 6 | // License: LGPL 7 | // 8 | // See LICENSE.txt file in the top level directory for more details. 9 | // 10 | //---------------------------------------------------------------------------- 11 | // $Id$ 12 | 13 | #include 14 | #include 15 | 16 | namespace ossimplugins 17 | { 18 | 19 | AlosPalsarRecord::AlosPalsarRecord(std::string mnemonic): 20 | _mnemonic(mnemonic) 21 | { 22 | } 23 | 24 | AlosPalsarRecord::~AlosPalsarRecord() 25 | { 26 | } 27 | 28 | AlosPalsarRecord::AlosPalsarRecord(const AlosPalsarRecord& rhs): 29 | _mnemonic(rhs._mnemonic) 30 | { 31 | } 32 | 33 | } 34 | -------------------------------------------------------------------------------- /cnes/src/AlosPalsar/AlosPalsarRecord.h: -------------------------------------------------------------------------------- 1 | //---------------------------------------------------------------------------- 2 | // 3 | // "Copyright Centre National d'Etudes Spatiales" 4 | // "Copyright Centre for Remote Imaging, Sensing and Processing" 5 | // 6 | // License: LGPL 7 | // 8 | // See LICENSE.txt file in the top level directory for more details. 9 | // 10 | //---------------------------------------------------------------------------- 11 | // $Id$ 12 | 13 | #ifndef AlosPalsarRecord_h 14 | #define AlosPalsarRecord_h 15 | 16 | 17 | #include 18 | #include 19 | 20 | namespace ossimplugins 21 | { 22 | 23 | /** 24 | * @ingroup AlosPalsar 25 | * @brief This class is the base class of all the record classes 26 | */ 27 | class AlosPalsarRecord 28 | { 29 | public: 30 | /** 31 | * @brief Constructor 32 | * @param mnemonic Name of the record 33 | */ 34 | AlosPalsarRecord(std::string mnemonic); 35 | /** 36 | * @brief Destructor 37 | */ 38 | virtual ~AlosPalsarRecord(); 39 | 40 | /** 41 | * @brief Copy constructor 42 | */ 43 | AlosPalsarRecord(const AlosPalsarRecord& rhs); 44 | 45 | /** 46 | * @brief This function is able to create a new instance of the class 47 | */ 48 | virtual AlosPalsarRecord* Instanciate() = 0; 49 | 50 | /** 51 | * @brief This function is able to create a new instance of the class initialised with the data of the calling instance 52 | */ 53 | virtual AlosPalsarRecord* Clone() = 0; 54 | 55 | /** 56 | * @brief Read the class data from a stream 57 | */ 58 | virtual void Read(std::istream& is) = 0; 59 | 60 | /** 61 | * @brief Write the class to a stream 62 | */ 63 | virtual void Write(std::ostream& os) = 0; 64 | 65 | std::string get_mnemonic() 66 | { 67 | return _mnemonic; 68 | }; 69 | 70 | protected: 71 | 72 | std::string _mnemonic; 73 | 74 | private: 75 | }; 76 | } 77 | #endif 78 | -------------------------------------------------------------------------------- /cnes/src/AlosPalsar/AlosPalsarRecordFactory.cpp: -------------------------------------------------------------------------------- 1 | //---------------------------------------------------------------------------- 2 | // 3 | // "Copyright Centre National d'Etudes Spatiales" 4 | // "Copyright Centre for Remote Imaging, Sensing and Processing" 5 | // 6 | // License: LGPL 7 | // 8 | // See LICENSE.txt file in the top level directory for more details. 9 | // 10 | //---------------------------------------------------------------------------- 11 | // $Id$ 12 | 13 | #include 14 | #include 15 | 16 | // Static trace for debugging 17 | static ossimTrace traceDebug("AlosPalsarRecordFactory:debug"); 18 | 19 | namespace ossimplugins 20 | { 21 | 22 | AlosPalsarRecordFactory::AlosPalsarRecordFactory() 23 | { 24 | } 25 | 26 | AlosPalsarRecordFactory::~AlosPalsarRecordFactory() 27 | { 28 | } 29 | 30 | AlosPalsarRecord* AlosPalsarRecordFactory::Instanciate(int id) 31 | { 32 | if (traceDebug()) 33 | { 34 | ossimNotify(ossimNotifyLevel_DEBUG) << "Intanciate AlosPalsar record:" << id << "\n"; 35 | } 36 | AlosPalsarRecord* record = _availableRecords[id]; 37 | if (record == NULL) 38 | { 39 | return NULL; 40 | } 41 | else 42 | { 43 | return record->Instanciate(); 44 | } 45 | } 46 | 47 | void AlosPalsarRecordFactory::RegisterRecord(int id, AlosPalsarRecord * record) 48 | { 49 | _availableRecords[id] = record; 50 | } 51 | 52 | } 53 | -------------------------------------------------------------------------------- /cnes/src/AlosPalsar/AlosPalsarRecordFactory.h: -------------------------------------------------------------------------------- 1 | //---------------------------------------------------------------------------- 2 | // 3 | // "Copyright Centre National d'Etudes Spatiales" 4 | // "Copyright Centre for Remote Imaging, Sensing and Processing" 5 | // 6 | // License: LGPL 7 | // 8 | // See LICENSE.txt file in the top level directory for more details. 9 | // 10 | //---------------------------------------------------------------------------- 11 | // $Id$ 12 | 13 | #ifndef AlosPalsarRecordFactory_h 14 | #define AlosPalsarRecordFactory_h 15 | 16 | 17 | #include 18 | #include 19 | #include 20 | 21 | namespace ossimplugins 22 | { 23 | 24 | /** 25 | * @ingroup AlosPalsar 26 | * @brief This class is a facory able to construct Record base classes given the id of the record wanted 27 | */ 28 | class AlosPalsarRecordFactory 29 | { 30 | public: 31 | /** 32 | * @brief Constructor 33 | */ 34 | AlosPalsarRecordFactory(); 35 | /** 36 | * @brief Destructor 37 | */ 38 | ~AlosPalsarRecordFactory(); 39 | 40 | /** 41 | * @brief Add a new Record type available in this factory 42 | * @param record Record to add in the factory 43 | * @param id Id of the new avalaible Record 44 | */ 45 | void RegisterRecord(int id, AlosPalsarRecord * record); 46 | 47 | /** 48 | * @brief Instanciate a new Record 49 | * @param id Id of the Record we want to instanciate 50 | */ 51 | AlosPalsarRecord* Instanciate(int id) ; 52 | protected: 53 | 54 | /** 55 | * @brief Contain all the available Records for the factory 56 | */ 57 | std::map _availableRecords; 58 | 59 | private: 60 | }; 61 | } 62 | #endif 63 | -------------------------------------------------------------------------------- /cnes/src/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | set(LIB_NAME ossim_cnes_plugin) 2 | MESSAGE( "************** LIBRARY SETUP FOR ossim_cnes_plugin ******************") 3 | 4 | # Include ossim cmake stuff: 5 | include(OssimVersion) 6 | include(OssimCommonVariables) 7 | include(OssimUtilities) 8 | 9 | find_package(TIFF) 10 | INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}) 11 | INCLUDE_DIRECTORIES(${TIFF_INCLUDE_DIR}) 12 | INCLUDE_DIRECTORIES(${GEOTIFF_INCLUDE_DIR}) 13 | 14 | FILE(GLOB_RECURSE OSSIMPLUGIN_SRCS *.cpp) 15 | FILE(GLOB_RECURSE OSSIMPLUGIN_HEADERS *.h) 16 | 17 | #### 18 | # OSSIMPLUGINSMAKINGDLL controls dll linkage on windows. 19 | # Adding this sets OSSIM_PLUGINS_DLL #define TO "__declspec(dllexport)". 20 | ### 21 | add_definitions("-DOSSIMPLUGINSMAKINGDLL") 22 | 23 | # Adjust the install library path: 24 | if(OSSIM_INSTALL_PLUGINS_WITH_VERSION) 25 | set(INSTALL_LIBRARY_DIR "${INSTALL_LIBRARY_DIR}/ossim-${OSSIM_VERSION}/plugins") 26 | else(OSSIM_INSTALL_PLUGINS_WITH_VERSION) 27 | set(INSTALL_LIBRARY_DIR "${INSTALL_LIBRARY_DIR}/ossim/plugins") 28 | endif(OSSIM_INSTALL_PLUGINS_WITH_VERSION) 29 | 30 | if(WIN32) 31 | set(INSTALL_RUNTIME_DIR "${INSTALL_RUNTIME_DIR}/ossim/plugins") 32 | endif() 33 | 34 | OSSIM_LINK_LIBRARY(${LIB_NAME} 35 | COMPONENT_NAME ossim TYPE "${OSSIM_PLUGIN_LINK_TYPE}" 36 | LIBRARIES ${OSSIM_LIBRARY} ${GEOTIFF_LIBRARY} ${TIFF_LIBARY} 37 | HEADERS "${OSSIMPLUGIN_HEADERS}" 38 | SOURCE_FILES "${OSSIMPLUGIN_SRCS}" 39 | INSTALL_LIB) 40 | 41 | 42 | -------------------------------------------------------------------------------- /cnes/src/EnvisatAsar/EnvisatAsarDataFactory.cpp: -------------------------------------------------------------------------------- 1 | //---------------------------------------------------------------------------- 2 | // 3 | // "Copyright Centre National d'Etudes Spatiales" 4 | // 5 | // License: LGPL 6 | // 7 | // See LICENSE.txt file in the top level directory for more details. 8 | // 9 | //---------------------------------------------------------------------------- 10 | // $Id$ 11 | 12 | #include 13 | #include 14 | 15 | #include 16 | #include 17 | #include 18 | #include 19 | #include 20 | #include 21 | #include 22 | #include 23 | #include 24 | 25 | namespace ossimplugins 26 | { 27 | 28 | EnvisatAsarDataFactory::EnvisatAsarDataFactory() 29 | { 30 | RegisterRecord("MPH" , new mph()); 31 | RegisterRecord("SPH" , new sph()); 32 | RegisterRecord("MDS1 SQ ADS " , new SQ_ADSR()); 33 | RegisterRecord("MDS2 SQ ADS " , new SQ_ADSR()); 34 | RegisterRecord("MAIN PROCESSING PARAMS ADS " , new MainProcessingParameters()); 35 | RegisterRecord("DOP CENTROID COEFFS ADS " , new DopplerCentroidParameters()); 36 | RegisterRecord("SR GR ADS " , new SRGRConversionParameters()); 37 | RegisterRecord("CHIRP PARAMS ADS " , new ChirpParameters()); 38 | RegisterRecord("MDS1 ANTENNA ELEV PATT ADS " , new AntennaElevationPatterns()); 39 | RegisterRecord("MDS2 ANTENNA ELEV PATT ADS " , new AntennaElevationPatterns()); 40 | RegisterRecord("GEOLOCATION GRID ADS " , new GeolocationGrid()); 41 | } 42 | 43 | EnvisatAsarDataFactory::~EnvisatAsarDataFactory() 44 | { 45 | 46 | } 47 | 48 | } 49 | 50 | -------------------------------------------------------------------------------- /cnes/src/EnvisatAsar/EnvisatAsarDataFactory.h: -------------------------------------------------------------------------------- 1 | //---------------------------------------------------------------------------- 2 | // 3 | // "Copyright Centre National d'Etudes Spatiales" 4 | // 5 | // License: LGPL 6 | // 7 | // See LICENSE.txt file in the top level directory for more details. 8 | // 9 | //---------------------------------------------------------------------------- 10 | // $Id$ 11 | 12 | #ifndef EnvisatAsarDataFactory_h 13 | #define EnvisatAsarDataFactory_h 14 | 15 | 16 | #include 17 | #include 18 | 19 | namespace ossimplugins 20 | { 21 | /** 22 | * @ingroup EnvisatAsarDataFile 23 | * @brief This class is a factory able to construct Record base classes 24 | */ 25 | class EnvisatAsarDataFactory : public EnvisatAsarRecordFactory 26 | { 27 | public: 28 | /** 29 | * @brief Constructor 30 | */ 31 | EnvisatAsarDataFactory(); 32 | /** 33 | * @brief Destructor 34 | */ 35 | ~EnvisatAsarDataFactory(); 36 | 37 | 38 | protected: 39 | 40 | 41 | private: 42 | }; 43 | } 44 | #endif 45 | -------------------------------------------------------------------------------- /cnes/src/EnvisatAsar/EnvisatAsarRecord.cpp: -------------------------------------------------------------------------------- 1 | //---------------------------------------------------------------------------- 2 | // 3 | // "Copyright Centre National d'Etudes Spatiales" 4 | // 5 | // License: LGPL 6 | // 7 | // See LICENSE.txt file in the top level directory for more details. 8 | // 9 | //---------------------------------------------------------------------------- 10 | // $Id$ 11 | 12 | #include 13 | #include 14 | 15 | namespace ossimplugins 16 | { 17 | EnvisatAsarRecord::EnvisatAsarRecord(std::string mnemonic): 18 | _mnemonic(mnemonic) 19 | { 20 | } 21 | 22 | EnvisatAsarRecord::~EnvisatAsarRecord() 23 | { 24 | } 25 | 26 | EnvisatAsarRecord::EnvisatAsarRecord(const EnvisatAsarRecord& rhs): 27 | _mnemonic(rhs._mnemonic) 28 | { 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /cnes/src/EnvisatAsar/EnvisatAsarRecordFactory.cpp: -------------------------------------------------------------------------------- 1 | //---------------------------------------------------------------------------- 2 | // 3 | // "Copyright Centre National d'Etudes Spatiales" 4 | // 5 | // License: LGPL 6 | // 7 | // See LICENSE.txt file in the top level directory for more details. 8 | // 9 | //---------------------------------------------------------------------------- 10 | // $Id$ 11 | 12 | #include 13 | 14 | namespace ossimplugins 15 | { 16 | EnvisatAsarRecordFactory::EnvisatAsarRecordFactory() 17 | { 18 | } 19 | 20 | EnvisatAsarRecordFactory::~EnvisatAsarRecordFactory() 21 | { 22 | } 23 | 24 | EnvisatAsarRecord* EnvisatAsarRecordFactory::Instanciate(std::string id) 25 | { 26 | EnvisatAsarRecord* record = _availableRecords[id]; 27 | if(record == NULL) 28 | { 29 | return NULL; 30 | } 31 | else 32 | { 33 | return record->Instanciate(); 34 | } 35 | } 36 | 37 | void EnvisatAsarRecordFactory::RegisterRecord(std::string id, EnvisatAsarRecord * record) 38 | { 39 | _availableRecords[id] = record; 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /cnes/src/EnvisatAsar/EnvisatAsarRecordFactory.h: -------------------------------------------------------------------------------- 1 | //---------------------------------------------------------------------------- 2 | // 3 | // "Copyright Centre National d'Etudes Spatiales" 4 | // 5 | // License: LGPL 6 | // 7 | // See LICENSE.txt file in the top level directory for more details. 8 | // 9 | //---------------------------------------------------------------------------- 10 | // $Id$ 11 | 12 | #ifndef EnvisatAsarRecordFactory_h 13 | #define EnvisatAsarRecordFactory_h 14 | 15 | #include 16 | #include 17 | #include 18 | 19 | namespace ossimplugins 20 | { 21 | 22 | /** 23 | * @ingroup EnvisatAsar 24 | * @brief This class is a factory able to construct Record base classes given the id of the record wanted 25 | */ 26 | class EnvisatAsarRecordFactory 27 | { 28 | public: 29 | /** 30 | * @brief Constructor 31 | */ 32 | EnvisatAsarRecordFactory(); 33 | /** 34 | * @brief Destructor 35 | */ 36 | ~EnvisatAsarRecordFactory(); 37 | 38 | /** 39 | * @brief Adds a new Record type available in this factory 40 | * @param record Record to add in the factory 41 | * @param id Id of the new avalaible Record 42 | */ 43 | void RegisterRecord(std::string id, EnvisatAsarRecord * record); 44 | 45 | /** 46 | * @brief Instanciatse a new Record 47 | * @param id Id of the Record we want to instanciate 48 | */ 49 | EnvisatAsarRecord* Instanciate(std::string id); 50 | 51 | protected: 52 | /** 53 | * @brief Contains all the available Records for the factory 54 | */ 55 | std::map _availableRecords; 56 | 57 | private: 58 | }; 59 | } 60 | #endif 61 | -------------------------------------------------------------------------------- /cnes/src/RadarSat/CommonRecord/BeamPixelCountRecord.cpp: -------------------------------------------------------------------------------- 1 | //---------------------------------------------------------------------------- 2 | // 3 | // "Copyright Centre National d'Etudes Spatiales" 4 | // 5 | // License: LGPL 6 | // 7 | // See LICENSE.txt file in the top level directory for more details. 8 | // 9 | //---------------------------------------------------------------------------- 10 | // $Id$ 11 | 12 | #include "BeamPixelCountRecord.h" 13 | 14 | namespace ossimplugins 15 | { 16 | BeamPixelCountRecord::BeamPixelCountRecord() 17 | { 18 | } 19 | 20 | BeamPixelCountRecord::~BeamPixelCountRecord() 21 | { 22 | } 23 | 24 | std::ostream& operator<<(std::ostream& os, const BeamPixelCountRecord& data) 25 | { 26 | os<<"pix_update:"<>(std::istream& is, BeamPixelCountRecord& data) 36 | { 37 | char buf[23]; 38 | buf[22] = '\0'; 39 | 40 | is.read(buf,21); 41 | data._pix_update = buf; 42 | 43 | for (int i=0;i<4;i++) 44 | { 45 | is.read(buf,8); 46 | buf[8] = '\0'; 47 | data._n_pix[i] = atoi(buf); 48 | } 49 | return is; 50 | } 51 | 52 | BeamPixelCountRecord::BeamPixelCountRecord(const BeamPixelCountRecord& rhs): 53 | _pix_update(rhs._pix_update) 54 | { 55 | for (int i=0;i<4;i++) 56 | { 57 | _n_pix[i] = rhs._n_pix[i]; 58 | } 59 | } 60 | 61 | BeamPixelCountRecord& BeamPixelCountRecord::operator=(const BeamPixelCountRecord& rhs) 62 | { 63 | _pix_update = rhs._pix_update; 64 | for (int i=0;i<4;i++) 65 | { 66 | _n_pix[i] = rhs._n_pix[i]; 67 | } 68 | return *this; 69 | } 70 | } 71 | -------------------------------------------------------------------------------- /cnes/src/RadarSat/CommonRecord/MisregistrationRecord.cpp: -------------------------------------------------------------------------------- 1 | //---------------------------------------------------------------------------- 2 | // 3 | // "Copyright Centre National d'Etudes Spatiales" 4 | // 5 | // License: LGPL 6 | // 7 | // See LICENSE.txt file in the top level directory for more details. 8 | // 9 | //---------------------------------------------------------------------------- 10 | // $Id$ 11 | 12 | #include "MisregistrationRecord.h" 13 | 14 | namespace ossimplugins 15 | { 16 | MisregistrationRecord::MisregistrationRecord() 17 | { 18 | } 19 | 20 | MisregistrationRecord::~MisregistrationRecord() 21 | { 22 | } 23 | 24 | std::ostream& operator<<(std::ostream& os, const MisregistrationRecord& data) 25 | { 26 | os<<"alt_m:"<>(std::istream& is, MisregistrationRecord& data) 32 | { 33 | char buf16[17]; 34 | buf16[16] = '\0'; 35 | 36 | is.read(buf16,16); 37 | data._alt_m = atof(buf16); 38 | 39 | is.read(buf16,16); 40 | data._crt_m = atof(buf16); 41 | return is; 42 | } 43 | 44 | MisregistrationRecord::MisregistrationRecord(const MisregistrationRecord& rhs): 45 | _alt_m(rhs._alt_m), 46 | _crt_m(rhs._crt_m) 47 | { 48 | } 49 | 50 | MisregistrationRecord& MisregistrationRecord::operator=(const MisregistrationRecord& rhs) 51 | { 52 | _alt_m = rhs._alt_m; 53 | _crt_m = rhs._crt_m; 54 | return *this; 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /cnes/src/RadarSat/CommonRecord/RadiometryUncertaintyRecord.cpp: -------------------------------------------------------------------------------- 1 | //---------------------------------------------------------------------------- 2 | // 3 | // "Copyright Centre National d'Etudes Spatiales" 4 | // 5 | // License: LGPL 6 | // 7 | // See LICENSE.txt file in the top level directory for more details. 8 | // 9 | //---------------------------------------------------------------------------- 10 | // $Id$ 11 | 12 | #include "RadiometryUncertaintyRecord.h" 13 | 14 | namespace ossimplugins 15 | { 16 | RadiometryUncertaintyRecord::RadiometryUncertaintyRecord() 17 | { 18 | } 19 | 20 | RadiometryUncertaintyRecord::~RadiometryUncertaintyRecord() 21 | { 22 | } 23 | 24 | std::ostream& operator<<(std::ostream& os, const RadiometryUncertaintyRecord& data) 25 | { 26 | os<<"db:"<>(std::istream& is, RadiometryUncertaintyRecord& data) 32 | { 33 | char buf16[17]; 34 | buf16[16] = '\0'; 35 | 36 | is.read(buf16,16); 37 | data._db = atof(buf16); 38 | 39 | is.read(buf16,16); 40 | data._deg = atof(buf16); 41 | return is; 42 | } 43 | 44 | RadiometryUncertaintyRecord::RadiometryUncertaintyRecord(const RadiometryUncertaintyRecord& rhs): 45 | _db(rhs._db), 46 | _deg(rhs._deg) 47 | { 48 | } 49 | 50 | RadiometryUncertaintyRecord& RadiometryUncertaintyRecord::operator=(const RadiometryUncertaintyRecord& rhs) 51 | { 52 | _db = rhs._db; 53 | _deg = rhs._deg; 54 | return *this; 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /cnes/src/RadarSat/CommonRecord/SRGRCoefficientSetRecord.cpp: -------------------------------------------------------------------------------- 1 | //---------------------------------------------------------------------------- 2 | // 3 | // "Copyright Centre National d'Etudes Spatiales" 4 | // 5 | // License: LGPL 6 | // 7 | // See LICENSE.txt file in the top level directory for more details. 8 | // 9 | //---------------------------------------------------------------------------- 10 | // $Id$ 11 | 12 | #include "SRGRCoefficientSetRecord.h" 13 | 14 | namespace ossimplugins 15 | { 16 | SRGRCoefficientSetRecord::SRGRCoefficientSetRecord() 17 | { 18 | } 19 | 20 | SRGRCoefficientSetRecord::~SRGRCoefficientSetRecord() 21 | { 22 | } 23 | 24 | std::ostream& operator<<(std::ostream& os, const SRGRCoefficientSetRecord& data) 25 | { 26 | os<<"srgr_update:"<>(std::istream& is, SRGRCoefficientSetRecord& data) 36 | { 37 | char buf[22]; 38 | buf[21] = '\0'; 39 | 40 | is.read(buf,21); 41 | buf[21] = '\0'; 42 | data._srgr_update = buf; 43 | 44 | for (int i=0;i<6;i++) 45 | { 46 | is.read(buf,16); 47 | buf[16] = '\0'; 48 | data._srgr_coef[i] = atof(buf); 49 | } 50 | return is; 51 | } 52 | 53 | SRGRCoefficientSetRecord::SRGRCoefficientSetRecord(const SRGRCoefficientSetRecord& rhs): 54 | _srgr_update(rhs._srgr_update) 55 | { 56 | for (int i=0;i<6;i++) 57 | { 58 | _srgr_coef[i] = rhs._srgr_coef[i]; 59 | } 60 | } 61 | 62 | SRGRCoefficientSetRecord& SRGRCoefficientSetRecord::operator=(const SRGRCoefficientSetRecord& rhs) 63 | { 64 | _srgr_update = rhs._srgr_update; 65 | for (int i=0;i<6;i++) 66 | { 67 | _srgr_coef[i] = rhs._srgr_coef[i]; 68 | } 69 | return *this; 70 | } 71 | } 72 | -------------------------------------------------------------------------------- /cnes/src/RadarSat/CommonRecord/TemperatureSettingsRecord.cpp: -------------------------------------------------------------------------------- 1 | //---------------------------------------------------------------------------- 2 | // 3 | // "Copyright Centre National d'Etudes Spatiales" 4 | // 5 | // License: LGPL 6 | // 7 | // See LICENSE.txt file in the top level directory for more details. 8 | // 9 | //---------------------------------------------------------------------------- 10 | // $Id$ 11 | 12 | #include "TemperatureSettingsRecord.h" 13 | 14 | namespace ossimplugins 15 | { 16 | TemperatureSettingsRecord::TemperatureSettingsRecord() 17 | { 18 | } 19 | 20 | TemperatureSettingsRecord::~TemperatureSettingsRecord() 21 | { 22 | } 23 | 24 | std::ostream& operator<<(std::ostream& os, const TemperatureSettingsRecord& data) 25 | { 26 | for (int i=0;i<4;i++) 27 | { 28 | os<<"temp_set["<>(std::istream& is, TemperatureSettingsRecord& data) 35 | { 36 | char buf[5]; 37 | buf[4] = '\0'; 38 | 39 | for (int i=0;i<4;i++) 40 | { 41 | is.read(buf,4); 42 | buf[4] = '\0'; 43 | data._temp_set[i] = atoi(buf); 44 | } 45 | return is; 46 | } 47 | 48 | TemperatureSettingsRecord::TemperatureSettingsRecord(const TemperatureSettingsRecord& rhs) 49 | { 50 | for (int i=0;i<4;i++) 51 | { 52 | _temp_set[i] = rhs._temp_set[i]; 53 | } 54 | } 55 | 56 | TemperatureSettingsRecord& TemperatureSettingsRecord::operator=(const TemperatureSettingsRecord& rhs) 57 | { 58 | for (int i=0;i<4;i++) 59 | { 60 | _temp_set[i] = rhs._temp_set[i]; 61 | } 62 | return *this; 63 | } 64 | } 65 | -------------------------------------------------------------------------------- /cnes/src/RadarSat/CommonRecord/TemperatureSettingsRecord.h: -------------------------------------------------------------------------------- 1 | //---------------------------------------------------------------------------- 2 | // 3 | // "Copyright Centre National d'Etudes Spatiales" 4 | // 5 | // License: LGPL 6 | // 7 | // See LICENSE.txt file in the top level directory for more details. 8 | // 9 | //---------------------------------------------------------------------------- 10 | // $Id$ 11 | 12 | #ifndef TemperatureSettingsRecord_h 13 | #define TemperatureSettingsRecord_h 14 | 15 | #include 16 | #include 17 | 18 | namespace ossimplugins 19 | { 20 | /** 21 | * @ingroup ProcessingParametersRecord 22 | * @brief This class is able to read a Temperature Settings record 23 | */ 24 | class TemperatureSettingsRecord 25 | { 26 | public: 27 | /** 28 | * @brief Constructor 29 | */ 30 | TemperatureSettingsRecord(); 31 | 32 | /** 33 | * @brief Destructor 34 | */ 35 | ~TemperatureSettingsRecord(); 36 | 37 | /** 38 | * @brief Copy constructor 39 | */ 40 | TemperatureSettingsRecord(const TemperatureSettingsRecord& rhs); 41 | 42 | /** 43 | * @brief Copy operator 44 | */ 45 | TemperatureSettingsRecord& operator=(const TemperatureSettingsRecord& rhs); 46 | 47 | /** 48 | * @brief This function writes the TemperatureSettingsRecord in a stream 49 | */ 50 | friend std::ostream& operator<<(std::ostream& os, const TemperatureSettingsRecord& data); 51 | 52 | /** 53 | * @brief This function reads a TemperatureSettingsRecord from a stream 54 | */ 55 | friend std::istream& operator>>(std::istream& is, TemperatureSettingsRecord& data); 56 | 57 | /** 58 | * @brief Temperature settings 59 | */ 60 | int* get_temp_set() 61 | { 62 | return _temp_set; 63 | }; 64 | 65 | protected: 66 | 67 | /** 68 | * @brief Temperature settings 69 | */ 70 | int _temp_set[4]; 71 | private: 72 | 73 | }; 74 | } 75 | #endif 76 | -------------------------------------------------------------------------------- /cnes/src/RadarSat/Data/DataFactory.cpp: -------------------------------------------------------------------------------- 1 | //---------------------------------------------------------------------------- 2 | // 3 | // "Copyright Centre National d'Etudes Spatiales" 4 | // 5 | // License: LGPL 6 | // 7 | // See LICENSE.txt file in the top level directory for more details. 8 | // 9 | //---------------------------------------------------------------------------- 10 | // $Id$ 11 | 12 | #include 13 | 14 | #include 15 | #include 16 | 17 | namespace ossimplugins 18 | { 19 | 20 | DataFactory::DataFactory() 21 | { 22 | RegisterRecord(1, new ImageOptionsFileDescriptor()); 23 | RegisterRecord(2, new ProcessedDataRecord()); 24 | } 25 | 26 | DataFactory::~DataFactory() 27 | { 28 | std::map::iterator i = _availableRecords.begin(); 29 | 30 | while (i != _availableRecords.end()) 31 | { 32 | if ( (*i).second ) 33 | { 34 | delete (*i).second; 35 | (*i).second = 0; 36 | } 37 | ++i; 38 | } 39 | _availableRecords.clear(); 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /cnes/src/RadarSat/Data/DataFactory.h: -------------------------------------------------------------------------------- 1 | //---------------------------------------------------------------------------- 2 | // 3 | // "Copyright Centre National d'Etudes Spatiales" 4 | // 5 | // License: LGPL 6 | // 7 | // See LICENSE.txt file in the top level directory for more details. 8 | // 9 | //---------------------------------------------------------------------------- 10 | // $Id$ 11 | 12 | #ifndef DataFactory_h 13 | #define DataFactory_h 14 | 15 | #include 16 | #include 17 | 18 | namespace ossimplugins 19 | { 20 | 21 | /** 22 | * @ingroup DataFile 23 | * @brief This class is a factory able to construct Record base classes 24 | */ 25 | class DataFactory : public RadarSatRecordFactory 26 | { 27 | public: 28 | /** 29 | * @brief Contstructor 30 | */ 31 | DataFactory(); 32 | /** 33 | * @brief Destructor 34 | */ 35 | ~DataFactory(); 36 | 37 | protected: 38 | private: 39 | }; 40 | } 41 | #endif 42 | -------------------------------------------------------------------------------- /cnes/src/RadarSat/Leader/LeaderFactory.h: -------------------------------------------------------------------------------- 1 | //---------------------------------------------------------------------------- 2 | // 3 | // "Copyright Centre National d'Etudes Spatiales" 4 | // 5 | // License: LGPL 6 | // 7 | // See LICENSE.txt file in the top level directory for more details. 8 | // 9 | //---------------------------------------------------------------------------- 10 | // $Id$ 11 | 12 | #ifndef LeaderFactory_h 13 | #define LeaderFactory_h 14 | 15 | 16 | #include 17 | #include 18 | 19 | namespace ossimplugins 20 | { 21 | /** 22 | * @ingroup LeaderFile 23 | * @brief This class is a factory able to construct Record base classes 24 | */ 25 | class LeaderFactory : public RadarSatRecordFactory 26 | { 27 | public: 28 | /** 29 | * @brief Contstructor 30 | */ 31 | LeaderFactory(); 32 | /** 33 | * @brief Destructor 34 | */ 35 | ~LeaderFactory(); 36 | 37 | 38 | protected: 39 | 40 | 41 | private: 42 | }; 43 | } 44 | #endif 45 | -------------------------------------------------------------------------------- /cnes/src/RadarSat/Leader/PositionVectorRecord.cpp: -------------------------------------------------------------------------------- 1 | //---------------------------------------------------------------------------- 2 | // 3 | // "Copyright Centre National d'Etudes Spatiales" 4 | // 5 | // License: LGPL 6 | // 7 | // See LICENSE.txt file in the top level directory for more details. 8 | // 9 | //---------------------------------------------------------------------------- 10 | // $Id$ 11 | 12 | #include 13 | 14 | namespace ossimplugins 15 | { 16 | PositionVectorRecord::PositionVectorRecord() 17 | { 18 | } 19 | 20 | PositionVectorRecord::~PositionVectorRecord() 21 | { 22 | } 23 | 24 | std::ostream& operator<<(std::ostream& os, const PositionVectorRecord& data) 25 | { 26 | for (int i=0;i<3;i++) 27 | { 28 | os<<"pos["<>(std::istream& is, PositionVectorRecord& data) 39 | { 40 | char buf[23]; 41 | buf[22] = '\0'; 42 | 43 | for (int i=0;i<3;i++) 44 | { 45 | is.read(buf,22); 46 | data._pos[i] = atof(buf); 47 | } 48 | 49 | for (int i=0;i<3;i++) 50 | { 51 | is.read(buf,22); 52 | data._vel[i] = atof(buf); 53 | } 54 | return is; 55 | } 56 | 57 | PositionVectorRecord::PositionVectorRecord(const PositionVectorRecord& rhs) 58 | { 59 | for (int i=0;i<3;i++) 60 | { 61 | _pos[i] = rhs._pos[i]; 62 | } 63 | 64 | for (int i=0;i<3;i++) 65 | { 66 | _vel[i] = rhs._vel[i]; 67 | } 68 | } 69 | 70 | PositionVectorRecord& PositionVectorRecord::operator=(const PositionVectorRecord& rhs) 71 | { 72 | for (int i=0;i<3;i++) 73 | { 74 | _pos[i] = rhs._pos[i]; 75 | } 76 | 77 | for (int i=0;i<3;i++) 78 | { 79 | _vel[i] = rhs._vel[i]; 80 | } 81 | return *this; 82 | } 83 | } 84 | -------------------------------------------------------------------------------- /cnes/src/RadarSat/RadarSatRecord.cpp: -------------------------------------------------------------------------------- 1 | //---------------------------------------------------------------------------- 2 | // 3 | // "Copyright Centre National d'Etudes Spatiales" 4 | // 5 | // License: LGPL 6 | // 7 | // See LICENSE.txt file in the top level directory for more details. 8 | // 9 | //---------------------------------------------------------------------------- 10 | // $Id$ 11 | 12 | #include 13 | #include 14 | 15 | namespace ossimplugins 16 | { 17 | RadarSatRecord::RadarSatRecord(std::string mnemonic): 18 | _mnemonic(mnemonic) 19 | { 20 | } 21 | 22 | RadarSatRecord::~RadarSatRecord() 23 | { 24 | } 25 | 26 | RadarSatRecord::RadarSatRecord(const RadarSatRecord& rhs): 27 | _mnemonic(rhs._mnemonic) 28 | { 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /cnes/src/RadarSat/RadarSatRecord.h: -------------------------------------------------------------------------------- 1 | //---------------------------------------------------------------------------- 2 | // 3 | // "Copyright Centre National d'Etudes Spatiales" 4 | // 5 | // License: LGPL 6 | // 7 | // See LICENSE.txt file in the top level directory for more details. 8 | // 9 | //---------------------------------------------------------------------------- 10 | // $Id$ 11 | 12 | #ifndef RadarSatRecord_h 13 | #define RadarSatRecord_h 14 | 15 | 16 | #include 17 | #include 18 | #include 19 | 20 | namespace ossimplugins 21 | { 22 | /** 23 | * @ingroup RadarSat 24 | * @brief This class is the base class of all the record classes 25 | */ 26 | class RadarSatRecord 27 | { 28 | public: 29 | /** 30 | * @brief Constructor 31 | * @param mnemonic Name of the record 32 | */ 33 | RadarSatRecord(std::string mnemonic); 34 | /** 35 | * @brief Destructor 36 | */ 37 | virtual ~RadarSatRecord(); 38 | 39 | /** 40 | * @brief Copy constructor 41 | */ 42 | RadarSatRecord(const RadarSatRecord& rhs); 43 | 44 | /** 45 | * @brief This function is able to create a new instance of the class 46 | */ 47 | virtual RadarSatRecord* Instanciate() =0; 48 | 49 | /** 50 | * @brief This function is able to create a new instance of the class initialised with the data of the calling instance 51 | */ 52 | virtual RadarSatRecord* Clone()=0; 53 | 54 | /** 55 | * @brief Reads the class data from a stream 56 | */ 57 | virtual void Read(std::istream& is) =0; 58 | 59 | /** 60 | * @brief Writes the class to a stream 61 | */ 62 | virtual void Write(std::ostream& os)=0; 63 | 64 | std::string get_mnemonic() 65 | { 66 | return _mnemonic; 67 | }; 68 | 69 | protected: 70 | 71 | std::string _mnemonic; 72 | 73 | private: 74 | }; 75 | } 76 | #endif 77 | -------------------------------------------------------------------------------- /cnes/src/RadarSat/RadarSatRecordFactory.cpp: -------------------------------------------------------------------------------- 1 | //---------------------------------------------------------------------------- 2 | // 3 | // "Copyright Centre National d'Etudes Spatiales" 4 | // 5 | // License: LGPL 6 | // 7 | // See LICENSE.txt file in the top level directory for more details. 8 | // 9 | //---------------------------------------------------------------------------- 10 | // $Id$ 11 | 12 | #include 13 | 14 | namespace ossimplugins 15 | { 16 | RadarSatRecordFactory::RadarSatRecordFactory() 17 | { 18 | } 19 | 20 | RadarSatRecordFactory::~RadarSatRecordFactory() 21 | { 22 | } 23 | 24 | RadarSatRecord* RadarSatRecordFactory::Instanciate(int id) 25 | { 26 | RadarSatRecord* record = _availableRecords[id]; 27 | if(record == NULL) 28 | { 29 | return NULL; 30 | } 31 | else 32 | { 33 | return record->Instanciate(); 34 | } 35 | } 36 | 37 | void RadarSatRecordFactory::RegisterRecord(int id, RadarSatRecord * record) 38 | { 39 | _availableRecords[id] = record; 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /cnes/src/RadarSat/RadarSatRecordFactory.h: -------------------------------------------------------------------------------- 1 | //---------------------------------------------------------------------------- 2 | // 3 | // "Copyright Centre National d'Etudes Spatiales" 4 | // 5 | // License: LGPL 6 | // 7 | // See LICENSE.txt file in the top level directory for more details. 8 | // 9 | //---------------------------------------------------------------------------- 10 | // $Id$ 11 | 12 | #ifndef RadarSatRecordFactory_h 13 | #define RadarSatRecordFactory_h 14 | 15 | 16 | #include 17 | #include 18 | #include 19 | 20 | namespace ossimplugins 21 | { 22 | /** 23 | * @ingroup RadarSat 24 | * @brief This class is a factory able to construct Record base classes given the id of the wanted record 25 | */ 26 | class RadarSatRecordFactory 27 | { 28 | public: 29 | /** 30 | * @brief Constructor 31 | */ 32 | RadarSatRecordFactory(); 33 | /** 34 | * @brief Destructor 35 | */ 36 | ~RadarSatRecordFactory(); 37 | 38 | /** 39 | * @brief Add a new Record type available in this factory 40 | * @param record Record to add in the factory 41 | * @param id Id of the new available Record 42 | */ 43 | void RegisterRecord(int id, RadarSatRecord * record); 44 | 45 | /** 46 | * @brief Instanciates a new Record 47 | * @param id Id of the Record we want to instanciate 48 | */ 49 | RadarSatRecord* Instanciate(int id) ; 50 | protected: 51 | 52 | /** 53 | * @brief Contains all the available Records for the factory 54 | */ 55 | std::map _availableRecords; 56 | 57 | private: 58 | }; 59 | } 60 | #endif 61 | -------------------------------------------------------------------------------- /cnes/src/RadarSat/Trailer/TrailerFactory.cpp: -------------------------------------------------------------------------------- 1 | //---------------------------------------------------------------------------- 2 | // 3 | // "Copyright Centre National d'Etudes Spatiales" 4 | // 5 | // License: LGPL 6 | // 7 | // See LICENSE.txt file in the top level directory for more details. 8 | // 9 | //---------------------------------------------------------------------------- 10 | // $Id$ 11 | 12 | #include 13 | 14 | #include 15 | #include 16 | #include 17 | #include 18 | #include 19 | #include 20 | #include 21 | #include 22 | #include 23 | 24 | namespace ossimplugins 25 | { 26 | TrailerFactory::TrailerFactory() 27 | { 28 | RegisterRecord(8, new RadiometricData()); 29 | RegisterRecord(9, new RadiometricCompensationData()); 30 | RegisterRecord(7, new AttitudeData()); 31 | RegisterRecord(6, new ProcessingParameters()); 32 | RegisterRecord(5, new DataHistogramProcessedData8()); 33 | RegisterRecord(4, new DataHistogramSignalData()); 34 | RegisterRecord(3, new DataQuality()); 35 | RegisterRecord(2, new DataSetSummary()); 36 | RegisterRecord(1, new FileDescriptor()); 37 | } 38 | 39 | TrailerFactory::~TrailerFactory() 40 | { 41 | 42 | std::map::iterator i = _availableRecords.begin(); 43 | 44 | while (i != _availableRecords.end()) 45 | { 46 | if ( (*i).second ) 47 | { 48 | delete (*i).second; 49 | (*i).second = 0; 50 | } 51 | ++i; 52 | } 53 | _availableRecords.clear(); 54 | 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /cnes/src/RadarSat/Trailer/TrailerFactory.h: -------------------------------------------------------------------------------- 1 | //---------------------------------------------------------------------------- 2 | // 3 | // "Copyright Centre National d'Etudes Spatiales" 4 | // 5 | // License: LGPL 6 | // 7 | // See LICENSE.txt file in the top level directory for more details. 8 | // 9 | //---------------------------------------------------------------------------- 10 | // $Id$ 11 | 12 | #ifndef TrailerFactory_h 13 | #define TrailerFactory_h 14 | 15 | 16 | #include 17 | #include 18 | 19 | namespace ossimplugins 20 | { 21 | /** 22 | * @ingroup TrailerFile 23 | * @brief This class is a factory able to construct Record base classes 24 | */ 25 | class TrailerFactory : public RadarSatRecordFactory 26 | { 27 | public: 28 | /** 29 | * @brief Contstructor 30 | */ 31 | TrailerFactory(); 32 | /** 33 | * @brief Destructor 34 | */ 35 | ~TrailerFactory(); 36 | 37 | 38 | protected: 39 | 40 | 41 | private: 42 | }; 43 | } 44 | #endif 45 | -------------------------------------------------------------------------------- /cnes/src/RadarSat/VolumeDir/VolumeDirFactory.cpp: -------------------------------------------------------------------------------- 1 | //---------------------------------------------------------------------------- 2 | // 3 | // "Copyright Centre National d'Etudes Spatiales" 4 | // 5 | // License: LGPL 6 | // 7 | // See LICENSE.txt file in the top level directory for more details. 8 | // 9 | //---------------------------------------------------------------------------- 10 | // $Id$ 11 | 12 | #include 13 | 14 | #include 15 | #include 16 | #include 17 | 18 | 19 | namespace ossimplugins 20 | { 21 | VolumeDirFactory::VolumeDirFactory() 22 | { 23 | RegisterRecord(1, new VolumeDescriptorRecord()); 24 | RegisterRecord(2, new SARLeaderFilePointerRecord()); 25 | RegisterRecord(3, new ImageOptionsFilePointerRecord()); 26 | RegisterRecord(4, new SARTrailerFilePointerRecord()); 27 | RegisterRecord(5, new TextRecord()); 28 | } 29 | 30 | VolumeDirFactory::~VolumeDirFactory() 31 | { 32 | 33 | std::map::iterator i = _availableRecords.begin(); 34 | 35 | while (i != _availableRecords.end()) 36 | { 37 | if ( (*i).second ) 38 | { 39 | delete (*i).second; 40 | (*i).second = 0; 41 | } 42 | ++i; 43 | } 44 | _availableRecords.clear(); 45 | 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /cnes/src/RadarSat/VolumeDir/VolumeDirFactory.h: -------------------------------------------------------------------------------- 1 | //---------------------------------------------------------------------------- 2 | // 3 | // "Copyright Centre National d'Etudes Spatiales" 4 | // 5 | // License: LGPL 6 | // 7 | // See LICENSE.txt file in the top level directory for more details. 8 | // 9 | //---------------------------------------------------------------------------- 10 | // $Id$ 11 | 12 | #ifndef VolumeDirFactory_h 13 | #define VolumeDirFactory_h 14 | 15 | 16 | #include 17 | #include 18 | 19 | namespace ossimplugins 20 | { 21 | /** 22 | * @ingroup VolumeDirFile 23 | * @brief This class is a factory able to construct Record base classes 24 | */ 25 | class VolumeDirFactory : public RadarSatRecordFactory 26 | { 27 | public: 28 | /** 29 | * @brief Contstructor 30 | */ 31 | VolumeDirFactory(); 32 | /** 33 | * @brief Destructor 34 | */ 35 | ~VolumeDirFactory(); 36 | 37 | 38 | protected: 39 | 40 | 41 | private: 42 | }; 43 | } 44 | #endif 45 | -------------------------------------------------------------------------------- /cnes/src/erssar/ErsSarLeaderFactory.cpp: -------------------------------------------------------------------------------- 1 | //---------------------------------------------------------------------------- 2 | // 3 | // "Copyright Centre National d'Etudes Spatiales" 4 | // 5 | // License: LGPL 6 | // 7 | // See LICENSE.txt file in the top level directory for more details. 8 | // 9 | //---------------------------------------------------------------------------- 10 | // $Id$ 11 | 12 | #include "erssar/ErsSarLeaderFactory.h" 13 | 14 | #include "erssar/ErsSarDataSetSummary.h" 15 | #include "erssar/ErsSarFileDescriptor.h" 16 | #include "erssar/ErsSarMapProjectionData.h" 17 | #include "erssar/ErsSarPlatformPositionData.h" 18 | #include "erssar/ErsSarFacilityData.h" 19 | 20 | namespace ossimplugins 21 | { 22 | 23 | ErsSarLeaderFactory::ErsSarLeaderFactory() 24 | { 25 | RegisterRecord(5, new ErsSarFacilityData()); 26 | RegisterRecord(4, new ErsSarPlatformPositionData()); 27 | RegisterRecord(3, new ErsSarMapProjectionData()); 28 | RegisterRecord(2, new ErsSarDataSetSummary()); 29 | RegisterRecord(1, new ErsSarFileDescriptor()); 30 | } 31 | 32 | ErsSarLeaderFactory::~ErsSarLeaderFactory() 33 | { 34 | std::map::iterator i = _availableRecords.begin(); 35 | 36 | while (i != _availableRecords.end()) 37 | { 38 | if ((*i).second) 39 | { 40 | delete(*i).second; 41 | (*i).second = 0; 42 | } 43 | ++i; 44 | } 45 | _availableRecords.clear(); 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /cnes/src/erssar/ErsSarLeaderFactory.h: -------------------------------------------------------------------------------- 1 | //---------------------------------------------------------------------------- 2 | // 3 | // "Copyright Centre National d'Etudes Spatiales" 4 | // 5 | // License: LGPL 6 | // 7 | // See LICENSE.txt file in the top level directory for more details. 8 | // 9 | //---------------------------------------------------------------------------- 10 | // $Id$ 11 | 12 | #ifndef ErsSarLeaderFactory_h 13 | #define ErsSarLeaderFactory_h 14 | 15 | 16 | #include "erssar/ErsSarRecordFactory.h" 17 | #include 18 | 19 | 20 | namespace ossimplugins 21 | { 22 | 23 | /** 24 | * @ingroup ErsSarLeaderFile 25 | * @brief This class is a facory able to construct Record base classes 26 | * 27 | */ 28 | class ErsSarLeaderFactory : public ErsSarRecordFactory 29 | { 30 | public: 31 | /** 32 | * @brief Contstructor 33 | */ 34 | ErsSarLeaderFactory(); 35 | /** 36 | * @brief Destructor 37 | */ 38 | virtual ~ErsSarLeaderFactory(); 39 | 40 | 41 | protected: 42 | 43 | 44 | private: 45 | }; 46 | } 47 | 48 | #endif 49 | -------------------------------------------------------------------------------- /cnes/src/erssar/ErsSarRecord.cpp: -------------------------------------------------------------------------------- 1 | //---------------------------------------------------------------------------- 2 | // 3 | // "Copyright Centre National d'Etudes Spatiales" 4 | // 5 | // License: LGPL 6 | // 7 | // See LICENSE.txt file in the top level directory for more details. 8 | // 9 | //---------------------------------------------------------------------------- 10 | // $Id$ 11 | 12 | #include "erssar/ErsSarRecord.h" 13 | #include 14 | 15 | namespace ossimplugins 16 | { 17 | 18 | ErsSarRecord::ErsSarRecord(std::string mnemonic): 19 | _mnemonic(mnemonic) 20 | { 21 | } 22 | 23 | ErsSarRecord::~ErsSarRecord() 24 | { 25 | } 26 | 27 | ErsSarRecord::ErsSarRecord(const ErsSarRecord& rhs): 28 | _mnemonic(rhs._mnemonic) 29 | { 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /cnes/src/erssar/ErsSarRecord.h: -------------------------------------------------------------------------------- 1 | //---------------------------------------------------------------------------- 2 | // 3 | // "Copyright Centre National d'Etudes Spatiales" 4 | // 5 | // License: LGPL 6 | // 7 | // See LICENSE.txt file in the top level directory for more details. 8 | // 9 | //---------------------------------------------------------------------------- 10 | // $Id$ 11 | 12 | #ifndef ErsSarRecord_h 13 | #define ErsSarRecord_h 14 | 15 | 16 | #include "erssar/ErsSarRecordHeader.h" 17 | #include 18 | 19 | namespace ossimplugins 20 | { 21 | 22 | /** 23 | * @ingroup ErsSar 24 | * @brief This class is the base class of all the record classes 25 | * 26 | */ 27 | class ErsSarRecord 28 | { 29 | public: 30 | /** 31 | * @brief Constructor 32 | * @param mnemonic Name of the record 33 | */ 34 | ErsSarRecord(std::string mnemonic); 35 | /** 36 | * @brief Destructor 37 | */ 38 | virtual ~ErsSarRecord(); 39 | 40 | /** 41 | * @brief Copy constructor 42 | */ 43 | ErsSarRecord(const ErsSarRecord& rhs); 44 | 45 | /** 46 | * @brief This function is able to create a new instance of the class 47 | */ 48 | virtual ErsSarRecord* Instanciate() = 0; 49 | 50 | /** 51 | * @brief This function is able to create a new instance of the class initialised with the data of the calling instance 52 | */ 53 | virtual ErsSarRecord* Clone() = 0; 54 | 55 | /** 56 | * @brief Read the class data from a stream 57 | */ 58 | virtual void Read(std::istream& is) = 0; 59 | 60 | /** 61 | * @brief Write the class to a stream 62 | */ 63 | virtual void Write(std::ostream& os) = 0; 64 | 65 | std::string get_mnemonic() 66 | { 67 | return _mnemonic; 68 | }; 69 | 70 | protected: 71 | 72 | std::string _mnemonic; 73 | 74 | private: 75 | }; 76 | } 77 | 78 | #endif 79 | -------------------------------------------------------------------------------- /cnes/src/erssar/ErsSarRecordFactory.cpp: -------------------------------------------------------------------------------- 1 | //---------------------------------------------------------------------------- 2 | // 3 | // "Copyright Centre National d'Etudes Spatiales" 4 | // 5 | // License: LGPL 6 | // 7 | // See LICENSE.txt file in the top level directory for more details. 8 | // 9 | //---------------------------------------------------------------------------- 10 | // $Id$ 11 | 12 | #include "erssar/ErsSarRecordFactory.h" 13 | 14 | namespace ossimplugins 15 | { 16 | 17 | ErsSarRecordFactory::ErsSarRecordFactory() 18 | { 19 | } 20 | 21 | ErsSarRecordFactory::~ErsSarRecordFactory() 22 | { 23 | } 24 | 25 | ErsSarRecord* ErsSarRecordFactory::Instanciate(int id) 26 | { 27 | ErsSarRecord* record = _availableRecords[id]; 28 | if (record == NULL) 29 | { 30 | return NULL; 31 | } 32 | else 33 | { 34 | return record->Instanciate(); 35 | } 36 | } 37 | 38 | void ErsSarRecordFactory::RegisterRecord(int id, ErsSarRecord * record) 39 | { 40 | _availableRecords[id] = record; 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /cnes/src/erssar/ErsSarRecordFactory.h: -------------------------------------------------------------------------------- 1 | //---------------------------------------------------------------------------- 2 | // 3 | // "Copyright Centre National d'Etudes Spatiales" 4 | // 5 | // License: LGPL 6 | // 7 | // See LICENSE.txt file in the top level directory for more details. 8 | // 9 | //---------------------------------------------------------------------------- 10 | // $Id$ 11 | 12 | #ifndef ErsSarRecordFactory_h 13 | #define ErsSarRecordFactory_h 14 | 15 | 16 | #include "erssar/ErsSarRecordHeader.h" 17 | #include "erssar/ErsSarRecord.h" 18 | 19 | #include 20 | 21 | 22 | namespace ossimplugins 23 | { 24 | 25 | 26 | /** 27 | * @ingroup ErsSar 28 | * @brief This class is a facory able to construct Record base classes given the id of the record wanted 29 | * 30 | */ 31 | class ErsSarRecordFactory 32 | { 33 | public: 34 | /** 35 | * @brief Constructor 36 | */ 37 | ErsSarRecordFactory(); 38 | /** 39 | * @brief Destructor 40 | */ 41 | virtual ~ErsSarRecordFactory(); 42 | 43 | /** 44 | * @brief Add a new Record type available in this factory 45 | * @param record Record to add in the factory 46 | * @param id Id of the new avalaible Record 47 | */ 48 | void RegisterRecord(int id, ErsSarRecord * record); 49 | 50 | /** 51 | * @brief Instanciate a new Record 52 | * @param id Id of the Record we want to instanciate 53 | */ 54 | ErsSarRecord* Instanciate(int id) ; 55 | protected: 56 | 57 | /** 58 | * @brief Contain all the available Records for the factory 59 | */ 60 | std::map _availableRecords; 61 | 62 | private: 63 | }; 64 | } 65 | 66 | #endif 67 | -------------------------------------------------------------------------------- /cnes/src/otb/Arithmetic.h: -------------------------------------------------------------------------------- 1 | //---------------------------------------------------------------------------- 2 | // 3 | // "Copyright Centre National d'Etudes Spatiales" 4 | // 5 | // License: LGPL 6 | // 7 | // See LICENSE.txt file in the top level directory for more details. 8 | // 9 | //---------------------------------------------------------------------------- 10 | // $Id$ 11 | 12 | #ifndef Arithmetic_h 13 | #define Arithmetic_h 14 | 15 | #include 16 | #include 17 | 18 | namespace ossimplugins 19 | { 20 | 21 | 22 | /*-------------------------------------------------------------------------*/ 23 | /* "closest integer" function, returns long */ 24 | /*-------------------------------------------------------------------------*/ 25 | 26 | long inint (double x) 27 | { 28 | return (x >= 0.0) ? (long)(x + 0.5) : (long)(x-0.5) ; 29 | } 30 | 31 | /*-------------------------------------------------------------------------*/ 32 | /* "closest integer" function, returns double */ 33 | /*-------------------------------------------------------------------------*/ 34 | 35 | double fnint (double x) 36 | { 37 | return (x >= 0.0) ? (double)((long)(x + 0.5)) : (double)((long)(x - 0.5)); 38 | } 39 | 40 | 41 | } // End: namespace ossimplugins 42 | 43 | #endif 44 | -------------------------------------------------------------------------------- /cnes/src/otb/Coordinate.cpp: -------------------------------------------------------------------------------- 1 | //---------------------------------------------------------------------------- 2 | // 3 | // "Copyright Centre National d'Etudes Spatiales" 4 | // 5 | // License: LGPL 6 | // 7 | // See LICENSE.txt file in the top level directory for more details. 8 | // 9 | //---------------------------------------------------------------------------- 10 | // $Id$ 11 | 12 | 13 | #include 14 | 15 | namespace ossimplugins 16 | { 17 | 18 | 19 | 20 | Coordinate::Coordinate(): 21 | _x(0.0), 22 | _y(0.0), 23 | _z(0.0) 24 | { 25 | } 26 | 27 | Coordinate::~Coordinate() 28 | { 29 | } 30 | 31 | Coordinate::Coordinate(double x, double y, double z): 32 | _x(x), 33 | _y(y), 34 | _z(z) 35 | { 36 | } 37 | 38 | Coordinate::Coordinate(const Coordinate& rhs): 39 | _x(rhs._x), 40 | _y(rhs._y), 41 | _z(rhs._z) 42 | { 43 | } 44 | 45 | Coordinate& Coordinate::operator=(const Coordinate& rhs) 46 | { 47 | _x = rhs._x; 48 | _y = rhs._y; 49 | _z = rhs._z; 50 | 51 | return *this; 52 | } 53 | 54 | void Coordinate::set_coordinates(double x, double y, double z) 55 | { 56 | _x = x; 57 | _y = y; 58 | _z = z; 59 | 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /cnes/src/otb/Coordinate.h: -------------------------------------------------------------------------------- 1 | //---------------------------------------------------------------------------- 2 | // 3 | // "Copyright Centre National d'Etudes Spatiales" 4 | // 5 | // License: LGPL 6 | // 7 | // See LICENSE.txt file in the top level directory for more details. 8 | // 9 | //---------------------------------------------------------------------------- 10 | // $Id$ 11 | 12 | #ifndef Coordinate_h 13 | #define Coordinate_h 14 | 15 | #include 16 | 17 | namespace ossimplugins 18 | { 19 | 20 | 21 | /** 22 | * @brief This class represents a coordinate 23 | */ 24 | 25 | class OSSIM_PLUGINS_DLL Coordinate 26 | { 27 | public: 28 | /** 29 | * @brief Constructor 30 | */ 31 | Coordinate(); 32 | /** 33 | * @brief Destructor 34 | */ 35 | ~Coordinate(); 36 | /** 37 | * @brief Constructor with initializations 38 | */ 39 | Coordinate(double x, double y, double z); 40 | /** 41 | * @brief Copy constructor 42 | */ 43 | Coordinate(const Coordinate& rhs); 44 | 45 | /** 46 | * @brief Affectation operator 47 | */ 48 | Coordinate& operator=(const Coordinate& rhs); 49 | 50 | void set_coordinates(double x, double y, double z); 51 | 52 | double get_x() 53 | { 54 | return _x; 55 | }; 56 | 57 | double get_y() 58 | { 59 | return _y; 60 | }; 61 | 62 | double get_z() 63 | { 64 | return _z; 65 | }; 66 | protected: 67 | double _x; 68 | double _y; 69 | double _z; 70 | private: 71 | }; 72 | } 73 | 74 | #endif 75 | -------------------------------------------------------------------------------- /cnes/src/otb/GMSTDateTime.cpp: -------------------------------------------------------------------------------- 1 | //---------------------------------------------------------------------------- 2 | // 3 | // "Copyright Centre National d'Etudes Spatiales" 4 | // 5 | // License: LGPL 6 | // 7 | // See LICENSE.txt file in the top level directory for more details. 8 | // 9 | //---------------------------------------------------------------------------- 10 | // $Id$ 11 | 12 | #include 13 | #include 14 | 15 | namespace ossimplugins 16 | { 17 | 18 | 19 | GMSTDateTime::GMSTDateTime(): 20 | _tms(0) 21 | { 22 | } 23 | 24 | GMSTDateTime::~GMSTDateTime() 25 | { 26 | } 27 | 28 | GMSTDateTime::GMSTDateTime(const GMSTDateTime& rhs): 29 | _tms(rhs._tms), 30 | _origine(rhs._origine) 31 | { 32 | } 33 | 34 | GMSTDateTime::GMSTDateTime(double tms, Ori_TSM_Green origine): 35 | _tms(tms), 36 | _origine(origine) 37 | { 38 | } 39 | 40 | GMSTDateTime::GMSTDateTime(CivilDateTime& rhs) 41 | { 42 | rhs.AsGMSTDateTime(this); 43 | } 44 | 45 | GMSTDateTime& GMSTDateTime::operator=(const GMSTDateTime& rhs) 46 | { 47 | _tms = rhs._tms; 48 | _origine = rhs._origine; 49 | return *this; 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /cnes/src/otb/GMSTDateTime.h: -------------------------------------------------------------------------------- 1 | //---------------------------------------------------------------------------- 2 | // 3 | // "Copyright Centre National d'Etudes Spatiales" 4 | // 5 | // License: LGPL 6 | // 7 | // See LICENSE.txt file in the top level directory for more details. 8 | // 9 | //---------------------------------------------------------------------------- 10 | // $Id$ 11 | 12 | #ifndef GMSTDateTime_h 13 | #define GMSTDateTime_h 14 | 15 | #include 16 | #include 17 | 18 | namespace ossimplugins 19 | { 20 | 21 | 22 | class CivilDateTime; 23 | class JulianDate; 24 | 25 | /** 26 | * @ingroup Date 27 | * @brief This class represents a date 28 | */ 29 | class OSSIM_PLUGINS_DLL GMSTDateTime 30 | { 31 | public: 32 | 33 | enum Ori_TSM_Green { AN1900 , AN1950 , AN2000 } ; 34 | 35 | /** 36 | * @brief constructor 37 | */ 38 | GMSTDateTime(); 39 | /** 40 | * @brief Destructor 41 | */ 42 | ~GMSTDateTime(); 43 | /** 44 | * @brief Copy constructor 45 | */ 46 | GMSTDateTime(const GMSTDateTime& rhs); 47 | 48 | /** 49 | * @brief Constructor with date initialisation 50 | */ 51 | GMSTDateTime(double tsm, Ori_TSM_Green origine); 52 | 53 | /** 54 | * @brief Constructor with date initialisation using a CivilDateTime 55 | */ 56 | GMSTDateTime(CivilDateTime& rhs); 57 | 58 | /** 59 | * @brief Affectation operator 60 | */ 61 | GMSTDateTime& operator=(const GMSTDateTime& rhs); 62 | 63 | double get_tms() 64 | { 65 | return _tms; 66 | }; 67 | 68 | void set_tms(double tms) 69 | { 70 | _tms = tms; 71 | }; 72 | 73 | Ori_TSM_Green get_origine() 74 | { 75 | return _origine; 76 | }; 77 | 78 | void set_origine(Ori_TSM_Green origine) 79 | { 80 | _origine = origine; 81 | } 82 | protected: 83 | 84 | double _tms; 85 | Ori_TSM_Green _origine; 86 | 87 | private: 88 | }; 89 | } 90 | 91 | #endif 92 | -------------------------------------------------------------------------------- /cnes/src/otb/GeodesicCoordinate.cpp: -------------------------------------------------------------------------------- 1 | //---------------------------------------------------------------------------- 2 | // 3 | // "Copyright Centre National d'Etudes Spatiales" 4 | // 5 | // License: LGPL 6 | // 7 | // See LICENSE.txt file in the top level directory for more details. 8 | // 9 | //---------------------------------------------------------------------------- 10 | // $Id$ 11 | 12 | #include 13 | 14 | namespace ossimplugins 15 | { 16 | 17 | 18 | 19 | GeodesicCoordinate::GeodesicCoordinate() 20 | { 21 | } 22 | 23 | GeodesicCoordinate::~GeodesicCoordinate() 24 | { 25 | } 26 | 27 | GeodesicCoordinate::GeodesicCoordinate(double x, double y, double z): Coordinate(x,y,z) 28 | { 29 | } 30 | 31 | GeodesicCoordinate::GeodesicCoordinate(const GeodesicCoordinate& rhs): Coordinate((Coordinate)rhs) 32 | { 33 | } 34 | 35 | GeodesicCoordinate& GeodesicCoordinate::operator=(const GeodesicCoordinate& rhs) 36 | { 37 | _x = rhs._x; 38 | _y = rhs._x; 39 | _z = rhs._x; 40 | 41 | return *this; 42 | } 43 | 44 | } 45 | -------------------------------------------------------------------------------- /cnes/src/otb/GeodesicCoordinate.h: -------------------------------------------------------------------------------- 1 | //---------------------------------------------------------------------------- 2 | // 3 | // "Copyright Centre National d'Etudes Spatiales" 4 | // 5 | // License: LGPL 6 | // 7 | // See LICENSE.txt file in the top level directory for more details. 8 | // 9 | //---------------------------------------------------------------------------- 10 | // $Id$ 11 | 12 | #ifndef GeodesicCoordinate_h 13 | #define GeodesicCoordinate_h 14 | 15 | #include 16 | #include 17 | 18 | namespace ossimplugins 19 | { 20 | 21 | 22 | /** 23 | * @ingroup Date 24 | * @brief This class represents a coordinate in a geodesic reference 25 | */ 26 | class OSSIM_PLUGINS_DLL GeodesicCoordinate : public Coordinate 27 | { 28 | public: 29 | /** 30 | * @brief Constructor 31 | */ 32 | GeodesicCoordinate(); 33 | /** 34 | * @brief Destructor 35 | */ 36 | ~GeodesicCoordinate(); 37 | /** 38 | * @brief Cosntructor with initializations 39 | */ 40 | GeodesicCoordinate(double x, double y, double z); 41 | /** 42 | * @brief Copy constructor 43 | */ 44 | GeodesicCoordinate(const GeodesicCoordinate& rhs); 45 | 46 | /** 47 | * @brief Affectation operator 48 | */ 49 | GeodesicCoordinate& operator=(const GeodesicCoordinate& rhs); 50 | protected: 51 | private: 52 | }; 53 | } 54 | 55 | #endif 56 | -------------------------------------------------------------------------------- /cnes/src/otb/GeographicEphemeris.h: -------------------------------------------------------------------------------- 1 | //---------------------------------------------------------------------------- 2 | // 3 | // "Copyright Centre National d'Etudes Spatiales" 4 | // 5 | // License: LGPL 6 | // 7 | // See LICENSE.txt file in the top level directory for more details. 8 | // 9 | //---------------------------------------------------------------------------- 10 | // $Id$ 11 | 12 | #ifndef GeographicEphemeride_h 13 | #define GeographicEphemeride_h 14 | 15 | #include 16 | #include 17 | 18 | namespace ossimplugins 19 | { 20 | 21 | 22 | class GalileanEphemeris; 23 | /** 24 | * @ingroup Ephemeris 25 | * @brief This class represent an ephemeris in Geographic coordinates system 26 | */ 27 | class OSSIM_PLUGINS_DLL GeographicEphemeris : public Ephemeris 28 | { 29 | public: 30 | /** 31 | * @brief Constructor 32 | */ 33 | GeographicEphemeris(); 34 | /** 35 | * @brief Destructor 36 | */ 37 | virtual ~GeographicEphemeris(); 38 | 39 | /** 40 | * @brief Constructor with initialisations 41 | */ 42 | GeographicEphemeris(JSDDateTime date, double pos[3], double speed[3]); 43 | /** 44 | * @brief Copy constructor 45 | */ 46 | GeographicEphemeris(const GeographicEphemeris& rhs); 47 | 48 | GeographicEphemeris(GalileanEphemeris& rhs); 49 | /** 50 | * @brief Affectation operator 51 | */ 52 | GeographicEphemeris& operator=(const GeographicEphemeris& rhs); 53 | 54 | /** 55 | * @brief This fonction converts the current ephemeris in the Galilean coordinates system 56 | */ 57 | void ToGalilean(GalileanEphemeris* vGal); 58 | 59 | operator GalileanEphemeris(); 60 | 61 | /** 62 | * @brief This function creates a copy of the current class 63 | */ 64 | virtual Ephemeris* Clone() 65 | { 66 | return new GeographicEphemeris(*this); 67 | }; 68 | protected: 69 | private: 70 | 71 | }; 72 | } 73 | 74 | #endif 75 | -------------------------------------------------------------------------------- /cnes/src/otb/MJDDateTime.cpp: -------------------------------------------------------------------------------- 1 | //---------------------------------------------------------------------------- 2 | // 3 | // "Copyright Centre National d'Etudes Spatiales" 4 | // 5 | // License: LGPL 6 | // 7 | // See LICENSE.txt file in the top level directory for more details. 8 | // 9 | //---------------------------------------------------------------------------- 10 | // $Id$ 11 | 12 | #include 13 | 14 | namespace ossimplugins 15 | { 16 | 17 | 18 | MJDDateTime::MJDDateTime(): 19 | _day(0), 20 | _second(0), 21 | _microsecond(0) 22 | { 23 | } 24 | 25 | MJDDateTime::~MJDDateTime() 26 | { 27 | } 28 | 29 | MJDDateTime::MJDDateTime(const MJDDateTime& rhs): 30 | _day(rhs._day), 31 | _second(rhs._second), 32 | _microsecond(rhs._microsecond) 33 | { 34 | } 35 | 36 | MJDDateTime::MJDDateTime(long day, unsigned long second, unsigned long microsecond): 37 | _day(day), 38 | _second(second), 39 | _microsecond(microsecond) 40 | { 41 | } 42 | 43 | MJDDateTime& MJDDateTime::operator=(const MJDDateTime& rhs) 44 | { 45 | _day = rhs._day; 46 | _second = rhs._second; 47 | _microsecond = rhs._microsecond; 48 | 49 | return *this; 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /cnes/src/otb/MJDDateTime.h: -------------------------------------------------------------------------------- 1 | //---------------------------------------------------------------------------- 2 | // 3 | // "Copyright Centre National d'Etudes Spatiales" 4 | // 5 | // License: LGPL 6 | // 7 | // See LICENSE.txt file in the top level directory for more details. 8 | // 9 | //---------------------------------------------------------------------------- 10 | // $Id$ 11 | 12 | #ifndef MJDDateTime_h 13 | #define MJDDateTime_h 14 | 15 | #include 16 | 17 | namespace ossimplugins 18 | { 19 | 20 | 21 | class CivilDateTime; 22 | /** 23 | * @brief This class represents an MJD date (Modified Julian date) 24 | */ 25 | class OSSIM_PLUGINS_DLL MJDDateTime 26 | { 27 | public: 28 | /** 29 | * @brief constructor 30 | */ 31 | MJDDateTime(); 32 | /** 33 | * @brief Destructor 34 | */ 35 | ~MJDDateTime(); 36 | /** 37 | * @brief Copy constructor 38 | */ 39 | MJDDateTime(const MJDDateTime& rhs); 40 | 41 | /** 42 | * @brief Constructor with date initialisation 43 | */ 44 | MJDDateTime(long day, unsigned long second, unsigned long microsecond); 45 | 46 | /** 47 | * @brief Affectation operator 48 | */ 49 | MJDDateTime& operator=(const MJDDateTime& rhs); 50 | 51 | long get_day() 52 | { 53 | return _day; 54 | }; 55 | 56 | unsigned long get_second() 57 | { 58 | return _second; 59 | }; 60 | 61 | unsigned long get_microsecond() 62 | { 63 | return _microsecond; 64 | }; 65 | 66 | void set_day(long day) 67 | { 68 | _day = day; 69 | }; 70 | 71 | void set_second(unsigned long second) 72 | { 73 | _second = second; 74 | }; 75 | 76 | void set_microsecond(unsigned long microsecond) 77 | { 78 | _microsecond = microsecond; 79 | }; 80 | protected: 81 | 82 | long _day; 83 | unsigned long _second; 84 | unsigned long _microsecond; 85 | 86 | 87 | private: 88 | }; 89 | } 90 | 91 | #endif 92 | -------------------------------------------------------------------------------- /cnes/src/otb/RectangularCoordinate.h: -------------------------------------------------------------------------------- 1 | //---------------------------------------------------------------------------- 2 | // 3 | // "Copyright Centre National d'Etudes Spatiales" 4 | // 5 | // License: LGPL 6 | // 7 | // See LICENSE.txt file in the top level directory for more details. 8 | // 9 | //---------------------------------------------------------------------------- 10 | // $Id$ 11 | 12 | #ifndef RectangularCoordinate_h 13 | #define RectangularCoordinate_h 14 | 15 | #include 16 | #include 17 | 18 | namespace ossimplugins 19 | { 20 | 21 | 22 | class GeodesicCoordinate; 23 | /** 24 | * @ingroup Date 25 | * @brief This class represents a coordinate in a rectangular reference 26 | */ 27 | class OSSIM_PLUGINS_DLL RectangularCoordinate : public Coordinate 28 | { 29 | public: 30 | /** 31 | * @brief Constructor 32 | */ 33 | RectangularCoordinate(); 34 | /** 35 | * @brief Destructor 36 | */ 37 | ~RectangularCoordinate(); 38 | /** 39 | * @brief Cosntructor with initializations 40 | */ 41 | RectangularCoordinate(double x, double y, double z); 42 | /** 43 | * @brief Copy constructor 44 | */ 45 | RectangularCoordinate(const RectangularCoordinate& rhs); 46 | 47 | /** 48 | * @brief Affectation operator 49 | */ 50 | RectangularCoordinate& operator=(const RectangularCoordinate& rhs); 51 | 52 | void AsGeodesicCoordinates(double demiGdAxe, double demiPtAxe, GeodesicCoordinate* geod); 53 | protected: 54 | private: 55 | }; 56 | } 57 | 58 | #endif 59 | -------------------------------------------------------------------------------- /cnes/src/otb/Sensor.cpp: -------------------------------------------------------------------------------- 1 | //---------------------------------------------------------------------------- 2 | // 3 | // "Copyright Centre National d'Etudes Spatiales" 4 | // 5 | // License: LGPL 6 | // 7 | // See LICENSE.txt file in the top level directory for more details. 8 | // 9 | //---------------------------------------------------------------------------- 10 | // $Id$ 11 | 12 | #include 13 | #include 14 | #include 15 | 16 | #include 17 | 18 | namespace ossimplugins 19 | { 20 | 21 | 22 | Sensor::Sensor(SensorParams* params, PlatformPosition* position) 23 | { 24 | _params = params->Clone(); 25 | _position = position->Clone(); 26 | } 27 | 28 | Sensor::~Sensor() 29 | { 30 | if(_params != NULL) 31 | { 32 | delete _params; 33 | } 34 | 35 | if(_position != NULL) 36 | { 37 | delete _position; 38 | } 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /cnes/src/otb/Sensor.h: -------------------------------------------------------------------------------- 1 | //---------------------------------------------------------------------------- 2 | // 3 | // "Copyright Centre National d'Etudes Spatiales" 4 | // 5 | // License: LGPL 6 | // 7 | // See LICENSE.txt file in the top level directory for more details. 8 | // 9 | //---------------------------------------------------------------------------- 10 | // $Id$ 11 | 12 | #ifndef Services_h 13 | #define Services_h 14 | 15 | #include 16 | 17 | namespace ossimplugins 18 | { 19 | 20 | 21 | class SensorParams; 22 | class PlatformPosition; 23 | class JSDDateTime; 24 | 25 | /** 26 | * @ingroup SARModel 27 | * @brief This class provides basic location services 28 | */ 29 | class OSSIM_PLUGINS_DLL Sensor 30 | { 31 | public: 32 | /** 33 | * @brief Constructor 34 | * 35 | * @remarks This constructor creates a copy of the sensor model (params and position) 36 | */ 37 | Sensor(SensorParams* params, PlatformPosition* position); 38 | /** 39 | * @brief Destructor 40 | */ 41 | virtual ~Sensor(); 42 | 43 | /** 44 | * @brief This function is able to convert image coordinates into geodetic world coordinates using a sensor model 45 | * 46 | * @param distance : Slant range of the image point 47 | * @param time : Azimuth time of the image point 48 | * @param height : Altitude of the world point 49 | * @retval lon : Longitude of the world point 50 | * @retval lat : Latitude of the world point 51 | */ 52 | virtual int ImageToWorld(double distance, JSDDateTime time, double height, double& lon, double& lat) const = 0; 53 | protected: 54 | SensorParams * _params; 55 | PlatformPosition* _position; 56 | 57 | private: 58 | }; 59 | 60 | } 61 | #endif 62 | -------------------------------------------------------------------------------- /cnes/test/CMakeLists.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ossimlabs/ossim-plugins/188c01d3b53cb0a2d0d6cf0c9445bc9ace86a074/cnes/test/CMakeLists.txt -------------------------------------------------------------------------------- /dem/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | MESSAGE( "************** LIBRARY SETUP FOR ossim_dem_plugin******************") 2 | 3 | # Include ossim cmake stuff: 4 | include(OssimVersion) 5 | include(OssimCommonVariables) 6 | include(OssimUtilities) 7 | 8 | find_package( JsonCpp ) 9 | if( JSONCPP_FOUND ) 10 | include_directories( ${JSONCPP_INCLUDE_DIR} ) 11 | set( requiredLibs ${requiredLibs} ${JSONCPP_LIBRARY} ) 12 | message("Found JsonCpp" ) 13 | else( JSONCPP_FOUND ) 14 | message( FATAL_ERROR "Could not find required JsonCpp package!" ) 15 | endif( JSONCPP_FOUND ) 16 | 17 | message(" OPENCV_HOME = <${OPENCV_HOME}>") 18 | find_package(OpenCV) 19 | if( OPENCV_FOUND ) 20 | include_directories( ${OPENCV_INCLUDE_DIR} ) 21 | set( requiredLibs ${requiredLibs} ${OPENCV_LIBRARIES} ) 22 | message( "Found OpenCV" ) 23 | else( OPENCV_FOUND ) 24 | message( FATAL "Could not find OpenCV package. " ) 25 | endif( OPENCV_FOUND ) 26 | 27 | add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/src ${CMAKE_CURRENT_BINARY_DIR}/src) 28 | 29 | IF(BUILD_OSSIM_TESTS) 30 | add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/test ${CMAKE_CURRENT_BINARY_DIR}/test) 31 | ENDIF() 32 | 33 | 34 | -------------------------------------------------------------------------------- /dem/README.md: -------------------------------------------------------------------------------- 1 | # OSSIM DEM Generation Tool Plugin 2 | 3 | This plugin directory contains an OSSIM Tool for DEM generation. 4 | -------------------------------------------------------------------------------- /dem/src/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | set(LIB_NAME ossim_dem_plugin) 2 | 3 | # Include ossim cmake stuff: 4 | include(OssimVersion) 5 | include(OssimCommonVariables) 6 | include(OssimUtilities) 7 | 8 | INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}) 9 | 10 | FILE(GLOB_RECURSE OSSIMPLUGIN_SRCS *.cpp) 11 | FILE(GLOB_RECURSE OSSIMPLUGIN_HEADERS *.h) 12 | 13 | #### 14 | # OSSIMPLUGINSMAKINGDLL controls dll linkage on windows. 15 | # Adding this sets OSSIM_PLUGINS_DLL #define TO "__declspec(dllexport)". 16 | ### 17 | add_definitions("-DOSSIMPLUGINSMAKINGDLL") 18 | 19 | # Adjust the install library path: 20 | if(OSSIM_INSTALL_PLUGINS_WITH_VERSION) 21 | set(INSTALL_LIBRARY_DIR "${INSTALL_LIBRARY_DIR}/ossim-${OSSIM_VERSION}/plugins") 22 | else(OSSIM_INSTALL_PLUGINS_WITH_VERSION) 23 | set(INSTALL_LIBRARY_DIR "${INSTALL_LIBRARY_DIR}/ossim/plugins") 24 | endif(OSSIM_INSTALL_PLUGINS_WITH_VERSION) 25 | if(WIN32) 26 | set(INSTALL_RUNTIME_DIR "${INSTALL_RUNTIME_DIR}/ossim/plugins") 27 | endif() 28 | 29 | OSSIM_LINK_LIBRARY(${LIB_NAME} 30 | COMPONENT_NAME ossim TYPE "${OSSIM_PLUGIN_LINK_TYPE}" 31 | LIBRARIES ${OSSIM_LIBRARIES} ${requiredLib} 32 | HEADERS "${OSSIMPLUGIN_HEADERS}" 33 | SOURCE_FILES "${OSSIMPLUGIN_SRCS}" 34 | INSTALL_LIB) 35 | 36 | -------------------------------------------------------------------------------- /dem/src/ossimDemPluginInit.cpp: -------------------------------------------------------------------------------- 1 | //************************************************************************************************** 2 | // 3 | // OSSIM Open Source Geospatial Data Processing Library 4 | // See top level LICENSE.txt file for license information 5 | // 6 | //************************************************************************************************** 7 | 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include "ossimDemTool.h" 13 | #include "ossimDemToolFactory.h" 14 | 15 | extern "C" 16 | { 17 | ossimSharedObjectInfo myDemInfo; 18 | 19 | const char* getDemDescription() 20 | { 21 | return "Dem utility plugin\n"; 22 | } 23 | 24 | int getDemNumberOfClassNames() 25 | { 26 | return 1; 27 | } 28 | 29 | const char* getDemClassName(int idx) 30 | { 31 | if (idx == 0) 32 | { 33 | return "ossimDemTool"; 34 | } 35 | return (const char*)0; 36 | } 37 | 38 | /* Note symbols need to be exported on windoze... */ 39 | OSSIM_PLUGINS_DLL void ossimSharedLibraryInitialize(ossimSharedObjectInfo** info) 40 | { 41 | myDemInfo.getDescription = getDemDescription; 42 | myDemInfo.getNumberOfClassNames = getDemNumberOfClassNames; 43 | myDemInfo.getClassName = getDemClassName; 44 | 45 | *info = &myDemInfo; 46 | 47 | /* Demister the utility... */ 48 | ossimToolRegistry::instance()-> 49 | registerFactory(ossimDemToolFactory::instance()); 50 | } 51 | 52 | /* Note symbols need to be exported on windoze... */ 53 | OSSIM_PLUGINS_DLL void ossimSharedLibraryFinalize() 54 | { 55 | ossimToolRegistry::instance()-> 56 | unregisterFactory(ossimDemToolFactory::instance()); 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /dem/src/ossimDemToolConfig.h: -------------------------------------------------------------------------------- 1 | //************************************************************************************************** 2 | // 3 | // OSSIM Open Source Geospatial Data Processing Library 4 | // See top level LICENSE.txt file for license information 5 | // 6 | //************************************************************************************************** 7 | 8 | #pragma once 9 | 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | 17 | /** 18 | * Singleton class maintaining parameters affecting the automatic tie point generation. 19 | * The state is imported and exported via JSON. There are default configuration files that must 20 | * be part of the install, that are accessed by this class. Custom settings can also be st 21 | */ 22 | class OSSIM_PLUGINS_DLL ossimDemToolConfig : public ossim::JsonConfig 23 | { 24 | public: 25 | //! Singleton implementation. 26 | static ossimDemToolConfig& instance(); 27 | 28 | //! Destructor 29 | virtual ~ossimDemToolConfig(); 30 | 31 | bool readConfig(const std::string& configName=""); 32 | 33 | //! Convenience method returns TRUE if the currently set diagnostic level is <= level 34 | bool diagnosticLevel(unsigned int level) const; 35 | 36 | private: 37 | ossimDemToolConfig(); 38 | ossimDemToolConfig(const ossimDemToolConfig& /*hide_this*/) {} 39 | 40 | }; 41 | 42 | 43 | -------------------------------------------------------------------------------- /dem/src/ossimDemToolFactory.cpp: -------------------------------------------------------------------------------- 1 | //************************************************************************************************** 2 | // 3 | // OSSIM Open Source Geospatial Data Processing Library 4 | // See top level LICENSE.txt file for license information 5 | // 6 | //************************************************************************************************** 7 | 8 | #include 9 | #include "ossimDemToolFactory.h" 10 | 11 | using namespace std; 12 | 13 | ossimDemToolFactory* ossimDemToolFactory::s_instance = 0; 14 | 15 | ossimDemToolFactory* ossimDemToolFactory::instance() 16 | { 17 | if (!s_instance) 18 | s_instance = new ossimDemToolFactory; 19 | return s_instance; 20 | } 21 | 22 | ossimDemToolFactory::ossimDemToolFactory() 23 | { 24 | } 25 | 26 | ossimDemToolFactory::~ossimDemToolFactory() 27 | { 28 | ossimToolRegistry::instance()->unregisterFactory(this); 29 | } 30 | 31 | ossimTool* ossimDemToolFactory::createTool(const std::string& argName) const 32 | { 33 | ossimString utilName (argName); 34 | utilName.downcase(); 35 | 36 | if ((utilName == "dem") || (argName == "ossimDemTool")) 37 | return new ossimDemTool; 38 | 39 | return 0; 40 | } 41 | 42 | void ossimDemToolFactory::getCapabilities(std::map& capabilities) const 43 | { 44 | capabilities.insert(pair("dem", ossimDemTool::DESCRIPTION)); 45 | } 46 | 47 | std::map ossimDemToolFactory::getCapabilities() const 48 | { 49 | std::map result; 50 | getCapabilities(result); 51 | return result; 52 | } 53 | 54 | void ossimDemToolFactory::getTypeNameList(vector& typeList) const 55 | { 56 | typeList.push_back("ossimDemTool"); 57 | } 58 | -------------------------------------------------------------------------------- /dem/src/ossimDemToolFactory.h: -------------------------------------------------------------------------------- 1 | //************************************************************************************************** 2 | // 3 | // OSSIM Open Source Geospatial Data Processing Library 4 | // See top level LICENSE.txt file for license information 5 | // 6 | //************************************************************************************************** 7 | 8 | #ifndef ossimDemToolFactory_HEADER 9 | #define ossimDemToolFactory_HEADER 1 10 | 11 | #include 12 | #include 13 | #include "ossimDemTool.h" 14 | 15 | class ossimString; 16 | class ossimFilename; 17 | class ossimKeywordlist; 18 | 19 | class OSSIM_PLUGINS_DLL ossimDemToolFactory: public ossimToolFactoryBase 20 | { 21 | public: 22 | static ossimDemToolFactory* instance(); 23 | 24 | virtual ~ossimDemToolFactory(); 25 | virtual ossimTool* createTool(const std::string& typeName) const; 26 | virtual void getTypeNameList(std::vector& typeList) const; 27 | virtual void getCapabilities(std::map& capabilities) const; 28 | virtual std::map getCapabilities() const; 29 | 30 | protected: 31 | ossimDemToolFactory(); 32 | ossimDemToolFactory(const ossimDemToolFactory&); 33 | void operator=(const ossimDemToolFactory&); 34 | 35 | /** static instance of this class */ 36 | static ossimDemToolFactory* s_instance; 37 | 38 | }; 39 | 40 | #endif 41 | -------------------------------------------------------------------------------- /dem/test/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required (VERSION 2.8) 2 | 3 | # Get the library suffix for lib or lib64. 4 | get_property(LIB64 GLOBAL PROPERTY FIND_LIBRARY_USE_LIB64_PATHS) 5 | if(LIB64) 6 | set(LIBSUFFIX 64) 7 | else() 8 | set(LIBSUFFIX "") 9 | endif() 10 | 11 | set(requiredLibs ${requiredLibs} ossim_dem_plugin ) 12 | 13 | message("requiredLibs = ${requiredLibs}") 14 | add_executable(dem-test dem-test.cpp ) 15 | set_target_properties(dem-test PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin") 16 | target_link_libraries( dem-test ${requiredLibs} ) 17 | 18 | -------------------------------------------------------------------------------- /dem/test/data/asp-params.json: -------------------------------------------------------------------------------- 1 | { 2 | "service": "dem", 3 | "method": "generateDem", 4 | "algorithm": "asp" 5 | } 6 | 7 | -------------------------------------------------------------------------------- /fftw3/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | MESSAGE( "************** LIBRARY SETUP FOR ossim_fftw3_plugin ******************") 2 | SET(BUILD_OSSIM_FRAMEWORKS "OFF") 3 | SET(OSSIM_PLUGIN_LINK_TYPE "SHARED") 4 | 5 | SET( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11" ) 6 | 7 | # Add our include and library... 8 | find_package(ossim) 9 | if(OSSIM_FOUND) 10 | include_directories( ${OSSIM_INCLUDE_DIR} ) 11 | set( requiredLibs ${requiredLibs} ${OSSIM_LIBRARIES} ) 12 | else(OSSIM_FOUND) 13 | message(FATAL_ERROR "Could not find ossim") 14 | endif(OSSIM_FOUND) 15 | INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}) 16 | 17 | find_package(FFTW3) 18 | if(FFTW3_FOUND) 19 | include_directories( ${FFTW3_INCLUDE_DIR} ) 20 | set(requiredLibs ${requiredLibs} ${FFTW3_LIBRARIES} ) 21 | else(FFTW3_FOUND) 22 | message(FATAL_ERROR "Could not find FFTW3") 23 | endif(FFTW3_FOUND) 24 | 25 | INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}) 26 | 27 | add_subdirectory( src ) 28 | 29 | -------------------------------------------------------------------------------- /fftw3/README.md: -------------------------------------------------------------------------------- 1 | # ossim-fftw3-plugin 2 | Contains C++ library code for accessing FFTW3 library as an ossimImageSourceFilter class. 3 | 4 | Requires the third-party open source library [FFTW3](https://www.fftw.org "FFTW3's Homepage"). 5 | 6 | Note: It may be necessary to build the FFTW3 library with the compile option "-fPIC" to avoid link-time errors while building this plugin. The easiest solution is to: 7 | 8 | 1. checkout the [FFTW3 git repository](https://github.com/FFTW/fftw3 "FFTW3 on GitHub"), 9 | 2. in the shell you'll be building the library, do `export CPPFLAGS="-fPIC"` 10 | 3. then follow the directions for building on your system. On linux, run ./configure; make; make install. 11 | 12 | The make install should place the FFTW3 library where OSSIM's cmake will find it. 13 | 14 | It is important that you make sure you do the following -- this applies to all plugins: 15 | 16 | 1. Enable the plugin build by either exporting an env var `BUILD_FFTW3_PLUGIN="ON"`, or editing ossim/cmake/scripts/ossim-cmake-config.sh and default that variable to "ON". 17 | 2. Verify that libossim-fftw3-plugin.so (or equivalent) is in your build/lib folder. 18 | 3. Add the plugin library to your ossim preferences file _before_ the GDAL plugin (the latter must always be last). 19 | -------------------------------------------------------------------------------- /fftw3/src/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | set(LIB_NAME ossim_fftw3_plugin) 2 | 3 | # Include ossim cmake stuff: 4 | include(OssimVersion) 5 | include(OssimCommonVariables) 6 | 7 | SET( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC" ) 8 | 9 | FILE(GLOB_RECURSE OSSIMPLUGIN_SRCS *.cpp) 10 | FILE(GLOB_RECURSE OSSIMPLUGIN_HEADERS *.h) 11 | 12 | #### 13 | # OSSIMPLUGINSMAKINGDLL controls dll linkage on windows. 14 | # Adding this sets OSSIM_PLUGINS_DLL #define TO "__declspec(dllexport)". 15 | ### 16 | add_definitions("-DOSSIMPLUGINSMAKINGDLL") 17 | 18 | # Adjust the install library path: 19 | if(OSSIM_INSTALL_PLUGINS_WITH_VERSION) 20 | set(INSTALL_LIBRARY_DIR "${INSTALL_LIBRARY_DIR}/ossim-${OSSIM_VERSION}/plugins") 21 | else(OSSIM_INSTALL_PLUGINS_WITH_VERSION) 22 | set(INSTALL_LIBRARY_DIR "${INSTALL_LIBRARY_DIR}/ossim/plugins") 23 | endif(OSSIM_INSTALL_PLUGINS_WITH_VERSION) 24 | 25 | if(WIN32) 26 | set(INSTALL_RUNTIME_DIR "${INSTALL_RUNTIME_DIR}/ossim/plugins") 27 | endif() 28 | 29 | OSSIM_LINK_LIBRARY(${LIB_NAME} 30 | COMPONENT_NAME ossim TYPE "${OSSIM_PLUGIN_LINK_TYPE}" 31 | LIBRARIES ${OSSIM_LIBRARY} ${FFTW3_LIBRARY} 32 | HEADERS "${OSSIMPLUGIN_HEADERS}" 33 | SOURCE_FILES "${OSSIMPLUGIN_SRCS}" 34 | INSTALL_LIB) 35 | 36 | 37 | -------------------------------------------------------------------------------- /fftw3/src/ossimFftw3Factory.h: -------------------------------------------------------------------------------- 1 | //************************************************************************************************** 2 | // 3 | // OSSIM Open Source Geospatial Data Processing Library 4 | // See top level LICENSE.txt file for license information 5 | // 6 | //************************************************************************************************** 7 | 8 | #ifndef ossimFftw3Factory_HEADER 9 | #define ossimFftw3Factory_HEADER 10 | #include 11 | 12 | class ossimFftw3Factory : public ossimImageSourceFactoryBase 13 | { 14 | public: 15 | virtual ~ossimFftw3Factory(); 16 | static ossimFftw3Factory* instance(); 17 | virtual ossimObject* createObject(const ossimString& name)const; 18 | virtual ossimObject* createObject(const ossimKeywordlist& kwl, const char* prefix=0)const; 19 | virtual void getTypeNameList(std::vector& typeList)const; 20 | 21 | protected: 22 | // Hide from use. 23 | ossimFftw3Factory(); 24 | ossimFftw3Factory(const ossimFftw3Factory&); 25 | const ossimFftw3Factory& operator=(ossimFftw3Factory&); 26 | 27 | static ossimFftw3Factory* theInstance; 28 | TYPE_DATA 29 | }; 30 | #endif 31 | -------------------------------------------------------------------------------- /fftw3/src/ossimFftw3Filter.h: -------------------------------------------------------------------------------- 1 | //************************************************************************************************** 2 | // 3 | // OSSIM Open Source Geospatial Data Processing Library 4 | // See top level LICENSE.txt file for license information 5 | // 6 | //************************************************************************************************** 7 | 8 | #ifndef ossimFftw3Filter_HEADER 9 | #define ossimFftw3Filter_HEADER 10 | #include 11 | 12 | class ossimFftw3Filter : public ossimFftFilter 13 | { 14 | public: 15 | ossimFftw3Filter(ossimObject* owner=NULL); 16 | ossimFftw3Filter(ossimImageSource* inputSource); 17 | ossimFftw3Filter(ossimObject* owner, ossimImageSource* inputSource); 18 | 19 | protected: 20 | virtual void runFft(ossimRefPtr& input, ossimRefPtr& output); 21 | 22 | virtual ~ossimFftw3Filter(); 23 | 24 | TYPE_DATA 25 | }; 26 | 27 | #endif 28 | -------------------------------------------------------------------------------- /gdal/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/src ${CMAKE_CURRENT_BINARY_DIR}/src) 2 | 3 | #IF(BUILD_OSSIM_TESTS) 4 | # add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/test ${CMAKE_CURRENT_BINARY_DIR}/test) 5 | #ENDIF() 6 | 7 | 8 | -------------------------------------------------------------------------------- /gdal/README.md: -------------------------------------------------------------------------------- 1 | # ossim-gdal-plugin 2 | Plugin for utilizing GDAL library for reading and writing alternative, non-OSSIM-native formats. 3 | -------------------------------------------------------------------------------- /gdal/src/ossimGdalInfoFactory.h: -------------------------------------------------------------------------------- 1 | //---------------------------------------------------------------------------- 2 | // 3 | // License: LGPL 4 | // 5 | // See LICENSE.txt file in the top level directory for more details. 6 | // 7 | // Author: Mingjie Su 8 | // 9 | // Description: Info factory for gdal info objects. 10 | // 11 | //---------------------------------------------------------------------------- 12 | // $Id: ossimGdalInfoFactory.h 539 2010-02-23 20:32:45Z ming.su $ 13 | 14 | #ifndef ossimGdalInfoFactory_HEADER 15 | #define ossimGdalInfoFactory_HEADER 1 16 | 17 | #include 18 | #include 19 | 20 | class ossimFilename; 21 | class ossimInfoBase; 22 | 23 | /** 24 | * @brief Info factory. 25 | */ 26 | class ossimGdalInfoFactory : public ossimInfoFactoryInterface 27 | { 28 | public: 29 | 30 | /** virtual destructor */ 31 | virtual ~ossimGdalInfoFactory(); 32 | 33 | static ossimGdalInfoFactory* instance(); 34 | 35 | /** 36 | * @brief create method. 37 | * 38 | * @param file Some file you want info for. 39 | * 40 | * @return ossimInfoBase* on success 0 on failure. Caller is responsible 41 | * for memory. 42 | */ 43 | virtual std::shared_ptr create(const ossimFilename& file) const; 44 | virtual std::shared_ptr create(std::shared_ptr& str, 45 | const std::string& connectionString) const; 46 | 47 | private: 48 | 49 | /** hidden from use default constructor */ 50 | ossimGdalInfoFactory(); 51 | 52 | /** hidden from use copy constructor */ 53 | ossimGdalInfoFactory(const ossimGdalInfoFactory& obj); 54 | 55 | /** hidden from use operator = */ 56 | const ossimGdalInfoFactory& operator=(const ossimGdalInfoFactory& rhs); 57 | }; 58 | 59 | #endif /* End of "#ifndef ossimGdalInfoFactory_HEADER" */ 60 | -------------------------------------------------------------------------------- /gdal/src/ossimGdalType.h: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------ 2 | // License: See top level LICENSE.txt file. 3 | // 4 | // Author: Garrett Potts 5 | // 6 | // $Id: ossimGdalType.h 11440 2007-07-30 12:35:26Z dburken $ 7 | //------------------------------------------------------------------------ 8 | #ifndef ossimGdalType_HEADER 9 | #define ossimGdalType_HEADER 10 | #include 11 | #include 12 | 13 | class ossimGdalType 14 | { 15 | public: 16 | ossimScalarType toOssim(GDALDataType gdalType)const; 17 | GDALDataType toGdal(ossimScalarType)const; 18 | }; 19 | 20 | #endif 21 | -------------------------------------------------------------------------------- /gdal/src/ossimHdfInfo.h: -------------------------------------------------------------------------------- 1 | //---------------------------------------------------------------------------- 2 | // 3 | // License: LGPL 4 | // 5 | // See LICENSE.txt file in the top level directory for more details. 6 | // 7 | // Author: Mingjie Su 8 | // 9 | // Description: Info object for HDF data. 10 | // 11 | //---------------------------------------------------------------------------- 12 | // $Id: ossimHdfInfo.h 2645 2011-05-26 15:21:34Z oscar.kramer $ 13 | #ifndef ossimHdfInfo_HEADER 14 | #define ossimHdfInfo_HEADER 1 15 | 16 | #include 17 | #include 18 | #include 19 | #include 20 | #include 21 | 22 | /** 23 | * @brief HDF info class. 24 | * 25 | * Encapsulates the HDF functionality. 26 | */ 27 | class ossimHdfInfo : public ossimInfoBase 28 | { 29 | public: 30 | 31 | /** default constructor */ 32 | ossimHdfInfo(); 33 | 34 | /** virtual destructor */ 35 | virtual ~ossimHdfInfo(); 36 | 37 | /** 38 | * @brief open method. 39 | * 40 | * @param file File name to open. 41 | * @return true on success false on error. 42 | */ 43 | virtual bool open(const ossimFilename& file); 44 | 45 | /** 46 | * Print method. 47 | * 48 | * @param out Stream to print to. 49 | * 50 | * @return std::ostream& 51 | */ 52 | virtual std::ostream& print(std::ostream& out) const; 53 | 54 | private: 55 | 56 | ossimFilename theFile; 57 | ossimRefPtr m_hdfReader; 58 | ossimString m_driverName; 59 | std::map m_globalMeta; 60 | std::vector m_globalMetaVector; 61 | }; 62 | 63 | #endif /* End of "#ifndef ossimHdfInfo_HEADER" */ 64 | -------------------------------------------------------------------------------- /gdal/src/ossimShpElevIndex.h: -------------------------------------------------------------------------------- 1 | //---------------------------------------------------------------------------- 2 | // 3 | // File: ossimGdalImageElevationDatabase.h 4 | // 5 | // License: MIT 6 | // 7 | // See LICENSE.txt file in the top level directory for more details. 8 | // 9 | // Author: Scott Bortman 10 | // 11 | // Description: See description for class below. 12 | // 13 | //---------------------------------------------------------------------------- 14 | // $Id$ 15 | 16 | #ifndef ossimShpElevIndex_HEADER 17 | #define ossimShpElevIndex_HEADER 1 18 | #include "ogrsf_frmts.h" 19 | #include 20 | #include 21 | #include 22 | #include 23 | #include 24 | #include 25 | 26 | class ossimShpElevIndex 27 | { 28 | public: 29 | static ossimShpElevIndex* getInstance( std::string shpFileName ) 30 | { 31 | ossimShpElevIndex* shpElevIndex = instance.load( std::memory_order_acquire ); 32 | 33 | if ( ! shpElevIndex ) 34 | { 35 | std::lock_guard myLock( myMutex ); 36 | 37 | shpElevIndex = instance.load( std::memory_order_relaxed ); 38 | 39 | if( ! shpElevIndex ) 40 | { 41 | shpElevIndex = new ossimShpElevIndex( shpFileName ); 42 | instance.store( shpElevIndex, std::memory_order_release ); 43 | } 44 | } 45 | 46 | return shpElevIndex; 47 | } 48 | 49 | std::string searchShapefile( double lon, double lat ) const; 50 | void getBoundingRect(ossimGrect& rect) const; 51 | 52 | 53 | private: 54 | ossimShpElevIndex( std::string shpFileName ); 55 | ~ossimShpElevIndex(); 56 | ossimShpElevIndex( const ossimShpElevIndex& )= delete; 57 | ossimShpElevIndex& operator=( const ossimShpElevIndex& )= delete; 58 | 59 | static std::atomic instance; 60 | static std::mutex myMutex; 61 | 62 | GDALDataset *poMemDS; 63 | }; 64 | #endif 65 | 66 | -------------------------------------------------------------------------------- /gdal/test/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # TBD 2 | -------------------------------------------------------------------------------- /gdal/test/README.txt: -------------------------------------------------------------------------------- 1 | Unit and functional tests for plugin code goes here. 2 | -------------------------------------------------------------------------------- /geopdf/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/src ${CMAKE_CURRENT_BINARY_DIR}/src) 2 | 3 | #IF(BUILD_OSSIM_TESTS) 4 | # add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/test ${CMAKE_CURRENT_BINARY_DIR}/test) 5 | #ENDIF() 6 | 7 | 8 | -------------------------------------------------------------------------------- /geopdf/README.md: -------------------------------------------------------------------------------- 1 | # ossim-geopdf-plugin 2 | Plugin for reading and writing GeoPDF format 3 | -------------------------------------------------------------------------------- /geopdf/src/ossimGeoPdfInfo.h: -------------------------------------------------------------------------------- 1 | //---------------------------------------------------------------------------- 2 | // 3 | // License: LGPL 4 | // 5 | // See LICENSE.txt file in the top level directory for more details. 6 | // 7 | // Author: Mingjie Su 8 | // 9 | // Description: Gdal Ogr Info object. 10 | // 11 | //---------------------------------------------------------------------------- 12 | // $Id: ossimGeoPdfInfo.h 19869 2011-07-23 13:25:34Z dburken $ 13 | #ifndef ossimGeoPdfInfo_HEADER 14 | #define ossimGeoPdfInfo_HEADER 15 | 16 | #include 17 | #include 18 | #include 19 | 20 | //PoDoFo includes 21 | #include 22 | 23 | #include 24 | #include 25 | #include 26 | 27 | class ossimKeywordlist; 28 | class PdfMemDocument; 29 | /** 30 | * @brief GeoPdf info class. 31 | * 32 | * Encapsulates the GeoPdf functionality. 33 | */ 34 | class ossimGeoPdfInfo : public ossimInfoBase 35 | { 36 | public: 37 | 38 | /** default constructor */ 39 | ossimGeoPdfInfo(); 40 | 41 | /** virtual destructor */ 42 | virtual ~ossimGeoPdfInfo(); 43 | 44 | /** 45 | * @brief open method. 46 | * 47 | * @param file File name to open. 48 | * @return true on success false on error. 49 | */ 50 | virtual bool open(const ossimFilename& file); 51 | 52 | virtual bool open(std::shared_ptr& str, 53 | const std::string& connectionString); 54 | 55 | /** 56 | * Print method. 57 | * 58 | * @param out Stream to print to. 59 | * 60 | * @return std::ostream& 61 | */ 62 | virtual std::ostream& print(std::ostream& out) const; 63 | 64 | bool isOpen(); 65 | 66 | private: 67 | 68 | ossimFilename theFile; 69 | PoDoFo::PdfMemDocument* m_PdfMemDocument; 70 | }; 71 | 72 | #endif /* End of "#ifndef ossimGeoPdfInfo_HEADER" */ 73 | -------------------------------------------------------------------------------- /geopdf/test/CMakeLists.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ossimlabs/ossim-plugins/188c01d3b53cb0a2d0d6cf0c9445bc9ace86a074/geopdf/test/CMakeLists.txt -------------------------------------------------------------------------------- /hdf5_archived/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/src ${CMAKE_CURRENT_BINARY_DIR}/src) 2 | 3 | #IF(BUILD_OSSIM_TESTS) 4 | # add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/test ${CMAKE_CURRENT_BINARY_DIR}/test) 5 | #ENDIF() 6 | 7 | 8 | -------------------------------------------------------------------------------- /hdf5_archived/README.md: -------------------------------------------------------------------------------- 1 | # ossim-hdf5-plugin 2 | Plugin for reading and writing HDF5 format 3 | -------------------------------------------------------------------------------- /hdf5_archived/src/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | if (NOT BUILD_OSSIM_HDF5_SUPPORT) 2 | return() 3 | endif (NOT BUILD_OSSIM_HDF5_SUPPORT) 4 | 5 | set(LIB_NAME ossim_hdf5_plugin) 6 | MESSAGE( "************** LIBRARY SETUP FOR ossim_hdf5_plugin******************") 7 | 8 | INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}) 9 | # Include ossim cmake stuff: 10 | include(OssimVersion) 11 | include(OssimCommonVariables) 12 | include(OssimUtilities) 13 | 14 | SET(requiredLibs) 15 | 16 | set(HDF5_USE_STATIC_LIBRARIES FALSE) 17 | 18 | find_package(HDF5A) 19 | IF(HDF5A_FOUND) 20 | INCLUDE_DIRECTORIES( ${HDF5_INCLUDE_DIR} ) 21 | SET(requiredLibs ${requiredLibs} ${HDF5_LIBRARIES} ) 22 | ELSE(HDF5A_FOUND) 23 | MESSAGE(FATAL_ERROR "Could not find hdf5") 24 | ENDIF(HDF5A_FOUND) 25 | 26 | FILE(GLOB OSSIMPLUGIN_SRCS *.cpp) 27 | FILE(GLOB OSSIMPLUGIN_HEADERS *.h) 28 | 29 | #### 30 | # OSSIMPLUGINSMAKINGDLL controls dll linkage on windows. 31 | # Adding this sets OSSIM_PLUGINS_DLL #define TO "__declspec(dllexport)". 32 | ### 33 | add_definitions("-DOSSIMPLUGINSMAKINGDLL") 34 | 35 | # Adjust the install library path: 36 | if(OSSIM_INSTALL_PLUGINS_WITH_VERSION) 37 | set(INSTALL_LIBRARY_DIR "${INSTALL_LIBRARY_DIR}/ossim-${OSSIM_VERSION}/plugins") 38 | else(OSSIM_INSTALL_PLUGINS_WITH_VERSION) 39 | set(INSTALL_LIBRARY_DIR "${INSTALL_LIBRARY_DIR}/ossim/plugins") 40 | endif(OSSIM_INSTALL_PLUGINS_WITH_VERSION) 41 | if(WIN32) 42 | set(INSTALL_RUNTIME_DIR "${INSTALL_RUNTIME_DIR}/ossim/plugins") 43 | endif() 44 | 45 | OSSIM_LINK_LIBRARY(${LIB_NAME} 46 | COMPONENT_NAME ossim TYPE "${OSSIM_PLUGIN_LINK_TYPE}" 47 | LIBRARIES ${OSSIM_LIBRARY} ${requiredLibs} 48 | HEADERS "${OSSIMPLUGIN_HEADERS}" 49 | SOURCE_FILES "${OSSIMPLUGIN_SRCS}" 50 | INSTALL_LIB) 51 | 52 | MESSAGE( STATUS "HDF5 Plugin required libs = ${requiredLibs}" ) 53 | -------------------------------------------------------------------------------- /hdf5_archived/src/old_h5/ossimH5Info.h: -------------------------------------------------------------------------------- 1 | //---------------------------------------------------------------------------- 2 | // 3 | // License: LGPL 4 | // 5 | // See LICENSE.txt file in the top level directory for more details. 6 | // 7 | // Author: David Burken 8 | // 9 | // Description: HDF5 Info class. 10 | // 11 | //---------------------------------------------------------------------------- 12 | // $Id$ 13 | 14 | #ifndef ossimH5Info_HEADER 15 | #define ossimH5Info_HEADER 1 16 | 17 | #include 18 | #include 19 | #include 20 | #include 21 | 22 | class ossimEndian; 23 | 24 | /** 25 | * @brief TIFF info class. 26 | * 27 | * Encapsulates the listgeo functionality. 28 | */ 29 | class OSSIM_PLUGINS_DLL ossimH5Info : public ossimInfoBase 30 | { 31 | public: 32 | 33 | /** default constructor */ 34 | ossimH5Info(); 35 | 36 | /** virtual destructor */ 37 | virtual ~ossimH5Info(); 38 | 39 | /** 40 | * @brief open method. 41 | * 42 | * @param file File name to open. 43 | * 44 | * @return true on success false on error. 45 | */ 46 | virtual bool open(const ossimFilename& file); 47 | 48 | /** 49 | * Print method. 50 | * 51 | * @param out Stream to print to. 52 | * 53 | * @return std::ostream& 54 | */ 55 | virtual std::ostream& print(std::ostream& out) const; 56 | 57 | private: 58 | 59 | ossimFilename m_file; 60 | }; 61 | 62 | #endif /* End of "#ifndef ossimH5Info_HEADER" */ 63 | -------------------------------------------------------------------------------- /hdf5_archived/src/old_h5/ossimH5InfoFactory.cpp: -------------------------------------------------------------------------------- 1 | //---------------------------------------------------------------------------- 2 | // 3 | // License: LGPL 4 | // 5 | // See LICENSE.txt file in the top level directory for more details. 6 | // 7 | // Author: David Burken 8 | // 9 | // Copied from Mingjie Su's ossimHdfInfoFactory 10 | // 11 | // Description: Factory for info objects. 12 | // 13 | //---------------------------------------------------------------------------- 14 | // $Id$ 15 | 16 | #include "ossimH5InfoFactory.h" 17 | #include 18 | #include 19 | #include 20 | #include 21 | #include "ossimH5Info.h" 22 | 23 | ossimH5InfoFactory::~ossimH5InfoFactory() 24 | {} 25 | 26 | ossimH5InfoFactory* ossimH5InfoFactory::instance() 27 | { 28 | static ossimH5InfoFactory sharedInstance; 29 | 30 | return &sharedInstance; 31 | } 32 | 33 | ossimInfoBase* ossimH5InfoFactory::create(const ossimFilename& file) const 34 | { 35 | ossimRefPtr result = 0; 36 | 37 | // cout << "Calling ossimH5Info ***********************" << endl; 38 | result = new ossimH5Info(); 39 | if ( result->open(file) ) 40 | { 41 | return result.release(); 42 | } 43 | 44 | return 0; 45 | } 46 | 47 | ossimH5InfoFactory::ossimH5InfoFactory() 48 | {} 49 | 50 | ossimH5InfoFactory::ossimH5InfoFactory(const ossimH5InfoFactory& /* obj */ ) 51 | {} 52 | 53 | const ossimH5InfoFactory& ossimH5InfoFactory::operator=( 54 | const ossimH5InfoFactory& /* rhs */) 55 | { 56 | return *this; 57 | } 58 | 59 | -------------------------------------------------------------------------------- /hdf5_archived/src/old_h5/ossimH5InfoFactory.h: -------------------------------------------------------------------------------- 1 | //---------------------------------------------------------------------------- 2 | // 3 | // License: LGPL 4 | // 5 | // See LICENSE.txt file in the top level directory for more details. 6 | // 7 | // Author: David Burken 8 | // 9 | // Copied from Mingjie Su's ossimHdfInfoFactory 10 | // 11 | // Description: Factory for hdf info objects. 12 | // 13 | //---------------------------------------------------------------------------- 14 | // $Id$ 15 | #ifndef ossimH5InfoFactory_HEADER 16 | #define ossimH5InfoFactory_HEADER 1 17 | 18 | #include 19 | #include 20 | 21 | class ossimFilename; 22 | class ossimInfoBase; 23 | 24 | /** 25 | * @brief Info factory. 26 | */ 27 | class ossimH5InfoFactory : public ossimInfoFactoryInterface 28 | { 29 | public: 30 | 31 | /** virtual destructor */ 32 | virtual ~ossimH5InfoFactory(); 33 | 34 | static ossimH5InfoFactory* instance(); 35 | 36 | /** 37 | * @brief create method. 38 | * 39 | * @param file Some file you want info for. 40 | * 41 | * @return ossimInfoBase* on success 0 on failure. Caller is responsible 42 | * for memory. 43 | */ 44 | virtual ossimInfoBase* create(const ossimFilename& file) const; 45 | 46 | private: 47 | 48 | /** hidden from use default constructor */ 49 | ossimH5InfoFactory(); 50 | 51 | /** hidden from use copy constructor */ 52 | ossimH5InfoFactory(const ossimH5InfoFactory& obj); 53 | 54 | /** hidden from use operator = */ 55 | const ossimH5InfoFactory& operator=(const ossimH5InfoFactory& rhs); 56 | }; 57 | 58 | #endif /* End of "#ifndef ossimH5InfoFactory_HEADER" */ 59 | -------------------------------------------------------------------------------- /hdf5_archived/src/old_h5/ossimH5Options.h: -------------------------------------------------------------------------------- 1 | #ifndef ossimH5Options_HEADER 2 | #define ossimH5Options_HEADER 3 | #include 4 | #include 5 | class ossimH5Options 6 | { 7 | public: 8 | typedef std::vector StringListType; 9 | 10 | static ossimH5Options* instance(); 11 | 12 | /*! 13 | * METHOD: loadPreferences() 14 | * These methods clear the current preferences and load either the default 15 | * preferences file or the specified file. Returns TRUE if loaded properly: 16 | */ 17 | bool loadOptions(const ossimKeywordlist& kwl, const char* prefix); 18 | 19 | ossim_uint32 getMaxRecursionLevel()const; 20 | 21 | bool isDatasetRenderable(const std::string& datasetName)const; 22 | bool isDatasetExcluded(const std::string& datasetName)const; 23 | const StringListType& getRenderableDataset()const; 24 | 25 | protected: 26 | /*! 27 | * Override the compiler default constructors: 28 | */ 29 | ossimH5Options(); 30 | ossimH5Options(const ossimH5Options&) {} 31 | 32 | void operator = (const ossimH5Options&) const {} 33 | 34 | static void loadRenderableDatasetsFromString(StringListType& result, 35 | const ossimString& datasets); 36 | static ossimH5Options* m_instance; 37 | 38 | ossim_uint32 m_maxRecursionLevel; 39 | StringListType m_renderableDatasets; 40 | }; 41 | 42 | #endif 43 | -------------------------------------------------------------------------------- /hdf5_archived/src/ossimViirsHandler.cpp: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * * 3 | * O S S I M * 4 | * Open Source, Geospatial Image Processing Project * 5 | * License: MIT, see LICENSE at the top-level directory * 6 | * * 7 | *****************************************************************************/ 8 | 9 | #include "ossimViirsHandler.h" 10 | #include 11 | 12 | static const ossimString VIIRS_DATASET ("/All_Data/VIIRS-DNB-SDR_All/Radiance"); 13 | static const ossimString VIIRS_GEOMETRY ("/All_Data/VIIRS-DNB-GEO_All"); 14 | 15 | ossimViirsHandler::ossimViirsHandler() 16 | { 17 | m_renderableNames.push_back(VIIRS_DATASET); 18 | } 19 | 20 | ossimRefPtr ossimViirsHandler::getImageGeometry() 21 | { 22 | if (theGeometry.valid()) 23 | return theGeometry; 24 | 25 | theGeometry = getExternalImageGeometry(); 26 | if (!theGeometry.valid() && isOpen()) 27 | { 28 | theGeometry = new ossimImageGeometry(); 29 | 30 | // Attempt to create an OSSIM coarse grid model from HDF5 lat lon grids: 31 | ossimRefPtr hdf5GridModel = new ossimHdf5GridModel; 32 | if ( hdf5GridModel->initialize(m_hdf5.get()) ) 33 | { 34 | theGeometry->setProjection(hdf5GridModel.get()); 35 | initImageParameters( theGeometry.get() ); 36 | } 37 | else 38 | theGeometry = 0; 39 | } 40 | 41 | return theGeometry; 42 | } 43 | 44 | 45 | double ossimViirsHandler::getNullPixelValue(ossim_uint32 band) const 46 | { 47 | // NPP VIIRS data has null of "-999.3". 48 | return -999.3; 49 | } 50 | -------------------------------------------------------------------------------- /hdf5_archived/src/ossimViirsHandler.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * * 3 | * O S S I M * 4 | * Open Source, Geospatial Image Processing Project * 5 | * License: MIT, see LICENSE at the top-level directory * 6 | * * 7 | *****************************************************************************/ 8 | 9 | #ifndef OSSIM_PLUGINS_HDF5_SRC_OSSIMVIIRSHANDLER_H_ 10 | #define OSSIM_PLUGINS_HDF5_SRC_OSSIMVIIRSHANDLER_H_ 11 | 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | 18 | /** 19 | * Concrete class for reading VIIRS data from HDF5 file 20 | */ 21 | class OSSIM_PLUGINS_DLL ossimViirsHandler : public ossimHdf5ImageHandler 22 | { 23 | public: 24 | ossimViirsHandler(); 25 | virtual ossimRefPtr getImageGeometry(); 26 | virtual double getNullPixelValue(ossim_uint32 band=0)const; 27 | 28 | }; 29 | 30 | 31 | 32 | #endif /* OSSIM_PLUGINS_HDF5_SRC_OSSIMVIIRSHANDLER_H_ */ 33 | -------------------------------------------------------------------------------- /hdf5_archived/test/CMakeLists.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ossimlabs/ossim-plugins/188c01d3b53cb0a2d0d6cf0c9445bc9ace86a074/hdf5_archived/test/CMakeLists.txt -------------------------------------------------------------------------------- /jpeg12/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | #--- 2 | # File: jpeg12/CMakeLists.txt 3 | #--- 4 | add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/src ${CMAKE_CURRENT_BINARY_DIR}/src) 5 | 6 | #IF(BUILD_OSSIM_TESTS) 7 | # add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/test ${CMAKE_CURRENT_BINARY_DIR}/test) 8 | #ENDIF() 9 | -------------------------------------------------------------------------------- /jpeg12/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2015 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | 23 | -------------------------------------------------------------------------------- /jpeg12/README.md: -------------------------------------------------------------------------------- 1 | # ossim-jpeg12-plugin 2 | 3 | OSSIM Plugin for reading nitf files with 12 bit jpeg compressed blocks. 4 | 5 | ## Build Instructions for plugin: 6 | 7 | This plugin is built as part of the OSSIM suite of repositories. See the build instructions in [ossim/README.md](http://github.com/ossimlabs/ossim/blob/master/README.md). As long as this repository is located in the same parent directory as [OSSIM](http://github.com/ossimlabs/ossim), CMake will detect it and create the Makefiles in `//ossim-jpeg12-plugin`. You can `cd` into that directory and type `make` if you only want to build the plugin. 8 | 9 | ## Runtime and OSSIM Preferences File 10 | There is an ossim preferences file template/example in the repository at [`ossim/share/ossim/templates/ossim_preferences_template`](http://github.com/ossimlabs/ossim/blob/master/share/ossim/templates/ossim_preferences_template). Copy it to some known location. All OSSIM applications will look for this file to configure the runtime. Set the environment variable `OSSIM_PREFS_FILE` to point to your working prefs file prior to running any OSSIM application. 11 | 12 | In your preferences file, add the following line in the section for plugins: 13 | ``` 14 | plugin.fileX: /path/to/your/ossim-jpeg12-plugin.so 15 | ``` 16 | The extension will of course depend on your OS. Replace X with a consecutive index (starting at 0 or 1). The plugins are loaded in the order of these indexes. The path should be your OSSIM install path, or you can use your output build's `lib` directory during development. 17 | -------------------------------------------------------------------------------- /jpeg12/src/ossimJpegMemSrc12.h: -------------------------------------------------------------------------------- 1 | //---------------------------------------------------------------------------- 2 | // License: See top level LICENSE.txt file. 3 | // 4 | // Author: David Burken, original code from Thomas G. Lane 5 | // 6 | // Description: 7 | // 8 | // Code interfaces to use with jpeg-6b library to read a jpeg image from 9 | // memory. Specialized for 12 bit compiled jpeg library. 10 | //---------------------------------------------------------------------------- 11 | // $Id$ 12 | #ifndef ossimJpegMemSrc12_HEADER 13 | #define ossimJpegMemSrc12_HEADER 1 14 | 15 | #include /** for OSSIM_DLL export macro */ 16 | #include /** For size_t. */ 17 | 18 | // Forword declarations to avoid jpeg includes in the header. 19 | struct jpeg12_decompress_struct; 20 | 21 | extern "C" 22 | { 23 | /** 24 | * @brief Method which uses memory instead of a FILE* to read from. 25 | * @note Used in place of "jpeg_stdio_src(&cinfo, infile)". 26 | */ 27 | OSSIM_DLL void ossimJpegMemorySrc12 ( jpeg12_decompress_struct* cinfo, 28 | const ossim_uint8* buffer, 29 | std::size_t bufsize ); 30 | } 31 | 32 | #endif /* #ifndef ossimJpegMemSrc12_HEADER */ 33 | -------------------------------------------------------------------------------- /kakadu/.gitignore: -------------------------------------------------------------------------------- 1 | *~ 2 | -------------------------------------------------------------------------------- /kakadu/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Top level ossim kakadu plugin CMakeLists.txt file. 2 | 3 | add_subdirectory(src) 4 | 5 | #IF(BUILD_OSSIM_TESTS) 6 | # add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/test ${CMAKE_CURRENT_BINARY_DIR}/test) 7 | #ENDIF() 8 | -------------------------------------------------------------------------------- /kakadu/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2015 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | 23 | -------------------------------------------------------------------------------- /kakadu/src/ossimJpipProjectionFactory.h: -------------------------------------------------------------------------------- 1 | #ifndef ossimJpipProjectionFactory_HEADER 2 | #define ossimJpipProjectionFactory_HEADER 1 3 | #include 4 | 5 | class ossimJpipProjectionFactory : public ossimProjectionFactoryBase 6 | { 7 | public: 8 | /*! 9 | * METHOD: instance() 10 | * Instantiates singleton instance of this class: 11 | */ 12 | static ossimJpipProjectionFactory* instance(); 13 | 14 | virtual ossimProjection* createProjection(const ossimFilename& filename, 15 | ossim_uint32 entryIdx)const; 16 | /*! 17 | * METHOD: create() 18 | * Attempts to create an instance of the projection specified by name. 19 | * Returns successfully constructed projection or NULL. 20 | */ 21 | virtual ossimProjection* createProjection(const ossimString& name)const; 22 | virtual ossimProjection* createProjection(const ossimKeywordlist& kwl, 23 | const char* prefix = 0)const; 24 | virtual ossimObject* createObject(const ossimString& typeName)const; 25 | 26 | /*! 27 | * Creates and object given a keyword list. 28 | */ 29 | virtual ossimObject* createObject(const ossimKeywordlist& kwl, 30 | const char* prefix=0)const; 31 | 32 | /*! 33 | * This should return the type name of all objects in all factories. 34 | * This is the name used to construct the objects dynamially and this 35 | * name must be unique. 36 | */ 37 | virtual void getTypeNameList(std::vector& typeList)const; 38 | 39 | protected: 40 | ossimJpipProjectionFactory(); 41 | 42 | TYPE_DATA; 43 | }; 44 | 45 | #endif 46 | -------------------------------------------------------------------------------- /kakadu/src/ossimKakaduJ2kCodec.cpp: -------------------------------------------------------------------------------- 1 | #include "ossimKakaduJ2kCodec.h" 2 | 3 | ossimKakaduJ2kCodec::ossimKakaduJ2kCodec() 4 | : m_extension("jp2"), 5 | m_codecType("j2k") 6 | { 7 | 8 | } 9 | 10 | ossimString ossimKakaduJ2kCodec::getCodecType() const 11 | { 12 | return m_codecType; 13 | } 14 | 15 | bool ossimKakaduJ2kCodec::encode(const ossimRefPtr &in, 16 | std::vector &out) const 17 | { 18 | bool result = false; 19 | 20 | return false; 21 | } 22 | 23 | bool ossimKakaduJ2kCodec::decode(const std::vector &in, 24 | ossimRefPtr &out) const 25 | { 26 | bool result = false; 27 | 28 | return false; 29 | } 30 | 31 | const std::string &ossimKakaduJ2kCodec::getExtension() const 32 | { 33 | return m_extension; 34 | } 35 | 36 | bool ossimKakaduJ2kCodec::loadState(const ossimKeywordlist &kwl, const char *prefix) 37 | { 38 | std::cout << "LOADING AND INITIALIZING THE DECOMPRESSOR AND COMPRESSORS\n"; 39 | 40 | return true; 41 | } 42 | -------------------------------------------------------------------------------- /kakadu/src/ossimKakaduJ2kCodec.h: -------------------------------------------------------------------------------- 1 | #ifndef ossimKakaduJ2kCodec_HEADER 2 | #define ossimKakaduJ2kCodec_HEADER 1 3 | #include 4 | 5 | class ossimKakaduJ2kCodec : public ossimCodecBase 6 | { 7 | public: 8 | ossimKakaduJ2kCodec(); 9 | 10 | /** 11 | * Will return the identifier used to identify the codec type. For example the Jpeg codec 12 | * will have "jpeg" as the identifier 13 | * 14 | * @return Codec identifier 15 | */ 16 | virtual ossimString getCodecType() const; 17 | 18 | /** 19 | * @brief Encode method. 20 | * 21 | * 22 | * @param in Input data to encode. 23 | * 24 | * @param out Encoded output data. 25 | * 26 | * @return true on success, false on failure. 27 | */ 28 | 29 | virtual bool encode(const ossimRefPtr &in, 30 | std::vector &out) const; 31 | 32 | /** 33 | * @brief Decode method. 34 | * 35 | * @param in Input data to decode. 36 | * 37 | * @param out Output tile. If the pointer to ossimImageData is null 38 | * internally it will be created. For code loops it is better to pre 39 | * initialized to correct size. 40 | * 41 | * @note Caller should set "out's" image rectangle upon successful 42 | * decode. 43 | * 44 | * @return true on success, false on failure. 45 | */ 46 | virtual bool decode(const std::vector &in, 47 | ossimRefPtr &out) const; 48 | 49 | virtual const std::string &getExtension() const; 50 | 51 | virtual bool loadState(const ossimKeywordlist& kwl, const char* prefix=0); 52 | protected: 53 | std::string m_extension; 54 | ossimString m_codecType; 55 | }; 56 | 57 | #endif -------------------------------------------------------------------------------- /kakadu/src/ossimKakaduJpipImageGeometryFactory.h: -------------------------------------------------------------------------------- 1 | #ifndef ossimKakaduJpipImageGeometryFactory_HEADER 2 | #define ossimKakaduJpipImageGeometryFactory_HEADER 1 3 | #include 4 | 5 | class ossimImageHandler; 6 | class ossimKakaduJpipImageGeometryFactory : public ossimImageGeometryFactoryBase 7 | { 8 | public: 9 | static ossimKakaduJpipImageGeometryFactory* instance(); 10 | virtual ossimImageGeometry* createGeometry(const ossimString& typeName)const; 11 | virtual ossimImageGeometry* createGeometry(const ossimKeywordlist& kwl, 12 | const char* prefix=0)const; 13 | virtual ossimImageGeometry* createGeometry(const ossimFilename& filename, 14 | ossim_uint32 entryIdx)const; 15 | virtual bool extendGeometry(ossimImageHandler* handler)const; 16 | 17 | virtual void getTypeNameList(std::vector& typeList)const; 18 | 19 | /** 20 | * This is a utility method used by crateGeoemtry that takes an image handler 21 | */ 22 | virtual ossim2dTo2dTransform* createTransform(ossimImageHandler* handler)const; 23 | 24 | 25 | /** 26 | * This is a utility method used by crateGeoemtry that takes keywordlist and prefix 27 | */ 28 | virtual ossim2dTo2dTransform* createTransform(const ossimKeywordlist& kwl, 29 | const char* prefix=0)const; 30 | 31 | /** 32 | * @brief Utility method to create a projection from an image handler. 33 | * @param handler The image handler to create projection from. 34 | * @return Pointer to an ossimProjection on success, null on error. 35 | */ 36 | virtual ossimProjection* createProjection(ossimImageHandler* handler) const; 37 | 38 | protected: 39 | ossimKakaduJpipImageGeometryFactory(); 40 | 41 | }; 42 | 43 | #endif 44 | -------------------------------------------------------------------------------- /kakadu/src/ossimKakaduJpipInfo.h: -------------------------------------------------------------------------------- 1 | //---------------------------------------------------------------------------- 2 | // 3 | // License: LGPL 4 | // 5 | // See LICENSE.txt file in the top level directory for more details. 6 | // 7 | // Author: Garrett Potts 8 | // 9 | // Description: Does an information dump of any XML JP2 boxes plus basic 10 | // image information 11 | // 12 | //---------------------------------------------------------------------------- 13 | // $Id$ 14 | #ifndef ossimKakduJpipInfo_HEADER 15 | #define ossimKakduJpipInfo_HEADER 16 | 17 | #include 18 | #include 19 | #include 20 | #include 21 | #include "ossimKakaduJpipHandler.h" 22 | class ossimFilename; 23 | class ossimKeywordlist; 24 | 25 | /** 26 | * @brief Info Base. 27 | * 28 | * This is the base class for all info objects. The purpose of an Info object 29 | * is to dump whatever info is available for a given file name to user. 30 | */ 31 | class ossimKakaduJpipInfo : public ossimInfoBase 32 | { 33 | public: 34 | 35 | /** default constructor */ 36 | ossimKakaduJpipInfo(); 37 | /** virtual destructor */ 38 | virtual ~ossimKakaduJpipInfo(); 39 | 40 | 41 | /** 42 | * @brief open method. 43 | * 44 | * @param file File name to open. 45 | * 46 | * @return true on success false on error. 47 | */ 48 | virtual bool open(const ossimFilename& file); 49 | 50 | /** 51 | * Print method. 52 | * 53 | * @param out Stream to print to. 54 | * 55 | * @return std::ostream& 56 | */ 57 | virtual std::ostream& print(std::ostream& out) const; 58 | 59 | virtual void setHandler(ossimKakaduJpipHandler* handler); 60 | protected: 61 | mutable ossimRefPtr m_handler; 62 | 63 | }; 64 | 65 | #endif /* End of "#ifndef ossimInfoBase_HEADER" */ 66 | -------------------------------------------------------------------------------- /kakadu/src/ossimKakaduJpipInfoFactory.cpp: -------------------------------------------------------------------------------- 1 | #include "ossimKakaduJpipInfoFactory.h" 2 | #include "ossimKakaduJpipInfo.h" 3 | #include 4 | #include 5 | #include 6 | 7 | ossimKakaduJpipInfoFactory::~ossimKakaduJpipInfoFactory() 8 | { 9 | } 10 | 11 | ossimKakaduJpipInfoFactory* ossimKakaduJpipInfoFactory::instance() 12 | { 13 | static ossimKakaduJpipInfoFactory inst; 14 | return &inst; 15 | } 16 | 17 | std::shared_ptr ossimKakaduJpipInfoFactory::create(const ossimFilename& file) const 18 | { 19 | 20 | std::shared_ptr jpipInfo = std::make_shared(); 21 | if(!jpipInfo->open(file)) 22 | { 23 | jpipInfo.reset(); 24 | } 25 | return jpipInfo; 26 | } 27 | 28 | std::shared_ptr ossimKakaduJpipInfoFactory::create(std::shared_ptr& str, 29 | const std::string& connectionString)const 30 | { 31 | std::shared_ptr jpipInfo; 32 | 33 | return jpipInfo; 34 | } 35 | /** hidden from use default constructor */ 36 | ossimKakaduJpipInfoFactory::ossimKakaduJpipInfoFactory() 37 | { 38 | } 39 | 40 | /** hidden from use copy constructor */ 41 | ossimKakaduJpipInfoFactory::ossimKakaduJpipInfoFactory(const ossimKakaduJpipInfoFactory& ) 42 | { 43 | 44 | } 45 | 46 | /** hidden from use operator = */ 47 | const ossimKakaduJpipInfoFactory& ossimKakaduJpipInfoFactory::operator=(const ossimKakaduJpipInfoFactory& ) 48 | { 49 | return *this; 50 | } 51 | -------------------------------------------------------------------------------- /kakadu/src/ossimKakaduJpipInfoFactory.h: -------------------------------------------------------------------------------- 1 | #ifndef ossimKakaduJpipInfoFactory_HEADER 2 | #define ossimKakaduJpipInfoFactory_HEADER 1 3 | #include 4 | 5 | class ossimKakaduJpipInfoFactory : public ossimInfoFactoryInterface 6 | { 7 | public: 8 | 9 | /** virtual destructor */ 10 | virtual ~ossimKakaduJpipInfoFactory(); 11 | 12 | static ossimKakaduJpipInfoFactory* instance(); 13 | 14 | /** 15 | * @brief create method. 16 | * 17 | * @param file Some file you want info for. 18 | * 19 | * @return ossimInfoBase* on success 0 on failure. Caller is responsible 20 | * for memory. 21 | */ 22 | virtual std::shared_ptr create(const ossimFilename& file) const; 23 | virtual std::shared_ptr create(std::shared_ptr& str, 24 | const std::string& connectionString) const; 25 | 26 | private: 27 | 28 | /** hidden from use default constructor */ 29 | ossimKakaduJpipInfoFactory(); 30 | 31 | /** hidden from use copy constructor */ 32 | ossimKakaduJpipInfoFactory(const ossimKakaduJpipInfoFactory& obj); 33 | 34 | /** hidden from use operator = */ 35 | const ossimKakaduJpipInfoFactory& operator=(const ossimKakaduJpipInfoFactory& rhs); 36 | 37 | }; 38 | 39 | #endif 40 | -------------------------------------------------------------------------------- /kakadu/src/ossimKakaduKeywords.h: -------------------------------------------------------------------------------- 1 | //---------------------------------------------------------------------------- 2 | // 3 | // License: LGPL 4 | // 5 | // See LICENSE.txt file in the top level directory for more details. 6 | // 7 | // Description: Header file for common keyword names. 8 | // 9 | //---------------------------------------------------------------------------- 10 | // $Id: ossimKakaduKeywords.h 19904 2011-08-05 17:50:32Z dburken $ 11 | 12 | #ifndef ossimKakaduKeywords_HEADER 13 | #define ossimKakaduKeywords_HEADER 1 14 | 15 | static const ossimString COMPRESSION_RATTIO_KW = "compression_ratio"; 16 | static const ossimString LEVELS_KW = "levels"; 17 | static const ossimString REVERSIBLE_KW = "reversible"; 18 | static const ossimString THREADS_KW = "threads"; 19 | static const ossimString ADD_ALPHA_CHANNEL_KW = "add_alpha_channel"; 20 | 21 | #endif /* #ifndef ossimKakaduKeywords_HEADER */ 22 | -------------------------------------------------------------------------------- /kakadu/src/ossimKakaduOverviewBuilderFactory.cpp: -------------------------------------------------------------------------------- 1 | //---------------------------------------------------------------------------- 2 | // 3 | // License: LGPL 4 | // 5 | // See LICENSE.txt file in the top level directory for more details. 6 | // 7 | // Description: The ossim kakadu overview builder factory. 8 | // 9 | //---------------------------------------------------------------------------- 10 | // $Id: ossimKakaduOverviewBuilderFactory.cpp 22884 2014-09-12 13:14:35Z dburken $ 11 | 12 | #include "ossimKakaduOverviewBuilderFactory.h" 13 | #include "ossimKakaduNitfOverviewBuilder.h" 14 | 15 | ossimKakaduOverviewBuilderFactory* ossimKakaduOverviewBuilderFactory::instance() 16 | { 17 | static ossimKakaduOverviewBuilderFactory inst; 18 | return &inst; 19 | } 20 | 21 | ossimKakaduOverviewBuilderFactory::~ossimKakaduOverviewBuilderFactory() 22 | { 23 | } 24 | 25 | ossimOverviewBuilderBase* ossimKakaduOverviewBuilderFactory::createBuilder( 26 | const ossimString& typeName) const 27 | { 28 | ossimRefPtr result = new ossimKakaduNitfOverviewBuilder(); 29 | if ( result->hasOverviewType(typeName) == false ) 30 | { 31 | result = 0; 32 | } 33 | 34 | return result.release(); 35 | } 36 | 37 | void ossimKakaduOverviewBuilderFactory::getTypeNameList( 38 | std::vector& typeList) const 39 | { 40 | ossimRefPtr builder = new ossimKakaduNitfOverviewBuilder(); 41 | builder->getTypeNameList(typeList); 42 | builder = 0; 43 | } 44 | 45 | ossimKakaduOverviewBuilderFactory::ossimKakaduOverviewBuilderFactory() 46 | { 47 | } 48 | 49 | ossimKakaduOverviewBuilderFactory::ossimKakaduOverviewBuilderFactory( 50 | const ossimKakaduOverviewBuilderFactory& /* obj */) 51 | { 52 | } 53 | 54 | void ossimKakaduOverviewBuilderFactory::operator=( 55 | const ossimKakaduOverviewBuilderFactory& /* rhs */) 56 | { 57 | } 58 | -------------------------------------------------------------------------------- /kakadu/test/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # TBD 2 | -------------------------------------------------------------------------------- /kakadu/test/README.txt: -------------------------------------------------------------------------------- 1 | Unit and functional tests for plugin code goes here. 2 | -------------------------------------------------------------------------------- /kml/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/src ${CMAKE_CURRENT_BINARY_DIR}/src) 2 | 3 | #IF(BUILD_OSSIM_TESTS) 4 | # add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/test ${CMAKE_CURRENT_BINARY_DIR}/test) 5 | #ENDIF() 6 | 7 | 8 | -------------------------------------------------------------------------------- /kml/README.md: -------------------------------------------------------------------------------- 1 | # ossim-kml-plugin 2 | Plugin for reading and writing KML format 3 | 4 | -------------------------------------------------------------------------------- /kml/src/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | set(LIB_NAME ossim_kml_plugin) 2 | MESSAGE( "************** LIBRARY SETUP FOR ossim_kml_plugin******************") 3 | 4 | # Include ossim cmake stuff: 5 | include(OssimVersion) 6 | include(OssimCommonVariables) 7 | include(OssimUtilities) 8 | 9 | INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}) 10 | 11 | SET(requiredLibs) 12 | 13 | find_package(MiniZip) 14 | if(MINIZIP_FOUND) 15 | include_directories(${MINIZIP_INCLUDE_DIR}) 16 | set(requiredLibs ${requiredLibs} ${MINIZIP_LIBRARIES}) 17 | else(MINIZIP_FOUND) 18 | message(FATAL_ERROR "Could not find minizip") 19 | endif(MINIZIP_FOUND) 20 | 21 | FILE(GLOB_RECURSE OSSIMPLUGIN_SRCS *.cpp) 22 | FILE(GLOB_RECURSE OSSIMPLUGIN_HEADERS *.h) 23 | 24 | #### 25 | # OSSIMPLUGINSMAKINGDLL controls dll linkage on windows. 26 | # Adding this sets OSSIM_PLUGINS_DLL #define TO "__declspec(dllexport)". 27 | ### 28 | add_definitions("-DOSSIMPLUGINSMAKINGDLL") 29 | 30 | # Adjust the install library path: 31 | if(OSSIM_INSTALL_PLUGINS_WITH_VERSION) 32 | set(INSTALL_LIBRARY_DIR "${INSTALL_LIBRARY_DIR}/ossim-${OSSIM_VERSION}/plugins") 33 | else(OSSIM_INSTALL_PLUGINS_WITH_VERSION) 34 | set(INSTALL_LIBRARY_DIR "${INSTALL_LIBRARY_DIR}/ossim/plugins") 35 | endif(OSSIM_INSTALL_PLUGINS_WITH_VERSION) 36 | if(WIN32) 37 | set(INSTALL_RUNTIME_DIR "${INSTALL_RUNTIME_DIR}/ossim/plugins") 38 | endif() 39 | 40 | OSSIM_LINK_LIBRARY(${LIB_NAME} 41 | COMPONENT_NAME ossim TYPE "${OSSIM_PLUGIN_LINK_TYPE}" 42 | LIBRARIES ${OSSIM_LIBRARY} ${requiredLibs} 43 | HEADERS "${OSSIMPLUGIN_HEADERS}" 44 | SOURCE_FILES "${OSSIMPLUGIN_SRCS}" 45 | INSTALL_LIB) 46 | -------------------------------------------------------------------------------- /kml/test/CMakeLists.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ossimlabs/ossim-plugins/188c01d3b53cb0a2d0d6cf0c9445bc9ace86a074/kml/test/CMakeLists.txt -------------------------------------------------------------------------------- /mrsid/.gitignore: -------------------------------------------------------------------------------- 1 | *~ 2 | -------------------------------------------------------------------------------- /mrsid/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Specify location of MrSID SDK containing Raster and LIDAR subdirectories. 2 | # It is assumed here that a symlink exists called MRSID_SDK_DIR in 3 | # this directory and points to the SDK directory. You can alternatively 4 | # hardcode the path here. See ./README.md file. 5 | IF(NOT DEFINED MRSID_DIR) 6 | SET(MRSID_DIR "${CMAKE_CURRENT_SOURCE_DIR}/MRSID_SDK_DIR") 7 | ENDIF() 8 | 9 | SET(BUILD_OSSIM_FRAMEWORKS "OFF") 10 | SET(OSSIM_PLUGIN_LINK_TYPE "SHARED") 11 | 12 | subdirs(src) 13 | 14 | #IF(BUILD_OSSIM_TESTS) 15 | # add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/test ${CMAKE_CURRENT_BINARY_DIR}/test) 16 | #ENDIF() 17 | 18 | -------------------------------------------------------------------------------- /mrsid/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2015 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | 23 | -------------------------------------------------------------------------------- /mrsid/test/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # TBD 2 | -------------------------------------------------------------------------------- /mrsid/test/README.txt: -------------------------------------------------------------------------------- 1 | Unit and functional tests for plugin code goes here. 2 | -------------------------------------------------------------------------------- /opencv/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | MESSAGE( "************** LIBRARY SETUP FOR ossim_opencv_plugin ******************") 2 | find_package( OpenCV ) 3 | if( OPENCV_FOUND ) 4 | include_directories( ${OPENCV_INCLUDE_DIR} ) 5 | set( requiredLib ${requiredLib} ${OPENCV_LIBRARIES} ) 6 | else( OPENCV_FOUND ) 7 | message( FATAL_ERROR "Could not find OpenCV package!" ) 8 | endif( OPENCV_FOUND ) 9 | 10 | add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/src ${CMAKE_CURRENT_BINARY_DIR}/src) 11 | 12 | #IF(BUILD_OSSIM_TESTS) 13 | # add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/test ${CMAKE_CURRENT_BINARY_DIR}/test) 14 | #ENDIF() 15 | 16 | 17 | -------------------------------------------------------------------------------- /opencv/README.md: -------------------------------------------------------------------------------- 1 | # ossim-opencv-plugin 2 | Plugin for automated image registration using the openCV library 3 | -------------------------------------------------------------------------------- /opencv/src/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | set(LIB_NAME ossim_opencv_plugin) 2 | 3 | # Include ossim cmake stuff: 4 | include(OssimVersion) 5 | include(OssimCommonVariables) 6 | include(OssimUtilities) 7 | 8 | INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}) 9 | 10 | FILE(GLOB_RECURSE OSSIMPLUGIN_SRCS *.cpp) 11 | FILE(GLOB_RECURSE OSSIMPLUGIN_HEADERS *.h) 12 | 13 | #### 14 | # OSSIMPLUGINSMAKINGDLL controls dll linkage on windows. 15 | # Adding this sets OSSIM_PLUGINS_DLL #define TO "__declspec(dllexport)". 16 | ### 17 | add_definitions("-DOSSIMPLUGINSMAKINGDLL") 18 | 19 | # Adjust the install library path: 20 | if(OSSIM_INSTALL_PLUGINS_WITH_VERSION) 21 | set(INSTALL_LIBRARY_DIR "${INSTALL_LIBRARY_DIR}/ossim-${OSSIM_VERSION}/plugins") 22 | else(OSSIM_INSTALL_PLUGINS_WITH_VERSION) 23 | set(INSTALL_LIBRARY_DIR "${INSTALL_LIBRARY_DIR}/ossim/plugins") 24 | endif(OSSIM_INSTALL_PLUGINS_WITH_VERSION) 25 | if(WIN32) 26 | set(INSTALL_RUNTIME_DIR "${INSTALL_RUNTIME_DIR}/ossim/plugins") 27 | endif() 28 | 29 | OSSIM_LINK_LIBRARY(${LIB_NAME} 30 | COMPONENT_NAME ossim TYPE "${OSSIM_PLUGIN_LINK_TYPE}" 31 | LIBRARIES ${OSSIM_LIBRARIES} ${requiredLib} 32 | HEADERS "${OSSIMPLUGIN_HEADERS}" 33 | SOURCE_FILES "${OSSIMPLUGIN_SRCS}" 34 | INSTALL_LIB) 35 | 36 | -------------------------------------------------------------------------------- /opencv/src/ossimIvtGeomXform.cpp: -------------------------------------------------------------------------------- 1 | #include "ossimIvtGeomXform.h" 2 | 3 | 4 | void ossimIvtGeomXform::viewToImage(const ossimDpt& viewPt, ossimDpt& ipt) 5 | { 6 | ipt.makeNan(); 7 | if(m_ivt.valid()) 8 | { 9 | m_ivt->viewToImage(viewPt, ipt); 10 | } 11 | } 12 | 13 | void ossimIvtGeomXform::imageToView(const ossimDpt& ipt, ossimDpt& viewPt) 14 | { 15 | viewPt.makeNan(); 16 | if(m_ivt.valid()) 17 | { 18 | m_ivt->imageToView(ipt, viewPt); 19 | } 20 | } 21 | void ossimIvtGeomXform::imageToGround(const ossimDpt& ipt, ossimGpt& gpt) 22 | { 23 | gpt.makeNan(); 24 | if(m_geom.valid()) 25 | { 26 | m_geom->localToWorld(ipt, gpt); 27 | } 28 | } 29 | void ossimIvtGeomXform::groundToImage(const ossimGpt& gpt, ossimDpt& ipt) 30 | { 31 | ipt.makeNan(); 32 | if(m_geom.valid()) 33 | { 34 | m_geom->worldToLocal(gpt, ipt); 35 | } 36 | } 37 | 38 | void ossimIvtGeomXform::viewToGround(const ossimDpt& viewPt, ossimGpt& gpt) 39 | { 40 | ossimDpt ipt; 41 | gpt.makeNan(); 42 | viewToImage(viewPt, ipt); 43 | if(!ipt.hasNans()) 44 | { 45 | imageToGround(ipt, gpt); 46 | } 47 | } 48 | 49 | void ossimIvtGeomXform::groundToView(const ossimGpt& gpt, ossimDpt& viewPt) 50 | { 51 | ossimDpt ipt; 52 | viewPt.makeNan(); 53 | 54 | groundToImage(gpt, ipt); 55 | if(!ipt.hasNans()) 56 | { 57 | imageToView(ipt, viewPt); 58 | } 59 | } 60 | 61 | -------------------------------------------------------------------------------- /opencv/src/ossimIvtGeomXform.h: -------------------------------------------------------------------------------- 1 | #ifndef ossimIvtGeomXform_HEADER 2 | #define ossimIvtGeomXform_HEADER 3 | #include 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include 9 | 10 | class ossimIvtGeomXform : public ossimReferenced 11 | { 12 | public: 13 | ossimIvtGeomXform(ossimImageViewTransform* trans, 14 | ossimImageGeometry* geom) 15 | : 16 | m_ivt(trans), 17 | m_geom(geom) 18 | {} 19 | 20 | void viewToImage(const ossimDpt& viewPt, ossimDpt& ipt); 21 | void imageToView(const ossimDpt& ipt, ossimDpt& viewPt); 22 | void imageToGround(const ossimDpt& ipt, ossimGpt& gpt); 23 | void groundToImage(const ossimGpt& gpt, ossimDpt& ipt); 24 | void viewToGround(const ossimDpt& viewPt, ossimGpt& gpt); 25 | void groundToView(const ossimGpt& gpt, ossimDpt& viewPt); 26 | ossimImageViewTransform* getIvt(){return m_ivt.get();} 27 | const ossimImageViewTransform* getIvt()const {return m_ivt.get();} 28 | ossimImageGeometry* getGeom(){return m_geom.get();} 29 | const ossimImageGeometry* getGeom()const{return m_geom.get();} 30 | 31 | protected: 32 | ossimRefPtr m_ivt; 33 | ossimRefPtr m_geom; 34 | }; 35 | 36 | #endif 37 | -------------------------------------------------------------------------------- /opencv/src/ossimIvtGeomXformVisitor.cpp: -------------------------------------------------------------------------------- 1 | #include "ossimIvtGeomXformVisitor.h" 2 | #include 3 | #include 4 | 5 | 6 | void ossimIvtGeomXformVisitor::visit(ossimObject* obj) 7 | { 8 | if(!hasVisited(obj)) 9 | { 10 | ossimImageRenderer* renderer = dynamic_cast(obj); 11 | if(renderer) 12 | { 13 | ossimImageViewProjectionTransform* ivpt = dynamic_cast(renderer->getImageViewTransform()); 14 | if(ivpt) 15 | { 16 | m_transformList.push_back(new ossimIvtGeomXform(ivpt, ivpt->getImageGeometry()) ); 17 | } 18 | else 19 | { 20 | ossimImageViewAffineTransform* ivat = dynamic_cast(renderer->getImageViewTransform()); 21 | if(ivat&&renderer->getInput()) 22 | { 23 | ossimTypeNameVisitor v("ossimImageHandler", true); 24 | renderer->accept(v); 25 | 26 | ossimImageHandler* handler = v.getObjectAs(0); 27 | if(handler) 28 | { 29 | ossimRefPtr geom = handler->getImageGeometry(); 30 | if(geom.valid()) 31 | { 32 | m_transformList.push_back(new ossimIvtGeomXform(ivat, geom.get()) ); 33 | } 34 | } 35 | } 36 | } 37 | } 38 | ossimVisitor::visit(obj); 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /opencv/src/ossimIvtGeomXformVisitor.h: -------------------------------------------------------------------------------- 1 | #ifndef ossimIvtGeomXformVisitor_HEADER 2 | #define ossimIvtGeomXformVisitor_HEADER 3 | #include 4 | #include "ossimIvtGeomXform.h" 5 | 6 | class ossimIvtGeomXformVisitor : public ossimVisitor 7 | { 8 | public: 9 | typedef std::vector > TransformList; 10 | 11 | ossimIvtGeomXformVisitor(int visitorType =(VISIT_INPUTS|VISIT_CHILDREN)) 12 | :ossimVisitor(visitorType) 13 | {} 14 | 15 | virtual ossimRefPtr dup()const{return new ossimIvtGeomXformVisitor(*this);} 16 | virtual void visit(ossimObject* obj); 17 | 18 | TransformList& getTransformList(){return m_transformList;} 19 | const TransformList& getTransformList()const{return m_transformList;} 20 | 21 | protected: 22 | TransformList m_transformList; 23 | }; 24 | 25 | #endif -------------------------------------------------------------------------------- /opencv/test/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required (VERSION 2.8) 2 | 3 | # Get the library suffix for lib or lib64. 4 | get_property(LIB64 GLOBAL PROPERTY FIND_LIBRARY_USE_LIB64_PATHS) 5 | if(LIB64) 6 | set(LIBSUFFIX 64) 7 | else() 8 | set(LIBSUFFIX "") 9 | endif() 10 | 11 | 12 | set(requiredLibs ${requiredLibs} ossim ) 13 | 14 | # Add the executable: 15 | add_executable(opencv-test opencv-test.cpp ) 16 | 17 | # Set the output dir: 18 | set_target_properties(opencv-test 19 | PROPERTIES 20 | RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin") 21 | 22 | target_link_libraries( opencv-test ${requiredLibs} ) 23 | 24 | -------------------------------------------------------------------------------- /openjpeg/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/src ${CMAKE_CURRENT_BINARY_DIR}/src) 2 | 3 | #IF(BUILD_OSSIM_TESTS) 4 | # add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/test ${CMAKE_CURRENT_BINARY_DIR}/test) 5 | #ENDIF() 6 | 7 | 8 | -------------------------------------------------------------------------------- /openjpeg/README.md: -------------------------------------------------------------------------------- 1 | # ossim-openjpeg-plugin 2 | Plugin for reading and writing JPEG format using openJPEG library 3 | -------------------------------------------------------------------------------- /openjpeg/src/ossimOpjKeywords.h: -------------------------------------------------------------------------------- 1 | //---------------------------------------------------------------------------- 2 | // 3 | // License: LGPL 4 | // 5 | // See LICENSE.txt file in the top level directory for more details. 6 | // 7 | // Description: Header file for common keyword names. 8 | // 9 | //---------------------------------------------------------------------------- 10 | // $Id: ossimOpjKeywords.h 19904 2011-08-05 17:50:32Z dburken $ 11 | 12 | #ifndef ossimOpjKeywords_HEADER 13 | #define ossimOpjKeywords_HEADER 1 14 | 15 | #include 16 | 17 | static const ossimString COMPRESSION_RATTIO_KW = "compression_ratio"; 18 | static const ossimString LEVELS_KW = "levels"; 19 | static const ossimString REVERSIBLE_KW = "reversible"; 20 | static const ossimString THREADS_KW = "threads"; 21 | static const ossimString ADD_ALPHA_CHANNEL_KW = "add_alpha_channel"; 22 | 23 | #endif /* #ifndef ossimOpjKeywords_HEADER */ 24 | -------------------------------------------------------------------------------- /openjpeg/test/CMakeLists.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ossimlabs/ossim-plugins/188c01d3b53cb0a2d0d6cf0c9445bc9ace86a074/openjpeg/test/CMakeLists.txt -------------------------------------------------------------------------------- /pdal/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | SET(BUILD_OSSIM_FRAMEWORKS "OFF") 2 | SET(OSSIM_PLUGIN_LINK_TYPE "SHARED") 3 | 4 | SET( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11" ) 5 | 6 | # Add our include and library... 7 | find_package(ossim) 8 | if(OSSIM_FOUND) 9 | include_directories( ${OSSIM_INCLUDE_DIR} ) 10 | set( requiredLibs ${requiredLibs} ${OSSIM_LIBRARIES} ) 11 | else(OSSIM_FOUND) 12 | message(FATAL_ERROR "Could not find ossim") 13 | endif(OSSIM_FOUND) 14 | INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}) 15 | 16 | find_package(PDAL) 17 | if(PDAL_FOUND) 18 | include_directories( ${PDAL_INCLUDE_DIR} ) 19 | set(requiredLibs ${requiredLibs} ${PDAL_LIBRARIES} ) 20 | else(PDAL_FOUND) 21 | message(FATAL_ERROR "Could not find ossim") 22 | endif(PDAL_FOUND) 23 | 24 | INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}) 25 | 26 | add_subdirectory( src ) 27 | 28 | #IF(BUILD_OSSIM_TESTS) 29 | # add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/test ${CMAKE_CURRENT_BINARY_DIR}/test) 30 | #ENDIF() 31 | 32 | -------------------------------------------------------------------------------- /pdal/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2015 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | 23 | -------------------------------------------------------------------------------- /pdal/README.md: -------------------------------------------------------------------------------- 1 | # ossim-pdal-plugin 2 | Contains C++ library code for reading and writing Point Cloud data using the PDAL library as well as the Rialto tiled point-cloud database library. 3 | -------------------------------------------------------------------------------- /pdal/src/ossimPdalFileReader.h: -------------------------------------------------------------------------------- 1 | //************************************************************************************************** 2 | // 3 | // OSSIM (http://trac.osgeo.org/ossim/) 4 | // 5 | // License: LGPL -- See LICENSE.txt file in the top level directory for more details. 6 | // 7 | //************************************************************************************************** 8 | // $Id: ossimPdalFileReader.h 23352 2015-05-29 17:38:12Z okramer $ 9 | 10 | #ifndef ossimPdalFileReader_HEADER 11 | #define ossimPdalFileReader_HEADER 1 12 | 13 | #include "ossimPdalReader.h" 14 | #include 15 | #include 16 | 17 | class ossimPointRecord; 18 | class Stage; 19 | 20 | #define USE_FULL_POINT_CLOUD_BUFFERING 21 | 22 | class OSSIM_PLUGINS_DLL ossimPdalFileReader : public ossimPdalReader 23 | { 24 | public: 25 | 26 | /** default constructor */ 27 | ossimPdalFileReader(); 28 | 29 | /** virtual destructor */ 30 | virtual ~ossimPdalFileReader(); 31 | 32 | /** Accepts the name of a point cloud file. Returns TRUE if successful. */ 33 | virtual bool open(const ossimFilename& fname); 34 | 35 | /** 36 | * Fetches up to maxNumPoints points at the given dataset in the order they 37 | * appear in the data file. Thread-safe implementation accepts a previously-allocated vector 38 | * from the caller. The offset is set to offset + block.size (or EOF) upon exit, to 39 | * permit sequencing with getNextBlock() implmented in base class. 40 | */ 41 | virtual void getFileBlock(ossim_uint32 offset, 42 | ossimPointBlock& block, 43 | ossim_uint32 maxNumPoints=0xFFFFFFFF) const; 44 | 45 | virtual ossim_uint32 getNumPoints() const; 46 | 47 | private: 48 | virtual void establishMinMax(); 49 | 50 | 51 | TYPE_DATA 52 | }; 53 | 54 | #endif /* #ifndef ossimPdalFileReader_HEADER */ 55 | -------------------------------------------------------------------------------- /pdal/test/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | message( "************** Begin: CMAKE SETUP FOR pdal-plugin-test ******************" ) 2 | 3 | cmake_minimum_required (VERSION 2.8) 4 | 5 | # Get the library suffix for lib or lib64. 6 | get_property(LIB64 GLOBAL PROPERTY FIND_LIBRARY_USE_LIB64_PATHS) 7 | if(LIB64) 8 | set(LIBSUFFIX 64) 9 | else() 10 | set(LIBSUFFIX "") 11 | endif() 12 | 13 | 14 | set(requiredLibs ${requiredLibs} ossim-pdal-plugin ) 15 | message( STATUS "Required libs = ${requiredLibs}" ) 16 | 17 | # --- 18 | # pdal-plugin-test app: 19 | # --- 20 | 21 | # Add the executable: 22 | add_executable(ossim-pdal-plugin-test plugin-test.cpp ) 23 | 24 | # Set the output dir: 25 | set_target_properties(ossim-pdal-plugin-test 26 | PROPERTIES 27 | RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin") 28 | 29 | # pdal-plugin-test application links with required libs. 30 | target_link_libraries( ossim-pdal-plugin-test ${requiredLibs} ) 31 | 32 | message( "************** End: CMAKE SETUP FOR pdal-plugin-test ******************" ) 33 | -------------------------------------------------------------------------------- /pdal/test/README.md: -------------------------------------------------------------------------------- 1 | # PDAL Plugin Tests 2 | 3 | A single executable provides testing for both the ossimPdalFileReader and ossimRialtoReader classes. After building, the executable is available in $OSSIM_BUILD_DIR/bin/ossim-pdal-plugin-test. The executable should be run out of this test directory if the default autzen data is to be used. 4 | 5 | The default test data is autzen.las, a small point cloud of ~10,000 points. Alternatively, a filename can be provided on the command line to use a different dataset. 6 | 7 | ## PDAL LAS File Generator 8 | 9 | This is not really a test, as it does not make use of any OSSIM class of consequence. It is used to generate a sample ramp point cloud LAS file with 11 points. The output is the file "ramp.las" which can serve as input to the PDAL test below. 10 | 11 | 12 | ## PDAL File Reader Test 13 | 14 | To run the ossimPdalFileReader test, do: 15 | 16 | ossim-pdal-plugin-test pdal [] 17 | 18 | The output will be the raster file "pdal-OUTPUT.tif". This file can be compared against the expected result found in pdal-EXPECTED.ti. If the optional LAS file is specified, it is used in place of the default autzen.las. 19 | 20 | 21 | ## RIALTO_TRANSLATE and RIALTO_INFO 22 | 23 | This is not a test, but a step that must be run before the rialto test can be executed. This utility generates a rialto geopackage file repesenting the input filename specified: 24 | 25 | rialto_translate -m 0 -v -i .las -o .gpkg 26 | 27 | It will generate a geopackage by the name .gpkg, which can be used as input to the rialto test. 28 | 29 | 30 | ## Rialto Reader Test 31 | 32 | To run the ossimRialtoReader test, do: 33 | 34 | ossim-pdal-plugin-test rialto [] 35 | 36 | The output will be the raster file "rialto-OUTPUT.tif". Compare against rialto-EXPECTED.tif. An alternate gpkg file can be specified for generating corresponding TIF image. 37 | 38 | 39 | 40 | -------------------------------------------------------------------------------- /pdal/test/autzen.las: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ossimlabs/ossim-plugins/188c01d3b53cb0a2d0d6cf0c9445bc9ace86a074/pdal/test/autzen.las -------------------------------------------------------------------------------- /pdal/test/autzen.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /pdal/test/pdal-EXPECTED.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ossimlabs/ossim-plugins/188c01d3b53cb0a2d0d6cf0c9445bc9ace86a074/pdal/test/pdal-EXPECTED.tif -------------------------------------------------------------------------------- /pdal/test/rialto-EXPECTED.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ossimlabs/ossim-plugins/188c01d3b53cb0a2d0d6cf0c9445bc9ace86a074/pdal/test/rialto-EXPECTED.tif -------------------------------------------------------------------------------- /png/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/src ${CMAKE_CURRENT_BINARY_DIR}/src) 2 | 3 | #IF(BUILD_OSSIM_TESTS) 4 | # add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/test ${CMAKE_CURRENT_BINARY_DIR}/test) 5 | #ENDIF() 6 | 7 | 8 | -------------------------------------------------------------------------------- /png/README.md: -------------------------------------------------------------------------------- 1 | # ossim-png-plugin 2 | OSSIM plugin for reading and writing PNG formats 3 | -------------------------------------------------------------------------------- /png/test/CMakeLists.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ossimlabs/ossim-plugins/188c01d3b53cb0a2d0d6cf0c9445bc9ace86a074/png/test/CMakeLists.txt -------------------------------------------------------------------------------- /potrace/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | MESSAGE( "************** CMAKE SETUP FOR ossim_potrace_plugin ******************") 2 | 3 | SET(BUILD_OSSIM_FRAMEWORKS "OFF") 4 | SET(OSSIM_PLUGIN_LINK_TYPE "SHARED") 5 | 6 | # Add our include and library... 7 | find_package(ossim) 8 | if(OSSIM_FOUND) 9 | include_directories( ${OSSIM_INCLUDE_DIR} ) 10 | set( requiredLibs ${requiredLibs} ${OSSIM_LIBRARIES} ) 11 | else(OSSIM_FOUND) 12 | message(FATAL_ERROR "Could not find ossim") 13 | endif(OSSIM_FOUND) 14 | 15 | find_package( JsonCpp ) 16 | if( JSONCPP_FOUND ) 17 | include_directories( ${JSONCPP_INCLUDE_DIR} ) 18 | set( requiredLibs ${requiredLibs} ${JSONCPP_LIBRARY} ) 19 | message("Found JsonCpp" ) 20 | else( JSONCPP_FOUND ) 21 | message( FATAL_ERROR "Could not find required JsonCpp package!" ) 22 | endif( JSONCPP_FOUND ) 23 | 24 | add_subdirectory( src ) 25 | 26 | message( "************** END SETUP FOR ossim_potrace_plugin ******************" ) 27 | -------------------------------------------------------------------------------- /potrace/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2015 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | 23 | -------------------------------------------------------------------------------- /potrace/src/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | set(LIB_NAME ossim_potrace_plugin) 2 | 3 | # Include ossim cmake stuff: 4 | include(OssimVersion) 5 | include(OssimCommonVariables) 6 | include(OssimUtilities) 7 | 8 | set(requiredLibs) 9 | 10 | file(GLOB_RECURSE OSSIMPLUGIN_SRCS *.cpp *.c) 11 | file(GLOB_RECURSE OSSIMPLUGIN_HEADERS *.h) 12 | 13 | #--- 14 | # OSSIMPLUGINSMAKINGDLL controls dll linkage on windows. 15 | # Adding this sets OSSIM_PLUGINS_DLL #define TO "__declspec(dllexport)". 16 | #--- 17 | add_definitions("-DOSSIMPLUGINSMAKINGDLL") 18 | 19 | # Adjust the install library path: 20 | if(OSSIM_INSTALL_PLUGINS_WITH_VERSION) 21 | set(INSTALL_LIBRARY_DIR "${INSTALL_LIBRARY_DIR}/ossim-${OSSIM_VERSION}/plugins") 22 | else(OSSIM_INSTALL_PLUGINS_WITH_VERSION) 23 | set(INSTALL_LIBRARY_DIR "${INSTALL_LIBRARY_DIR}/ossim/plugins") 24 | endif(OSSIM_INSTALL_PLUGINS_WITH_VERSION) 25 | if(WIN32) 26 | set(INSTALL_RUNTIME_DIR "${INSTALL_RUNTIME_DIR}/ossim/plugins") 27 | endif() 28 | 29 | OSSIM_LINK_LIBRARY(${LIB_NAME} 30 | COMPONENT_NAME ossim TYPE "${OSSIM_PLUGIN_LINK_TYPE}" 31 | LIBRARIES ${OSSIM_LIBRARY} ${requiredLibs} 32 | HEADERS "${OSSIMPLUGIN_HEADERS}" 33 | SOURCE_FILES "${OSSIMPLUGIN_SRCS}" 34 | INSTALL_LIB) 35 | 36 | 37 | -------------------------------------------------------------------------------- /potrace/src/backend_geojson.h: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2001-2015 Peter Selinger. 2 | This file is part of Potrace. It is free software and it is covered 3 | by the GNU General Public License. See the file COPYING for details. */ 4 | 5 | 6 | #ifndef BACKEND_GEO_H 7 | #define BACKEND_GEO_H 8 | 9 | #include "potracelib.h" 10 | 11 | int page_geojson(FILE *fout, potrace_path_t *plist, int as_polygons); 12 | 13 | #endif /* BACKEND_GEO_H */ 14 | 15 | -------------------------------------------------------------------------------- /potrace/src/bitmap_io.h: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2001-2015 Peter Selinger. 2 | This file is part of Potrace. It is free software and it is covered 3 | by the GNU General Public License. See the file COPYING for details. */ 4 | 5 | /* bitmap input/output functions */ 6 | 7 | #ifndef BITMAP_IO_H 8 | #define BITMAP_IO_H 9 | 10 | #include 11 | #include "bitmap.h" 12 | 13 | /* Note that bitmaps are stored bottom to top, i.e., the first 14 | scanline is the bottom-most one */ 15 | 16 | extern char *bm_read_error; 17 | 18 | int bm_read(FILE *f, double blacklevel, potrace_bitmap_t **bmp); 19 | void bm_writepbm(FILE *f, potrace_bitmap_t *bm); 20 | int bm_print(FILE *f, potrace_bitmap_t *bm); 21 | 22 | #endif /* BITMAP_IO_H */ 23 | 24 | -------------------------------------------------------------------------------- /potrace/src/decompose.h: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2001-2015 Peter Selinger. 2 | This file is part of Potrace. It is free software and it is covered 3 | by the GNU General Public License. See the file COPYING for details. */ 4 | 5 | 6 | #ifndef DECOMPOSE_H 7 | #define DECOMPOSE_H 8 | 9 | #include "potracelib.h" 10 | #include "progress.h" 11 | #include "curve.h" 12 | 13 | int bm_to_pathlist(const potrace_bitmap_t *bm, path_t **plistp, const potrace_param_t *param, progress_t *progress); 14 | 15 | #endif /* DECOMPOSE_H */ 16 | 17 | -------------------------------------------------------------------------------- /potrace/src/imginfo.h: -------------------------------------------------------------------------------- 1 | #ifndef IMGINFO_H 2 | #define IMGINFO_H 3 | 4 | #include "trans.h" 5 | 6 | /* structure to hold a dimensioned value */ 7 | struct dim_s { 8 | double x; /* value */ 9 | double d; /* dimension (in pt), or 0 if not given */ 10 | }; 11 | typedef struct dim_s dim_t; 12 | 13 | /* structure to hold per-image information, set e.g. by calc_dimensions */ 14 | struct imginfo_s { 15 | int pixwidth; /* width of input pixmap */ 16 | int pixheight; /* height of input pixmap */ 17 | double width; /* desired width of image (in pt or pixels) */ 18 | double height; /* desired height of image (in pt or pixels) */ 19 | double lmar, rmar, tmar, bmar; /* requested margins (in pt) */ 20 | trans_t trans; /* specify relative position of a tilted rectangle */ 21 | }; 22 | typedef struct imginfo_s imginfo_t; 23 | 24 | 25 | #endif /* IMGINFO_H */ 26 | -------------------------------------------------------------------------------- /potrace/src/ossimPotraceToolFactory.cpp: -------------------------------------------------------------------------------- 1 | //************************************************************************************************** 2 | // 3 | // OSSIM Open Source Geospatial Data Processing Library 4 | // See top level LICENSE.txt file for license information 5 | // 6 | //************************************************************************************************** 7 | 8 | #include 9 | #include 10 | #include 11 | 12 | using namespace std; 13 | 14 | ossimPotraceToolFactory* ossimPotraceToolFactory::s_instance = 0; 15 | 16 | ossimPotraceToolFactory* ossimPotraceToolFactory::instance() 17 | { 18 | if (!s_instance) 19 | s_instance = new ossimPotraceToolFactory; 20 | return s_instance; 21 | } 22 | 23 | ossimPotraceToolFactory::ossimPotraceToolFactory() 24 | { 25 | } 26 | 27 | ossimPotraceToolFactory::~ossimPotraceToolFactory() 28 | { 29 | ossimToolRegistry::instance()->unregisterFactory(this); 30 | } 31 | 32 | ossimTool* ossimPotraceToolFactory::createTool(const std::string& argName) const 33 | { 34 | ossimString utilName (argName); 35 | utilName.downcase(); 36 | 37 | if ((utilName == "potrace") || (argName == "ossimPotraceTool")) 38 | return new ossimPotraceTool; 39 | 40 | return 0; 41 | } 42 | 43 | void ossimPotraceToolFactory::getCapabilities(std::map& capabilities) const 44 | { 45 | capabilities.insert(pair("potrace", ossimPotraceTool::DESCRIPTION)); 46 | } 47 | 48 | std::map ossimPotraceToolFactory::getCapabilities() const 49 | { 50 | std::map result; 51 | getCapabilities(result); 52 | return result; 53 | } 54 | 55 | void ossimPotraceToolFactory::getTypeNameList(vector& typeList) const 56 | { 57 | typeList.push_back("ossimPotraceTool"); 58 | } 59 | -------------------------------------------------------------------------------- /potrace/src/ossimPotraceToolFactory.h: -------------------------------------------------------------------------------- 1 | //************************************************************************************************** 2 | // 3 | // OSSIM Open Source Geospatial Data Processing Library 4 | // See top level LICENSE.txt file for license information 5 | // 6 | //************************************************************************************************** 7 | 8 | #ifndef ossimPotraceToolFactory_HEADER 9 | #define ossimPotraceToolFactory_HEADER 1 10 | 11 | #include 12 | #include 13 | #include 14 | 15 | class ossimString; 16 | class ossimFilename; 17 | class ossimKeywordlist; 18 | 19 | class OSSIM_PLUGINS_DLL ossimPotraceToolFactory: public ossimToolFactoryBase 20 | { 21 | public: 22 | static ossimPotraceToolFactory* instance(); 23 | 24 | virtual ~ossimPotraceToolFactory(); 25 | virtual ossimTool* createTool(const std::string& typeName) const; 26 | virtual void getTypeNameList(std::vector& typeList) const; 27 | virtual void getCapabilities(std::map& capabilities) const; 28 | virtual std::map getCapabilities() const; 29 | 30 | protected: 31 | ossimPotraceToolFactory(); 32 | ossimPotraceToolFactory(const ossimPotraceToolFactory&); 33 | void operator=(const ossimPotraceToolFactory&); 34 | 35 | /** static instance of this class */ 36 | static ossimPotraceToolFactory* s_instance; 37 | 38 | }; 39 | 40 | #endif /* end of #ifndef ossimPotraceToolFactory_HEADER */ 41 | -------------------------------------------------------------------------------- /potrace/src/platform.h: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2001-2015 Peter Selinger. 2 | This file is part of Potrace. It is free software and it is covered 3 | by the GNU General Public License. See the file COPYING for details. */ 4 | 5 | /* this header file contains some platform dependent stuff */ 6 | 7 | #ifndef PLATFORM_H 8 | #define PLATFORM_H 9 | 10 | #ifdef HAVE_CONFIG_H 11 | #include 12 | #endif 13 | 14 | /* in Windows, set all file i/o to binary */ 15 | #ifdef __MINGW32__ 16 | #include 17 | unsigned int _CRT_fmode = _O_BINARY; 18 | static inline void platform_init(void) { 19 | _setmode(_fileno(stdin), _O_BINARY); 20 | _setmode(_fileno(stdout), _O_BINARY); 21 | } 22 | #else 23 | 24 | #ifdef __CYGWIN__ 25 | #include 26 | #include 27 | static inline void platform_init(void) { 28 | setmode(0,O_BINARY); 29 | setmode(1,O_BINARY); 30 | } 31 | #else 32 | static inline void platform_init(void) { 33 | /* NOP */ 34 | } 35 | #endif 36 | #endif 37 | 38 | #endif /* PLATFORM_H */ 39 | -------------------------------------------------------------------------------- /potrace/src/trace.h: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2001-2015 Peter Selinger. 2 | This file is part of Potrace. It is free software and it is covered 3 | by the GNU General Public License. See the file COPYING for details. */ 4 | 5 | 6 | #ifndef TRACE_H 7 | #define TRACE_H 8 | 9 | #include "potracelib.h" 10 | #include "progress.h" 11 | #include "curve.h" 12 | 13 | int process_path(path_t *plist, const potrace_param_t *param, progress_t *progress); 14 | 15 | #endif /* TRACE_H */ 16 | -------------------------------------------------------------------------------- /potrace/src/trans.h: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2001-2015 Peter Selinger. 2 | This file is part of Potrace. It is free software and it is covered 3 | by the GNU General Public License. See the file COPYING for details. */ 4 | 5 | 6 | #ifndef TRANS_H 7 | #define TRANS_H 8 | 9 | #include "auxiliary.h" 10 | 11 | /* structure to hold a coordinate transformation */ 12 | struct trans_s { 13 | double bb[2]; /* dimensions of bounding box */ 14 | double orig[2]; /* origin relative to bounding box */ 15 | double x[2]; /* basis vector for the "x" direction */ 16 | double y[2]; /* basis vector for the "y" direction */ 17 | double scalex, scaley; /* redundant info for some backends' benefit */ 18 | }; 19 | typedef struct trans_s trans_t; 20 | 21 | /* apply a coordinate transformation to a point */ 22 | static inline dpoint_t trans(dpoint_t p, trans_t t) { 23 | dpoint_t res; 24 | 25 | res.x = t.orig[0] + p.x * t.x[0] + p.y * t.y[0]; 26 | res.y = t.orig[1] + p.x * t.x[1] + p.y * t.y[1]; 27 | return res; 28 | } 29 | 30 | #endif /* TRANS_H */ 31 | -------------------------------------------------------------------------------- /reg/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | MESSAGE( "************** LIBRARY SETUP FOR ossim_reg_plugin******************") 2 | 3 | # Include ossim cmake stuff: 4 | include(OssimVersion) 5 | include(OssimCommonVariables) 6 | include(OssimUtilities) 7 | 8 | set(requiredLibs) 9 | 10 | find_package( OpenCV ) 11 | if( OPENCV_FOUND ) 12 | include_directories( ${OPENCV_INCLUDE_DIR} ) 13 | set( requiredLibs ${requiredLib} ${OPENCV_LIBRARIES} ) 14 | else( OPENCV_FOUND ) 15 | message( FATAL_ERROR "Could not find OpenCV package!" ) 16 | endif( OPENCV_FOUND ) 17 | 18 | add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/src ${CMAKE_CURRENT_BINARY_DIR}/src) 19 | 20 | IF(BUILD_OSSIM_TESTS) 21 | add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/test ${CMAKE_CURRENT_BINARY_DIR}/test) 22 | ENDIF() 23 | 24 | 25 | -------------------------------------------------------------------------------- /reg/README.md: -------------------------------------------------------------------------------- 1 | # ossim-opencv-plugin 2 | Plugin for automated image registration using the openCV library 3 | -------------------------------------------------------------------------------- /reg/src/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | set(LIB_NAME ossim_reg_plugin) 2 | 3 | # Include ossim cmake stuff: 4 | include(OssimVersion) 5 | include(OssimCommonVariables) 6 | include(OssimUtilities) 7 | 8 | INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}) 9 | 10 | FILE(GLOB_RECURSE OSSIMPLUGIN_SRCS *.cpp) 11 | FILE(GLOB_RECURSE OSSIMPLUGIN_HEADERS *.h) 12 | 13 | #### 14 | # OSSIMPLUGINSMAKINGDLL controls dll linkage on windows. 15 | # Adding this sets OSSIM_PLUGINS_DLL #define TO "__declspec(dllexport)". 16 | ### 17 | add_definitions("-DOSSIMPLUGINSMAKINGDLL") 18 | 19 | # Adjust the install library path: 20 | if(OSSIM_INSTALL_PLUGINS_WITH_VERSION) 21 | set(INSTALL_LIBRARY_DIR "${INSTALL_LIBRARY_DIR}/ossim-${OSSIM_VERSION}/plugins") 22 | else(OSSIM_INSTALL_PLUGINS_WITH_VERSION) 23 | set(INSTALL_LIBRARY_DIR "${INSTALL_LIBRARY_DIR}/ossim/plugins") 24 | endif(OSSIM_INSTALL_PLUGINS_WITH_VERSION) 25 | if(WIN32) 26 | set(INSTALL_RUNTIME_DIR "${INSTALL_RUNTIME_DIR}/ossim/plugins") 27 | endif() 28 | 29 | OSSIM_LINK_LIBRARY(${LIB_NAME} 30 | COMPONENT_NAME ossim TYPE "${OSSIM_PLUGIN_LINK_TYPE}" 31 | LIBRARIES ${OSSIM_LIBRARIES} ${requiredLib} 32 | HEADERS "${OSSIMPLUGIN_HEADERS}" 33 | SOURCE_FILES "${OSSIMPLUGIN_SRCS}" 34 | INSTALL_LIB) 35 | 36 | -------------------------------------------------------------------------------- /reg/src/ossimRegPluginInit.cpp: -------------------------------------------------------------------------------- 1 | //************************************************************************************************** 2 | // 3 | // OSSIM Open Source Geospatial Data Processing Library 4 | // See top level LICENSE.txt file for license information 5 | // 6 | //************************************************************************************************** 7 | 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include "ossimRegTool.h" 13 | #include "ossimRegToolFactory.h" 14 | 15 | extern "C" 16 | { 17 | ossimSharedObjectInfo myRegInfo; 18 | 19 | const char* getRegDescription() 20 | { 21 | return "Reg utility plugin\n\n"; 22 | } 23 | 24 | int getRegNumberOfClassNames() 25 | { 26 | return 1; 27 | } 28 | 29 | const char* getRegClassName(int idx) 30 | { 31 | if (idx == 0) 32 | { 33 | return "ossimRegTool"; 34 | } 35 | return (const char*)0; 36 | } 37 | 38 | /* Note symbols need to be exported on windoze... */ 39 | OSSIM_PLUGINS_DLL void ossimSharedLibraryInitialize(ossimSharedObjectInfo** info) 40 | { 41 | myRegInfo.getDescription = getRegDescription; 42 | myRegInfo.getNumberOfClassNames = getRegNumberOfClassNames; 43 | myRegInfo.getClassName = getRegClassName; 44 | 45 | *info = &myRegInfo; 46 | 47 | /* Register the utility... */ 48 | ossimToolRegistry::instance()-> 49 | registerFactory(ossimRegToolFactory::instance()); 50 | } 51 | 52 | /* Note symbols need to be exported on windoze... */ 53 | OSSIM_PLUGINS_DLL void ossimSharedLibraryFinalize() 54 | { 55 | ossimToolRegistry::instance()-> 56 | unregisterFactory(ossimRegToolFactory::instance()); 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /reg/src/ossimRegTool.h: -------------------------------------------------------------------------------- 1 | //************************************************************************************************** 2 | // 3 | // OSSIM Open Source Geospatial Data Processing Library 4 | // See top level LICENSE.txt file for license information 5 | // 6 | //************************************************************************************************** 7 | 8 | #ifndef ossimRegTool_HEADER 9 | #define ossimRegTool_HEADER 1 10 | 11 | #include 12 | #include 13 | #include 14 | 15 | class OSSIM_DLL ossimRegTool : public ossimChipProcTool 16 | { 17 | public: 18 | static const char* DESCRIPTION; 19 | 20 | ossimRegTool(); 21 | 22 | virtual ~ossimRegTool(); 23 | 24 | virtual void setUsage(ossimArgumentParser& ap); 25 | 26 | virtual bool initialize(ossimArgumentParser& ap); 27 | 28 | virtual void initialize(const ossimKeywordlist& ap); 29 | 30 | virtual bool execute(); 31 | 32 | virtual ossimString getClassName() const { return "ossimRegTool"; } 33 | 34 | virtual void getKwlTemplate(ossimKeywordlist& kwl); 35 | 36 | private: 37 | virtual void initProcessingChain(); 38 | virtual void finalizeChain(); 39 | }; 40 | 41 | #endif /* #ifndef ossimRegTool_HEADER */ 42 | -------------------------------------------------------------------------------- /reg/src/ossimRegToolFactory.cpp: -------------------------------------------------------------------------------- 1 | //************************************************************************************************** 2 | // 3 | // OSSIM Open Source Geospatial Data Processing Library 4 | // See top level LICENSE.txt file for license information 5 | // 6 | //************************************************************************************************** 7 | 8 | #include 9 | #include "ossimRegTool.h" 10 | #include "ossimRegToolFactory.h" 11 | 12 | using namespace std; 13 | 14 | ossimRegToolFactory* ossimRegToolFactory::s_instance = 0; 15 | 16 | ossimRegToolFactory* ossimRegToolFactory::instance() 17 | { 18 | if (!s_instance) 19 | s_instance = new ossimRegToolFactory; 20 | return s_instance; 21 | } 22 | 23 | ossimRegToolFactory::ossimRegToolFactory() 24 | { 25 | } 26 | 27 | ossimRegToolFactory::~ossimRegToolFactory() 28 | { 29 | ossimToolRegistry::instance()->unregisterFactory(this); 30 | } 31 | 32 | ossimTool* ossimRegToolFactory::createTool(const std::string& argName) const 33 | { 34 | ossimString utilName (argName); 35 | utilName.downcase(); 36 | 37 | if ((utilName == "registration") || (argName == "ossimRegUtil")) 38 | return new ossimRegTool; 39 | 40 | return 0; 41 | } 42 | 43 | void ossimRegToolFactory::getCapabilities(std::map& capabilities) const 44 | { 45 | capabilities.insert(pair("registration", ossimRegTool::DESCRIPTION)); 46 | } 47 | 48 | std::map ossimRegToolFactory::getCapabilities() const 49 | { 50 | std::map result; 51 | getCapabilities(result); 52 | return result; 53 | } 54 | 55 | void ossimRegToolFactory::getTypeNameList(vector& typeList) const 56 | { 57 | typeList.push_back("ossimRegUtil"); 58 | } 59 | -------------------------------------------------------------------------------- /reg/src/ossimRegToolFactory.h: -------------------------------------------------------------------------------- 1 | //************************************************************************************************** 2 | // 3 | // OSSIM Open Source Geospatial Data Processing Library 4 | // See top level LICENSE.txt file for license information 5 | // 6 | //************************************************************************************************** 7 | 8 | #ifndef ossimPotraceUtilFactory_HEADER 9 | #define ossimPotraceUtilFactory_HEADER 1 10 | 11 | #include 12 | #include 13 | #include "ossimRegTool.h" 14 | 15 | class ossimString; 16 | class ossimFilename; 17 | class ossimKeywordlist; 18 | 19 | class OSSIM_PLUGINS_DLL ossimRegToolFactory: public ossimToolFactoryBase 20 | { 21 | public: 22 | static ossimRegToolFactory* instance(); 23 | 24 | virtual ~ossimRegToolFactory(); 25 | virtual ossimTool* createTool(const std::string& typeName) const; 26 | virtual void getTypeNameList(std::vector& typeList) const; 27 | virtual void getCapabilities(std::map& capabilities) const; 28 | virtual std::map getCapabilities() const; 29 | 30 | protected: 31 | ossimRegToolFactory(); 32 | ossimRegToolFactory(const ossimRegToolFactory&); 33 | void operator=(const ossimRegToolFactory&); 34 | 35 | /** static instance of this class */ 36 | static ossimRegToolFactory* s_instance; 37 | 38 | }; 39 | 40 | #endif /* end of #ifndef ossimPotraceUtilFactory_HEADER */ 41 | -------------------------------------------------------------------------------- /reg/test/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | cmake_minimum_required (VERSION 2.8) 4 | 5 | # Get the library suffix for lib or lib64. 6 | get_property(LIB64 GLOBAL PROPERTY FIND_LIBRARY_USE_LIB64_PATHS) 7 | if(LIB64) 8 | set(LIBSUFFIX 64) 9 | else() 10 | set(LIBSUFFIX "") 11 | endif() 12 | 13 | set(requiredLibs ${requiredLibs} ossim_reg_plugin ) 14 | 15 | # Add the executable: 16 | add_executable(match-test match-test.cpp ) 17 | add_executable(detect-test detect-test.cpp ) 18 | 19 | # Set the output dir: 20 | set_target_properties(match-test detect-test 21 | PROPERTIES 22 | RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin") 23 | 24 | target_link_libraries( match-test ${requiredLibs} ) 25 | target_link_libraries( detect-test ${requiredLibs} ) 26 | 27 | -------------------------------------------------------------------------------- /shapelib/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/apps ${CMAKE_CURRENT_BINARY_DIR}/apps) 2 | -------------------------------------------------------------------------------- /sqlite/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/src ${CMAKE_CURRENT_BINARY_DIR}/src) 2 | 3 | #IF(BUILD_OSSIM_TESTS) 4 | # add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/test ${CMAKE_CURRENT_BINARY_DIR}/test) 5 | #ENDIF() 6 | 7 | 8 | -------------------------------------------------------------------------------- /sqlite/README.md: -------------------------------------------------------------------------------- 1 | # ossim-sqlite-plugin 2 | Plugin for handling GeoPackage/SQLite data format 3 | -------------------------------------------------------------------------------- /sqlite/src/ossimGpkgDatabaseRecordBase.cpp: -------------------------------------------------------------------------------- 1 | //---------------------------------------------------------------------------- 2 | // File: ossimGpkgDatabaseRecordInferface.h 3 | // 4 | // License: LGPL 5 | // 6 | // See LICENSE.txt file in the top level directory for more details. 7 | // 8 | // Description: Base class definition for GeoPackage database record. 9 | // 10 | //---------------------------------------------------------------------------- 11 | // $Id$ 12 | 13 | #include "ossimGpkgDatabaseRecordBase.h" 14 | #include 15 | #include 16 | 17 | ossimGpkgDatabaseRecordBase::ossimGpkgDatabaseRecordBase() 18 | : ossimReferenced() 19 | { 20 | } 21 | 22 | ossimGpkgDatabaseRecordBase::~ossimGpkgDatabaseRecordBase() 23 | { 24 | } 25 | 26 | std::ostream& ossimGpkgDatabaseRecordBase::print(std::ostream& out) const 27 | { 28 | ossimKeywordlist kwl; 29 | saveState(kwl, std::string("")); 30 | out << kwl; 31 | return out; 32 | } 33 | 34 | std::ostream& operator<<(std::ostream& out, 35 | const ossimGpkgDatabaseRecordBase& obj) 36 | { 37 | return obj.print( out ); 38 | } 39 | 40 | 41 | -------------------------------------------------------------------------------- /sqlite/src/ossimGpkgInfo.h: -------------------------------------------------------------------------------- 1 | //---------------------------------------------------------------------------- 2 | // 3 | // License: LGPL 4 | // 5 | // See LICENSE.txt file in the top level directory for more details. 6 | // 7 | // Author: David Burken 8 | // 9 | // Description: GeoPackage Info class. 10 | // 11 | //---------------------------------------------------------------------------- 12 | // $Id$ 13 | 14 | #ifndef ossimGpkgInfo_HEADER 15 | #define ossimGpkgInfo_HEADER 1 16 | 17 | #include 18 | #include 19 | #include 20 | 21 | /** 22 | * @brief GeoPackage info class. 23 | * 24 | * Encapsulates the listgeo functionality. 25 | */ 26 | class ossimGpkgInfo : public ossimInfoBase 27 | { 28 | public: 29 | 30 | /** default constructor */ 31 | ossimGpkgInfo(); 32 | 33 | /** virtual destructor */ 34 | virtual ~ossimGpkgInfo(); 35 | 36 | /** 37 | * @brief open method. 38 | * 39 | * @param file File name to open. 40 | * 41 | * @return true on success false on error. 42 | */ 43 | virtual bool open(const ossimFilename& file); 44 | 45 | /** 46 | * Print method. 47 | * 48 | * @param out Stream to print to. 49 | * 50 | * @return std::ostream& 51 | */ 52 | virtual std::ostream& print(std::ostream& out) const; 53 | 54 | private: 55 | 56 | ossimFilename m_file; 57 | }; 58 | 59 | #endif /* End of "#ifndef ossimGpkgInfo_HEADER" */ 60 | -------------------------------------------------------------------------------- /sqlite/src/ossimSqliteConstants.h: -------------------------------------------------------------------------------- 1 | //--- 2 | // 3 | // License: MIT 4 | // 5 | // Description: Sqlite constants. 6 | // 7 | //--- 8 | // $Id$ 9 | 10 | #ifndef ossimSqliteConstants_HEADER 11 | #define ossimSqliteConstants_HEADER 1 12 | 13 | namespace ossim 14 | { 15 | enum TileType 16 | { 17 | UNKNOWN_TILE = 0, 18 | JPEG_TILE = 1, 19 | PNG_TILE = 2 20 | }; 21 | 22 | enum WriterMode 23 | { 24 | UNKNOWN = 0, 25 | JPEG = 1, // RGB, 8-bit, JPEG compressed 26 | PNG = 2, // PNG, 27 | PNGA = 3, // PNG with alpha 28 | MIXED = 4, // full tiles=jpeg, partials=pnga 29 | JPEGPNGA = 4, // full tiles=jpeg, partials=pnga(same as mixed) 30 | JPEGPNG = 5 // full tiles=jpeg, partials=png 31 | }; 32 | 33 | } // End: namespace ossim 34 | 35 | #endif /* End of "#ifndef ossimSqliteConstants_HEADER" */ 36 | -------------------------------------------------------------------------------- /sqlite/src/ossimSqliteInfoFactory.h: -------------------------------------------------------------------------------- 1 | //---------------------------------------------------------------------------- 2 | // 3 | // License: LGPL 4 | // 5 | // See LICENSE.txt file in the top level directory for more details. 6 | // 7 | // Author: David Burken 8 | // 9 | // Description: Factory for SQLite info objects. 10 | // 11 | //---------------------------------------------------------------------------- 12 | // $Id$ 13 | 14 | #ifndef ossimSqliteInfoFactory_HEADER 15 | #define ossimSqliteInfoFactory_HEADER 16 | 17 | #include 18 | #include 19 | 20 | class ossimFilename; 21 | class ossimInfoBase; 22 | 23 | /** 24 | * @brief Info factory. 25 | */ 26 | class ossimSqliteInfoFactory : public ossimInfoFactoryInterface 27 | { 28 | public: 29 | 30 | /** virtual destructor */ 31 | virtual ~ossimSqliteInfoFactory(); 32 | 33 | static ossimSqliteInfoFactory* instance(); 34 | 35 | /** 36 | * @brief create method. 37 | * 38 | * @param file Some file you want info for. 39 | * 40 | * @return ossimInfoBase* on success 0 on failure. Caller is responsible 41 | * for memory. 42 | */ 43 | virtual std::shared_ptr create(const ossimFilename& file) const; 44 | 45 | virtual std::shared_ptr create(std::shared_ptr& str, 46 | const std::string& connectionString) const; 47 | 48 | private: 49 | 50 | /** hidden from use default constructor */ 51 | ossimSqliteInfoFactory(); 52 | 53 | /** hidden from use copy constructor */ 54 | ossimSqliteInfoFactory(const ossimSqliteInfoFactory& obj); 55 | 56 | /** hidden from use operator = */ 57 | const ossimSqliteInfoFactory& operator=(const ossimSqliteInfoFactory& rhs); 58 | }; 59 | 60 | #endif /* End of "#ifndef ossimSqliteInfoFactory_HEADER" */ 61 | -------------------------------------------------------------------------------- /sqlite/test/CMakeLists.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ossimlabs/ossim-plugins/188c01d3b53cb0a2d0d6cf0c9445bc9ace86a074/sqlite/test/CMakeLists.txt -------------------------------------------------------------------------------- /web/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/src ${CMAKE_CURRENT_BINARY_DIR}/src) 2 | 3 | #IF(BUILD_OSSIM_TESTS) 4 | # add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/test ${CMAKE_CURRENT_BINARY_DIR}/test) 5 | #ENDIF() 6 | 7 | 8 | -------------------------------------------------------------------------------- /web/README.md: -------------------------------------------------------------------------------- 1 | # ossim-web-plugin 2 | Plugin for web requests 3 | -------------------------------------------------------------------------------- /web/src/CurlHeaderCache.h: -------------------------------------------------------------------------------- 1 | #ifndef ossimCurlHeaderCache_HEADER 2 | #define ossimCurlHeaderCache_HEADER 3 | #include 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include // For std::unique_lock 9 | #include 10 | 11 | namespace ossim 12 | { 13 | class CurlHeaderCacheNode 14 | { 15 | public: 16 | CurlHeaderCacheNode(ossim_int64 filesize) 17 | :m_timestamp(ossimTimer::instance()->tick()), 18 | m_filesize(filesize) 19 | { 20 | 21 | } 22 | 23 | ossimTimer::Timer_t m_timestamp; 24 | ossim_int64 m_filesize; 25 | }; 26 | 27 | class CurlHeaderCache 28 | { 29 | public: 30 | typedef std::shared_ptr Node_t; 31 | typedef std::string Key_t; 32 | typedef ossim_int64 TimeIndex_t; 33 | typedef std::map CacheType; 34 | typedef std::map CacheTimeIndexType; 35 | 36 | CurlHeaderCache(); 37 | virtual ~CurlHeaderCache(); 38 | bool getCachedFilesize(const Key_t& key, ossim_int64& filesize)const; 39 | void addHeader(const Key_t& key, Node_t& node); 40 | void setMaxCacheEntries(ossim_int64 maxEntries); 41 | void touchEntry(const Key_t& key); 42 | 43 | static std::shared_ptr instance(); 44 | 45 | protected: 46 | void shrinkEntries(); 47 | void touchEntryProtected(const Key_t& key); 48 | 49 | static std::shared_ptr m_instance; 50 | mutable std::mutex m_mutex; 51 | 52 | CacheType m_cache; 53 | CacheTimeIndexType m_cacheTime; 54 | ossim_int64 m_maxCacheEntries; 55 | 56 | }; 57 | } 58 | 59 | #endif 60 | -------------------------------------------------------------------------------- /web/src/CurlStreamDefaults.h: -------------------------------------------------------------------------------- 1 | #ifndef CurlStreamDefaults_HEADER 2 | #define CurlStreamDefaults_HEADER 1 3 | #include 4 | #include 5 | 6 | namespace ossim{ 7 | 8 | 9 | class CurlStreamDefaults 10 | { 11 | public: 12 | static void loadDefaults(); 13 | 14 | static ossim_int64 m_readBlocksize; 15 | static ossim_int64 m_nReadCacheHeaders; 16 | static ossimFilename m_cacert; 17 | static ossimFilename m_clientCert; 18 | static ossimFilename m_clientKey; 19 | static ossimString m_clientCertType; 20 | static ossimString m_clientKeyPassword; 21 | }; 22 | 23 | } 24 | 25 | #endif 26 | -------------------------------------------------------------------------------- /web/src/ossimCurlHttpRequest.h: -------------------------------------------------------------------------------- 1 | #ifndef ossimCurlHttpRequest_HEADER 2 | #define ossimCurlHttpRequest_HEADER 3 | #include 4 | #include 5 | #include 6 | 7 | class ossimCurlHttpResponse : public ossimHttpResponse 8 | { 9 | public: 10 | 11 | }; 12 | 13 | class ossimCurlHttpRequest : public ossimHttpRequest 14 | { 15 | public: 16 | ossimCurlHttpRequest() 17 | :m_curl(0) 18 | { 19 | m_curl = curl_easy_init(); 20 | } 21 | virtual ~ossimCurlHttpRequest() 22 | { 23 | if(m_curl) 24 | { 25 | curl_easy_cleanup(m_curl); 26 | m_curl = 0; 27 | } 28 | } 29 | virtual ossimRefPtr getResponse(); 30 | virtual bool supportsProtocol(const ossimString& protocol)const; 31 | static int curlWriteResponseBody(void *buffer, size_t size, size_t nmemb, void *stream); 32 | static int curlWriteResponseHeader(void *buffer, size_t size, size_t nmemb, void *stream); 33 | ossim_int64 getContentLength()const; 34 | virtual bool loadState(const ossimKeywordlist& kwl, const char* prefix=0) 35 | { 36 | m_response = 0; 37 | return ossimHttpRequest::loadState(kwl, prefix); 38 | } 39 | 40 | protected: 41 | CURL* m_curl; 42 | mutable ossimRefPtr m_response; 43 | void setDefaultSSL(CURL* curl)const; 44 | }; 45 | 46 | 47 | #endif 48 | -------------------------------------------------------------------------------- /web/src/ossimCurlIStream.h: -------------------------------------------------------------------------------- 1 | #ifndef ossimCurlIStream_HEADER 2 | #define ossimCurlIStream_HEADER 3 | #include 4 | #include "ossimCurlStreamBuffer.h" 5 | 6 | namespace ossim{ 7 | 8 | class CurlIStream : public ossim::istream 9 | { 10 | public: 11 | CurlIStream():std::istream(&m_curlStreamBuffer) 12 | {} 13 | 14 | 15 | void open (const char* connectionString, 16 | std::ios_base::openmode mode) 17 | { 18 | open(std::string(connectionString), mode); 19 | } 20 | void open (const std::string& connectionString, 21 | std::ios_base::openmode mode) 22 | { 23 | ossimKeywordlist options; 24 | open(connectionString, options, mode); 25 | } 26 | void open (const char* connectionString, 27 | const ossimKeywordlist& options, 28 | std::ios_base::openmode mode) 29 | { 30 | open(std::string(connectionString), options, mode); 31 | } 32 | void open (const std::string& connectionString, 33 | const ossimKeywordlist& options, 34 | std::ios_base::openmode mode) 35 | { 36 | if(m_curlStreamBuffer.open(connectionString, options, mode)) 37 | { 38 | clear(); 39 | } 40 | else 41 | { 42 | setstate(std::ios::failbit); 43 | } 44 | } 45 | protected: 46 | CurlStreamBuffer m_curlStreamBuffer; 47 | 48 | }; 49 | } 50 | 51 | #endif 52 | -------------------------------------------------------------------------------- /web/src/ossimWebPluginRequestFactory.cpp: -------------------------------------------------------------------------------- 1 | #include "ossimWebPluginRequestFactory.h" 2 | #include "ossimCurlHttpRequest.h" 3 | ossimWebPluginRequestFactory* ossimWebPluginRequestFactory::m_instance = 0; 4 | 5 | ossimWebPluginRequestFactory::ossimWebPluginRequestFactory() 6 | { 7 | m_instance = this; 8 | } 9 | 10 | ossimWebPluginRequestFactory* ossimWebPluginRequestFactory::instance() 11 | { 12 | if(!m_instance) 13 | { 14 | m_instance = new ossimWebPluginRequestFactory(); 15 | } 16 | 17 | return m_instance; 18 | } 19 | 20 | ossimWebRequest* ossimWebPluginRequestFactory::create(const ossimUrl& url) 21 | { 22 | 23 | ossimRefPtr request = new ossimCurlHttpRequest(); 24 | 25 | if(request->supportsProtocol(url.getProtocol())) 26 | { 27 | request->set(url, ossimKeywordlist()); 28 | } 29 | else 30 | { 31 | request = 0; 32 | } 33 | return request.release(); 34 | } 35 | -------------------------------------------------------------------------------- /web/src/ossimWebPluginRequestFactory.h: -------------------------------------------------------------------------------- 1 | #ifndef ossimWebPluginRequestFactory_HEADER 2 | #define ossimWebPluginRequestFactory_HEADER 3 | #include 4 | 5 | class ossimWebPluginRequestFactory : public ossimWebRequestFactoryBase 6 | { 7 | public: 8 | static ossimWebPluginRequestFactory* instance(); 9 | virtual ossimWebRequest* create(const ossimUrl& url); 10 | 11 | protected: 12 | ossimWebPluginRequestFactory(); 13 | 14 | static ossimWebPluginRequestFactory* m_instance; 15 | }; 16 | 17 | #endif 18 | -------------------------------------------------------------------------------- /web/test/CMakeLists.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ossimlabs/ossim-plugins/188c01d3b53cb0a2d0d6cf0c9445bc9ace86a074/web/test/CMakeLists.txt --------------------------------------------------------------------------------