Add geodir hashmap to decoder
This commit is contained in:
1 parent
9a0041286e
commit
4b218be4ac
1 file changed
+7
-1
+7
-1
@@ -210,6 +210,7 @@ where
|
|||||||
photometric_interpretation: PhotometricInterpretation,
|
photometric_interpretation: PhotometricInterpretation,
|
||||||
compression_method: CompressionMethod,
|
compression_method: CompressionMethod,
|
||||||
strip_decoder: Option<StripDecodeState>,
|
strip_decoder: Option<StripDecodeState>,
|
||||||
|
geokey_dir: Option<HashMap<geo::geo_key::GeoKey, geo::geo_key::GeoKeyType>>,
|
||||||
}
|
}
|
||||||
|
|
||||||
trait Wrapping {
|
trait Wrapping {
|
||||||
@@ -325,6 +326,7 @@ impl<R: Read + Seek> Decoder<R> {
|
|||||||
photometric_interpretation: PhotometricInterpretation::BlackIsZero,
|
photometric_interpretation: PhotometricInterpretation::BlackIsZero,
|
||||||
compression_method: CompressionMethod::None,
|
compression_method: CompressionMethod::None,
|
||||||
strip_decoder: None,
|
strip_decoder: None,
|
||||||
|
geokey_dir: None,
|
||||||
}
|
}
|
||||||
.init()
|
.init()
|
||||||
}
|
}
|
||||||
@@ -478,7 +480,11 @@ impl<R: Read + Seek> Decoder<R> {
|
|||||||
Ok(geodir) => {
|
Ok(geodir) => {
|
||||||
let ascii_params = Result::ok(self.get_tag_ascii_string(Tag::GeoAsciiParamsTag));
|
let ascii_params = Result::ok(self.get_tag_ascii_string(Tag::GeoAsciiParamsTag));
|
||||||
let double_params = Result::ok(self.get_tag_f64_vec(Tag::GeoDoubleParamsTag));
|
let double_params = Result::ok(self.get_tag_f64_vec(Tag::GeoDoubleParamsTag));
|
||||||
geo::geo_key::parse_geo_keys(geodir, ascii_params, double_params);
|
self.geokey_dir = Some(geo::geo_key::parse_geo_keys(
|
||||||
|
geodir,
|
||||||
|
ascii_params,
|
||||||
|
double_params,
|
||||||
|
));
|
||||||
// TODO: save the hashmap somewhere in this module/decoder
|
// TODO: save the hashmap somewhere in this module/decoder
|
||||||
}
|
}
|
||||||
Err(_) => {}
|
Err(_) => {}
|
||||||
|
|||||||
Reference in new issue
Block a user