Ticket #2675 (closed defect: fixed)

Opened 5 years ago

Last modified 4 weeks ago

Read frame camera model from ERDAS Block file

Reported by: gaopeng Owned by: warmerdam
Priority: normal Milestone:
Component: GDAL_Raster Version: unspecified
Severity: normal Keywords: HFA
Cc:

Description

Read frame camera model from ERDAS Block file.

Change History

Changed 5 years ago by gaopeng

Test data will be sent in DVD.

Changed 5 years ago by gaopeng

Test data are also available for download at  ftp://gdal@ftp.esri.com/block.zip.

Changed 5 years ago by warmerdam

  • keywords HFA added
  • status changed from new to assigned
  • component changed from default to GDAL_Raster

Gao,

This is what I get from the example file:

      XForm0(Camera_ModelX) @ 1822 + 1609 @ 87614236
      + direction = EMOD_FORWARD
      + refType = EMOD_CARTESIAN
      + demsource = EMOD_DEM_CONSTANT
      + PhotoDirection = Z_DIRECTION
      + RotationSystem = OMEGA_PHI_KAPPA
      + demfilename = (no values)
      + demzunits = `meters'
      + forSrcAffine[0] = 0.025004
      + forSrcAffine[1] = -0.000111
      + forSrcAffine[2] = -116.068661
      + forSrcAffine[3] = -0.000112
      + forSrcAffine[4] = -0.025006
      + forSrcAffine[5] = 116.271886
      + forDstAffine[0] = 1.000000
      + forDstAffine[1] = 0.000000
      + forDstAffine[2] = 0.000000
      + forDstAffine[3] = 0.000000
      + forDstAffine[4] = 1.000000
      + forDstAffine[5] = 0.000000
      + invSrcAffine[0] = 39.992655
      + invSrcAffine[1] = -0.177588
      + invSrcAffine[2] = 4662.542372
      + invSrcAffine[3] = -0.179200
      + invSrcAffine[4] = -39.990397
      + invSrcAffine[5] = 4628.959394
      + invDstAffine[0] = 1.000000
      + invDstAffine[1] = 0.000000
      + invDstAffine[2] = 0.000000
      + invDstAffine[3] = 0.000000
      + invDstAffine[4] = 1.000000
      + invDstAffine[5] = 0.000000
      + z_mean = 0.000000
      + lat0 = 0.000000
      + lon0 = 0.000000
      + coeffs[0] = 152.794000
      + coeffs[1] = -0.008000
      + coeffs[2] = 0.023000
      + coeffs[3] = 477597.901450
      + coeffs[4] = 4760523.453441
      + coeffs[5] = 1247.187839
      + coeffs[6] = -0.007900
      + coeffs[7] = -0.003817
      + coeffs[8] = 1.584298
      + LensDistortion[0] = 0.000031
      + LensDistortion[1] = -0.000000
      + LensDistortion[2] = -0.000000
      + AdditionalParameters = (no values)
      + obsoletePlaceHolder0 = (no values)
      + outputProjection = 
      +     type = 
      +         string = `Eprj_MapProjection830'
      +     MIFDictionary = `{0:pcdatumname,1:e4:EPRJ_DATUM_PARAMETRIC,EPRJ_DATUM_GRID,EPRJ_DATUM_REGRESSION,EPRJ_DATUM_SURFACE,type,0:pdparams,0:pcgridname,}Eprj_Datum,{0:pcsphereName,1:da,1:db,1:deSquared,1:dradius,}Eprj_Spheroid,{1:*oEprj_Spheroid,proSpheroid,1:*oEprj_Datum,datum,}Eprj_EarthModel830,{1:e2:EPRJ_INTERNAL,EPRJ_EXTERNAL,proType,1:lproNumber,0:pcproExeName,0:pcproName,1:lproZone,0:pdproParams,}Eprj_ProjectionObject830,{1:*oEprj_ProjectionObject830,projectionObject,1:*oEprj_EarthModel830,earthModel,}Eprj_MapProjection830,.'
      +     MIFObject = `^A'
      + outputHorizontalUnits = 
      +     string = `meters'
      + outputElevationInfo = 
      +     type = 
      +         string = `Eprj_ElevationInfo'
      +     MIFDictionary = `{0:pcdatumname,1:e4:EPRJ_DATUM_PARAMETRIC,EPRJ_DATUM_GRID,EPRJ_DATUM_REGRESSION,EPRJ_DATUM_SURFACE,type,0:pdparams,0:pcgridname,}Eprj_Datum,{1:*oEprj_Datum,verticalDatum,0:pcelevationUnit,1:e3:EPRJ_ELEVATION_TYPE_HEIGHT,EPRJ_ELEVATION_TYPE_DEPTH,EPRJ_ELEVATION_TYPE_UNKNOWN,elevationType,}Eprj_ElevationInfo,.'
      +     MIFObject = `^A'

Do you have any particular thoughts on how this information should be presented? Possibly as metadata in a custom domain?

Changed 5 years ago by warmerdam

Gao writes:

Yes. As metadata in a custom domain.

Changed 5 years ago by warmerdam

I have a preliminary implementation reading as metadata domain "CAMERA_MODEL". This does not yet read the projection info MIFObject. The changes do include more generalized MIFObject access at last!

Only in trunk (r15768, r15769).

Changed 5 years ago by warmerdam

Added support for output projection ... that was pretty messy! (r15774).

I really need to add some sort of testing for this, but will need to some create a smaller test file.

Changed 3 years ago by warmerdam

  • status changed from assigned to closed
  • resolution set to fixed

I developed a mechanism (/vsisparse/) to handle sparse data files (r18847), and then built a test for the camera metadata using it. I use the original file reported, but with all imagery excluded from the test suite (r18848).

The test is only in trunk (1.8)

Changed 4 weeks ago by rouault

  • milestone 1.6.4 deleted

Milestone 1.6.4 deleted

Note: See TracTickets for help on using tickets.