gsd
This commit is contained in:
@@ -30,9 +30,9 @@ type AuxPlatform struct {
|
|||||||
QuatOrbJQ1 float64 // [37-40]轨道相对惯性系四元数矢部 的 Q1 值,量纲 1/0x40000000
|
QuatOrbJQ1 float64 // [37-40]轨道相对惯性系四元数矢部 的 Q1 值,量纲 1/0x40000000
|
||||||
QuatOrbJQ2 float64 // [41-44]Q2 值
|
QuatOrbJQ2 float64 // [41-44]Q2 值
|
||||||
QuatOrbJQ3 float64 // [45-48]Q3 值
|
QuatOrbJQ3 float64 // [45-48]Q3 值
|
||||||
Eular1 float64 // [49-52]本体相对轨道姿态角,[Z]Yaw 测摆角,量纲:1/1000000 单位:rad
|
Eular1 float64 // [49-52]本体相对轨道姿态角,[X]Roll 测摆角,量纲:1/1000000 单位:rad
|
||||||
Eular2 float64 // [53-56] Pitch [Y]
|
Eular2 float64 // [53-56] Pitch [Y] Pitch
|
||||||
Eular3 float64 // [57-60] Roll [X]
|
Eular3 float64 // [57-60] Roll [Z] YAW
|
||||||
DotEular1 float64 // [61-62]本体相对轨道角速度,量纲:1/100000 单位:rad
|
DotEular1 float64 // [61-62]本体相对轨道角速度,量纲:1/100000 单位:rad
|
||||||
DotEular2 float64 // [63-64]
|
DotEular2 float64 // [63-64]
|
||||||
DotEular3 float64 // [65-66]
|
DotEular3 float64 // [65-66]
|
||||||
|
|||||||
@@ -39,10 +39,6 @@ func (r *Registrator) ScenePosition(scene *Scene) (topLeft, bottomRight orb.Poin
|
|||||||
|
|
||||||
lat, lng := calculator.CalculateDestination(lat0, lng0,
|
lat, lng := calculator.CalculateDestination(lat0, lng0,
|
||||||
float64(scene.Width)*scene.Meta.Gsd, float64(-scene.Y)*scene.Meta.Gsd)
|
float64(scene.Width)*scene.Meta.Gsd, float64(-scene.Y)*scene.Meta.Gsd)
|
||||||
|
|
||||||
// lat0, lng0, h0 := calculator.WGS84XYZtoLatLngH(ap1.WGS84PosX, ap1.WGS84PosY, ap1.WGS84PosZ)
|
|
||||||
// fmt.Println("Scene Position End:", lat0, lng0, h0)
|
|
||||||
|
|
||||||
lat1, lng1 := calculator.CalculateDestination(lat, lng,
|
lat1, lng1 := calculator.CalculateDestination(lat, lng,
|
||||||
float64(scene.Width)*scene.Meta.Gsd, float64(-scene.Height)*scene.Meta.Gsd)
|
float64(scene.Width)*scene.Meta.Gsd, float64(-scene.Height)*scene.Meta.Gsd)
|
||||||
|
|
||||||
@@ -71,9 +67,9 @@ func (r *Registrator) ScenePosition(scene *Scene) (topLeft, bottomRight orb.Poin
|
|||||||
scene.Meta.SatPosX = ap.WGS84PosX
|
scene.Meta.SatPosX = ap.WGS84PosX
|
||||||
scene.Meta.SatPosY = ap.WGS84PosY
|
scene.Meta.SatPosY = ap.WGS84PosY
|
||||||
scene.Meta.SatPosZ = ap.WGS84PosZ
|
scene.Meta.SatPosZ = ap.WGS84PosZ
|
||||||
scene.Meta.Yaw = ap.Eular1 * 180 / math.Pi
|
scene.Meta.Yaw = ap.Eular3 * 180 / math.Pi
|
||||||
scene.Meta.Pitch = ap.Eular2 * 180 / math.Pi
|
scene.Meta.Pitch = ap.Eular2 * 180 / math.Pi
|
||||||
scene.Meta.Roll = ap.Eular3 * 180 / math.Pi
|
scene.Meta.Roll = ap.Eular1 * 180 / math.Pi
|
||||||
|
|
||||||
// feature := geojson.NewFeature(poly)
|
// feature := geojson.NewFeature(poly)
|
||||||
// fcs.Features = append(fcs.Features, feature)
|
// fcs.Features = append(fcs.Features, feature)
|
||||||
|
|||||||
@@ -26,6 +26,8 @@ const (
|
|||||||
OverlappedBlockLines = 3000 // 重叠块的行数
|
OverlappedBlockLines = 3000 // 重叠块的行数
|
||||||
DownSampled ResampleMethod = "down_sample_pan"
|
DownSampled ResampleMethod = "down_sample_pan"
|
||||||
UpSampled ResampleMethod = "up_sample_mss"
|
UpSampled ResampleMethod = "up_sample_mss"
|
||||||
|
PanResolution = 1.3 // mm/pixel
|
||||||
|
MssResolution = 5.2
|
||||||
)
|
)
|
||||||
|
|
||||||
type ResampleMethod string
|
type ResampleMethod string
|
||||||
|
|||||||
@@ -73,10 +73,10 @@ func (r *Registrator) makeProductMeta(scene *Scene) *ProductMeta {
|
|||||||
|
|
||||||
switch scene.Type {
|
switch scene.Type {
|
||||||
case "PAN":
|
case "PAN":
|
||||||
meta.Gsd = 1.25
|
meta.Gsd = 1.3
|
||||||
meta.Bands = 1
|
meta.Bands = 1
|
||||||
case "MSS":
|
case "MSS":
|
||||||
meta.Gsd = 5
|
meta.Gsd = 5.2
|
||||||
meta.Bands = 4
|
meta.Bands = 4
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ func savePanToGDALGTiff(pan gocv.Mat, topLeftX, topLeftY float64, tiffFile strin
|
|||||||
}
|
}
|
||||||
defer ds.Close()
|
defer ds.Close()
|
||||||
|
|
||||||
setGeoTransform(ds, topLeftX, topLeftY, 1.25)
|
setGeoTransform(ds, topLeftX, topLeftY, PanResolution)
|
||||||
ds.SetMetadata("NBITS", "16")
|
ds.SetMetadata("NBITS", "16")
|
||||||
|
|
||||||
// 将通道的数据转换为uint16数组
|
// 将通道的数据转换为uint16数组
|
||||||
@@ -68,7 +68,7 @@ func (r *Registrator) SaveRegisteredMssToGDALGTiff(tiffFile string) error {
|
|||||||
gocv.Merge(r.registeredMssImages[:], &r.rgbirImage)
|
gocv.Merge(r.registeredMssImages[:], &r.rgbirImage)
|
||||||
|
|
||||||
err := SaveBGRToGDALGTiff(r.rgbirImage,
|
err := SaveBGRToGDALGTiff(r.rgbirImage,
|
||||||
4, 0, 0, 5,
|
4, 0, 0, MssResolution,
|
||||||
[]godal.ColorInterp{godal.CIBlue, godal.CIGreen, godal.CIRed, godal.CIUndefined},
|
[]godal.ColorInterp{godal.CIBlue, godal.CIGreen, godal.CIRed, godal.CIUndefined},
|
||||||
tiffFile)
|
tiffFile)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|||||||
@@ -144,7 +144,7 @@ func (r *Registrator) SaveScenesToTiff(panScenes []*Scene, mssScenes []*Scene) e
|
|||||||
4,
|
4,
|
||||||
scene.Meta.Corners.UpperLeft.Longitude,
|
scene.Meta.Corners.UpperLeft.Longitude,
|
||||||
scene.Meta.Corners.UpperLeft.Latitude,
|
scene.Meta.Corners.UpperLeft.Latitude,
|
||||||
5,
|
MssResolution,
|
||||||
[]godal.ColorInterp{godal.CIBlue, godal.CIGreen, godal.CIRed, godal.CIUndefined},
|
[]godal.ColorInterp{godal.CIBlue, godal.CIGreen, godal.CIRed, godal.CIUndefined},
|
||||||
scene.Tiff)
|
scene.Tiff)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|||||||
Reference in New Issue
Block a user