ossimlabs / ossim

Core OSSIM (Open Source Software Image Map) package including C++ code for OSSIM library, command-line applications, tests, and build system
MIT License
300 stars 142 forks source link

ossim-mosaic does not recognize projections #180

Open iskandervito opened 6 years ago

iskandervito commented 6 years ago

Dear I wanted to mosaic two images having ossimPolarStereographic projection. I just checked that the projection is well set in the geotiff file by running gdalinfo on the two images (here is one of the output of gdalinfo gdalinfo PROBAV_L1B-CALIBRATION_20171024_235442_2_V101_BLUE_QLK.tif gives this output Driver: GTiff/GeoTIFF Files: ./tmp/PROBAV_L1B-CALIBRATION_20171024_235442_2_V101_BLUE_QLK.tif Size is 7948, 16238 Coordinate System is: PROJCS["WGS 84 / Antarctic Polar Stereographic", GEOGCS["WGS 84", DATUM["WGS_1984", SPHEROID["WGS 84",6378137,298.257223563, AUTHORITY["EPSG","7030"]], AUTHORITY["EPSG","6326"]], PRIMEM["Greenwich",0, AUTHORITY["EPSG","8901"]], UNIT["degree",0.0174532925199433, AUTHORITY["EPSG","9122"]], AUTHORITY["EPSG","4326"]], PROJECTION["Polar_Stereographic"], PARAMETER["latitude_of_origin",-71], PARAMETER["central_meridian",0], PARAMETER["scale_factor",1], PARAMETER["false_easting",0], PARAMETER["false_northing",0], UNIT["metre",1, AUTHORITY["EPSG","9001"]], AXIS["Easting",EAST], AXIS["Northing",NORTH], AUTHORITY["EPSG","3031"]] Origin = (-773500.000000000000000,3272900.000000000000000) Pixel Size = (400.000000000000000,-400.000000000000000) Metadata: AREA_OR_POINT=Area Image Structure Metadata: COMPRESSION=DEFLATE INTERLEAVE=BAND Corner Coordinates: Upper Left ( -773500.000, 3272900.000) ( 13d17'49.21"W, 59d44'33.01"S) Lower Left ( -773500.000,-3222300.000) (166d30' 6.40"W, 60d 9'58.29"S) Upper Right ( 2405700.000, 3272900.000) ( 36d19' 2.04"E, 53d49' 8.72"S) Lower Right ( 2405700.000,-3222300.000) (143d15'20.78"E, 54d 9'31.58"S) Center ( 816100.000, 25300.000) ( 88d13'27.61"E, 82d29'44.15"S)

When I run the ossim-mosaic using the attached kwl file I got this error unable to create product projection

I attached the two images and the kwl configuration file ossim-issue.zip

omarossim commented 6 years ago

Hello:

We had a little bug on the latest git repo. I’ll check that in soon. There was a core dump with that type of strip with single band sample that you supplied. Once I fixed the core dump of the latest code I was able to successfully mosaic the images..

I then tested the following command:

ossim-chipper —op ortho *.tif out.tif

The ossim-chipper application will do a full image mosaic. Other examples can be:

ossim-chipper --combiner-type ossimImageMosaic --op ortho f1.tif f2.tif f3.tif outputs/mosaic.tif ossim-chipper --combiner-type ossimFeatherMosaic --op ortho f1.tif f2.tif f3.tif outputs/feather.tif ossim-chipper --combiner-type ossimMosaic --op ortho f1.tif f2.tif f3.tif outputs/feather.tif

You also need to make sure that eh ossim-preferences file is set and pointed to by OSSIM_PREFS_FILE. There is a template that can be found under the git repo ossim under the directory share/ossim/templates/ossim_preferences_template. You need to make sure that the projection codes are pointed to by that file.

Here is my example of those keywords:

epsg_database_file1: $(OSSIM_DEV_HOME)/ossim/share/ossim/projection/ossim_epsg_projections-v7_4.csv epsg_database_file2: $(OSSIM_DEV_HOME)/ossim/share/ossim/projection/ossim_harn_state_plane_epsg.csv epsg_database_file3: $(OSSIM_DEV_HOME)/ossim/share/ossim/projection/ossim_state_plane_spcs.csv epsg_database_file4: $(OSSIM_DEV_HOME)/ossim/share/ossim/projection/ossim_harn_state_plane_esri.csv

wkt_database_file: $(OSSIM_DEV_HOME)/ossim/share/ossim/projection/ossim_wkt_pcs.csv

Take care

Garrett Potts

On Nov 26, 2017, at 9:32 AM, iskandervito notifications@github.com wrote:

Dear I wanted to mosaic two images having ossimPolarStereographic projection. I just checked that the projection is well set in the geotiff file by running gdalinfo on the two images (here is one of the output of gdalinfo gdalinfo PROBAV_L1B-CALIBRATION_20171024_235442_2_V101_BLUE_QLK.tif gives this output Driver: GTiff/GeoTIFF Files: ./tmp/PROBAV_L1B-CALIBRATION_20171024_235442_2_V101_BLUE_QLK.tif Size is 7948, 16238 Coordinate System is: PROJCS["WGS 84 / Antarctic Polar Stereographic", GEOGCS["WGS 84", DATUM["WGS_1984", SPHEROID["WGS 84",6378137,298.257223563, AUTHORITY["EPSG","7030"]], AUTHORITY["EPSG","6326"]], PRIMEM["Greenwich",0, AUTHORITY["EPSG","8901"]], UNIT["degree",0.0174532925199433, AUTHORITY["EPSG","9122"]], AUTHORITY["EPSG","4326"]], PROJECTION["Polar_Stereographic"], PARAMETER["latitude_of_origin",-71], PARAMETER["central_meridian",0], PARAMETER["scale_factor",1], PARAMETER["false_easting",0], PARAMETER["false_northing",0], UNIT["metre",1, AUTHORITY["EPSG","9001"]], AXIS["Easting",EAST], AXIS["Northing",NORTH], AUTHORITY["EPSG","3031"]] Origin = (-773500.000000000000000,3272900.000000000000000) Pixel Size = (400.000000000000000,-400.000000000000000) Metadata: AREA_OR_POINT=Area Image Structure Metadata: COMPRESSION=DEFLATE INTERLEAVE=BAND Corner Coordinates: Upper Left ( -773500.000, 3272900.000) ( 13d17'49.21"W, 59d44'33.01"S) Lower Left ( -773500.000,-3222300.000) (166d30' 6.40"W, 60d 9'58.29"S) Upper Right ( 2405700.000, 3272900.000) ( 36d19' 2.04"E, 53d49' 8.72"S) Lower Right ( 2405700.000,-3222300.000) (143d15'20.78"E, 54d 9'31.58"S) Center ( 816100.000, 25300.000) ( 88d13'27.61"E, 82d29'44.15"S)

When I run the ossim-mosaic using the attached kwl file I got this error unable to create product projection

I attached the two images and the kwl configuration file ossim-issue.zip https://github.com/ossimlabs/ossim/files/1503960/ossim-issue.zip — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/ossimlabs/ossim/issues/180, or mute the thread https://github.com/notifications/unsubscribe-auth/AGpvynhUBGwUXYdYYKvnFcwox3JnqXR3ks5s6XZ6gaJpZM4Qqyzz.

yghlc commented 5 years ago

Has this issue been solved? I encountered this issue too when I tried to perform mosaic on two images with "WGS 84 / UTM zone 46N". My images have only one band.

KeoChi commented 5 years ago

Has this issue been solved? I encountered this issue too!!!!!!

KeoChi commented 5 years ago

Hello! I had solved my problem. 1.make install 2.export OSSIM_PREFS_FILE={your install directory}/share/ossim/ossim-preferences-template 3.export OSSIM_INSTALL_PREFIX={your install directory}