Using WorldView panchromatics rasters
<PRODUCTLEVEL>Stereo OR2A</PRODUCTLEVEL>
assumed to be ‘ortho ready’ from above product level in the xml file, so I anticipated having to orthorectify before carrying out Stereoscopic reconstruction creation.
First I carry out Orthorectification of source rasters:
otbcli_OrthoRectification
-elev.dem F:\GIS\opentopo
-elev.geoid F:\OTB-6.6.1-Win64\geoid\egm96.grd
-interpolator “bco”
-interpolator.bco.radius 2
-io.in “F:/GIS/056078906030_01_P001_PAN/16JAN23133047-P2AS-056078906030_01_P001.TIF?&skipcarto=true”
-map “epsg”
-map.epsg.code 32723
-opt.gridspacing 4.0
-opt.rpc 10 -outputs.isotropic True
-outputs.mode “auto”
-io.out “F:/GIS/orthoR.tif”
which seems to work fine when briefly matching against google sat in QGIS -
I’ve then carried out Stereo rectification grid generator
otbcli_StereoRectificationGridGenerator
-io.inleft “F:/GIS/orthoL.tif?&skipcarto=true”
-io.inright “F:/GIS/orthoR.tif?&skipcarto=true”
-epi.step 2
-epi.elevation.dem F:/GIS/opentopo
-epi.elevation.default 45.35 -epi.elevation.geoid F:\OTB-6.6.1-Win64\geoid\egm96.grd
-io.outleft F:/GIS/grid_stereo_rio_small_L.tif
-io.outright F:/GIS/grid_stereo_rio_small_R.tif
and then Grid based image resampling for left and right (only showing right below):
otbcli_GridBasedImageResampling
-io.in “F:/GIS/orthoR.tif?&skipcarto=true”
-io.out F:/GIS/epi_stereo_rio_small_R.tif
-grid.in F:/GIS/grid_stereo_rio_small_R.tif
-out.sizex 14002
-out.sizey 16053
But my issue is I’m getting an offset in the 2 rasters?
Are ‘ortho ready’ products sometimes already orthorectified?
Below is result of ReadImageInfo on source WorldView raster:
Input parameters:
{ ‘in’ : ‘F:/GIS/OTB_Help/Rio_de_Janeiro/056078906030_01_P001_PAN/16JAN23133047-P2AS-056078906030_01_P001.TIF’, ‘keywordlist’ : False, ‘outkwl’ : ‘TEMPORARY_OUTPUT’ }2020-01-23 01:10:18 (INFO): Default RAM limit for OTB is 128 MB
2020-01-23 01:10:18 (INFO): GDAL maximum cache size is 812 MB
2020-01-23 01:10:18 (INFO): OTB will use at most 8 threads
2020-01-23 01:10:18 (INFO): Loading kwl metadata from official product in file F:/GIS/OTB_Help/Rio_de_Janeiro/056078906030_01_P001_PAN/16JAN23133047-P2AS-056078906030_01_P001.TIF
2020-01-23 01:10:18 (INFO):
Image general information:
Number of bands : 1
No data flags : Not found
Start index : [0,0]
Size : [13632,11244]
Origin : [684717,7.46199e+06]
Spacing : [0.3,-0.3]
Estimated ground spacing (in meters): [0.299544,0.301234]Image acquisition information:
Sensor : WV03
Image identification number: 16JAN23133047-P2AS-056078906030_01_P001
Image projection : PROJCS[“WGS 84 / UTM zone 23S”,
GEOGCS[“WGS 84”,
DATUM[“WGS_1984”,
SPHEROID[“WGS 84”,6378137,298.257223563,
AUTHORITY[“EPSG”,“7030”]],
AUTHORITY[“EPSG”,“6326”]],
PRIMEM[“Greenwich”,0],
UNIT[“degree”,0.0174532925199433],
AUTHORITY[“EPSG”,“4326”]],
PROJECTION[“Transverse_Mercator”],
PARAMETER[“latitude_of_origin”,0],
PARAMETER[“central_meridian”,-45],
PARAMETER[“scale_factor”,0.9996],
PARAMETER[“false_easting”,500000],
PARAMETER[“false_northing”,10000000],
UNIT[“metre”,1,
AUTHORITY[“EPSG”,“9001”]],
AUTHORITY[“EPSG”,“32723”]]Image footprint coordinates:
Upper left corner (latitude, longitude) = [-22.94,-43.1986]
Upper right corner (latitude, longitude) = [-22.9395,-43.1587]
Lower left corner (latitude, longitude) = [-22.9704,-43.1982]
Lower right corner (latitude, longitude) = [-22.97,-43.1583]Image default RGB composition:
[R, G, B] = [0,1,2]Ground control points information:
Number of GCPs = 0
GCPs projection =Output parameters value:
indexx: 0
indexy: 0
sizex: 13632
sizey: 11244
spacingx: 0.3000000119
spacingy: -0.3000000119
originx: 684716.5625
originy: 7461990
estimatedgroundspacingx: 0.299544096
estimatedgroundspacingy: 0.3012338281
numberbands: 1
sensor: WV03
id: 16JAN23133047-P2AS-056078906030_01_P001
time:
ullat: -22.9399929
ullon: -43.19857788
urlat: -22.93953514
urlon: -43.15871429
lrlat: -22.96998787
lrlon: -43.15830231
lllat: -22.97044563
lllon: -43.19817734
town: Not available
country: Not available
rgb.r: 0
rgb.g: 1
rgb.b: 2
projectionref: PROJCS[“WGS 84 / UTM zone 23S”,
GEOGCS[“WGS 84”,
DATUM[“WGS_1984”,
SPHEROID[“WGS 84”,6378137,298.257223563,
AUTHORITY[“EPSG”,“7030”]],
AUTHORITY[“EPSG”,“6326”]],
PRIMEM[“Greenwich”,0],
UNIT[“degree”,0.0174532925199433],
AUTHORITY[“EPSG”,“4326”]],
PROJECTION[“Transverse_Mercator”],
PARAMETER[“latitude_of_origin”,0],
PARAMETER[“central_meridian”,-45],
PARAMETER[“scale_factor”,0.9996],
PARAMETER[“false_easting”,500000],
PARAMETER[“false_northing”,10000000],
UNIT[“metre”,1,
AUTHORITY[“EPSG”,“9001”]],
AUTHORITY[“EPSG”,“32723”]]
keyword:
gcp.count: 0
gcp.proj:
gcp.ids:
gcp.info:
gcp.imcoord:
gcp.geocoord:
And then ReadImageInfo on raster generated after the Grid based image resampling step:
Input parameters:
{ ‘in’ : ‘F:/GIS/OTB_Help/Rio_de_Janeiro/22_01_20b/epi_stereo_rio_small_R.tif’, ‘keywordlist’ : False, ‘outkwl’ : ‘TEMPORARY_OUTPUT’ }2020-01-23 01:13:59 (INFO): Default RAM limit for OTB is 128 MB
2020-01-23 01:13:59 (INFO): GDAL maximum cache size is 812 MB
2020-01-23 01:13:59 (INFO): OTB will use at most 8 threads
2020-01-23 01:13:59 (INFO): Loading kwl metadata from attached geom file F:/GIS/OTB_Help/Rio_de_Janeiro/22_01_20b/epi_stereo_rio_small_R.geom
2020-01-23 01:13:59 (INFO):
Image general information:
Number of bands : 1
No data flags :
Band 1: 0
Start index : [0,0]
Size : [14002,16053]
Origin : [0,0]
Spacing : [1,1]
Estimated ground spacing (in meters): [0.299487,0.301214]Image acquisition information:
Sensor : WV03
Image identification number: 16JAN23133047-P2AS-056078906030_01_P001Image footprint coordinates:
Upper left corner (latitude, longitude) = [-22.94,-43.1986]
Upper right corner (latitude, longitude) = [-22.9395,-43.1587]
Lower left corner (latitude, longitude) = [-22.9704,-43.1982]
Lower right corner (latitude, longitude) = [-22.97,-43.1583]Image default RGB composition:
[R, G, B] = [0,1,2]Ground control points information:
Number of GCPs = 0
GCPs projection =Output parameters value:
indexx: 0
indexy: 0
sizex: 14002
sizey: 16053
spacingx: 1
spacingy: 1
originx: 0
originy: 0
estimatedgroundspacingx: 0.2994868755
estimatedgroundspacingy: 0.3012136221
numberbands: 1
sensor: WV03
id: 16JAN23133047-P2AS-056078906030_01_P001
time:
ullat: -22.9399929
ullon: -43.19857788
urlat: -22.93953514
urlon: -43.15871429
lrlat: -22.96998787
lrlon: -43.15830231
lllat: -22.97044563
lllon: -43.19817734
town: Not available
country: Not available
rgb.r: 0
rgb.g: 1
rgb.b: 2
projectionref:
keyword:
gcp.count: 0
gcp.proj:
gcp.ids:
gcp.info:
gcp.imcoord:
gcp.geocoord: