使用 gdalwarp 生产 L2
This commit is contained in:
@@ -102,3 +102,19 @@ func (r *Registrator) writeProductMeta(productMeta *ProductMeta, filename string
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func ParseProductMeta(filename string) (*ProductMeta, error) {
|
||||
f, err := os.Open(filename)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
defer f.Close()
|
||||
|
||||
var meta ProductMeta
|
||||
err = xml.NewDecoder(f).Decode(&meta)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return &meta, nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user