Opened 13 years ago

Closed 5 years ago

#4192 closed defect (wontfix)

The gelocation transformer does not work properly with modis swath

Reported by: winkey Owned by: warmerdam
Priority: normal Milestone: closed_because_of_github_migration
Component: default Version: unspecified
Severity: normal Keywords:
Cc:

Description

The geolocation transformer takes an average of the latitude of two rows.

padfY[i] =   padfGLY[0] 
           + (dfGeoLocPixel-iX) * (padfGLY[1] - padfGLY[0])
           + (dfGeoLocLine -iY) * (padfGLY[nXSize] - padfGLY[0]);

Each modis strip (10 geolocation rows) overlaps the previous strip. so when averaging the latitude of the 10th and 11th geolocation rows large errors are introduced.

Attachments (1)

gdalgeolocstrip.diff (2.0 KB ) - added by winkey 13 years ago.

Download all attachments as: .zip

Change History (4)

comment:1 by winkey, 13 years ago

The only idea I have for a fix of this is to add a new metadata item "GEOLOCSTRIP_HIEGHT" to the geolocation metadata. Then check if the if current row is a increment of the geolocation strip height, if unset it would not change the current behavior.

<VRTDataset rasterXSize="5416" rasterYSize="8120">
  <Metadata domain="GEOLOCATION">
    <MDI key="X_DATASET">x.tif</MDI>
    <MDI key="X_BAND">1</MDI>
    <MDI key="Y_DATASET">y.tif</MDI>
    <MDI key="Y_BAND">1</MDI>
    <MDI key="PIXEL_OFFSET">1.5</MDI>
    <MDI key="LINE_OFFSET">0</MDI>
    <MDI key="PIXEL_STEP">4</MDI>
    <MDI key="LINE_STEP">4</MDI>
    <MDI key="GEOLOCSTRIP_HIEGHT">10</MDI>
  </Metadata>
  <SRS>GEOGCS[&quot;WGS 84&quot;,DATUM[&quot;WGS_1984&quot;,SPHEROID[&quot;WGS 84&quot;,6378137,298.257223563,AUTHORITY[&quot;EPSG&quot;,&quot;7030&quot;]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[&quot;EPSG&quot;,&quot;6326&quot;]],PRIMEM[&quot;Greenwich&quot;,0,AUTHORITY[&quot;EPSG&quot;,&quot;8901&quot;]],UNIT[&quot;degree&quot;,0.0174532925199433,AUTHORITY[&quot;EPSG&quot;,&quot;9108&quot;]],AXIS[&quot;Lat&quot;,NORTH],AXIS[&quot;Long&quot;,EAST],AUTHORITY[&quot;EPSG&quot;,&quot;4326&quot;]]</SRS> 
  <VRTRasterBand dataType="Int16" band="1">
    <SimpleSource>
      <SourceFilename relativetoVRT="1">b1.tif</SourceFilename>
      <SourceBand>1</SourceBand>
      <SrcRect xOff="0" yOff="0" xSize="5416" ySize="8120" />
      <DstRect xOff="0" yOff="0" xSize="5416" ySize="8120" />
    </SimpleSource>
  </VRTRasterBand>
</VRTDataset>

by winkey, 13 years ago

Attachment: gdalgeolocstrip.diff added

comment:2 by winkey, 13 years ago

fixed spelling of GEOLOCSTRIP_HEIGHT and removed a misplaced * in the patch

comment:3 by Even Rouault, 5 years ago

Milestone: closed_because_of_github_migration
Resolution: wontfix
Status: newclosed

This ticket has been automatically closed because Trac is no longer used for GDAL bug tracking, since the project has migrated to GitHub. If you believe this ticket is still valid, you may file it to https://github.com/OSGeo/gdal/issues if it is not already reported there.

Note: See TracTickets for help on using tickets.