Open naivefun opened 7 years ago
@naivefun
I'm assuming you mean how do you add those unknown tags into MDE, or are there other tags you want added? As far as adding/parsing the unknown tags displayed, you will need to create an entry for each tag in the respective directory (create a public static final int and then put it in the HashMap with the correct String name value). You can then parse this data in the respective descriptor. Most of the descriptors in the library have one main switch statement in the getDescription method that will allow you to return a unique String for each tag type. If we take the ExtraSamples tag (0x0152) for example, we would create a getExtraSamplesDescription method that returns a String. In the method, you would want to get whichever data type you need (in this case, int) from the directory. After that, you can manipulate/parse the data as needed. In your specific image's case, that should return something like "Unassociated Alpha" since the value is 2.
If you can provide a sample image, I could look more into the ones in the references you gave. Sometimes it helps me to open up the file in a hex editor (like Hex Fiend) to look at all of the raw bytes. Hex Fiend is nice because you can see the Ascii characters on the right panel (which would help for tags like the GeoAsciiParamsTag).
GeoTIFF support was added to the .NET version of this library in https://github.com/drewnoakes/metadata-extractor-dotnet/pull/307. That PR should serve as a reference for any implementation on the Java side.
GetUint64 and BigTIFF support should also be added from https://github.com/drewnoakes/metadata-extractor-dotnet/commit/309c29257806d9036b46273ade4c5f54e56302e4 and https://github.com/drewnoakes/metadata-extractor-dotnet/commit/23ae9538525461060007998b756fee5dadb5aeb7
I'm working on it but I'm having a hard time to understand the differences in offset handling between the .NET and Java implementations (.NET seems in advance towards Java, but Java handles a "tiffHeaderOffset" absent in .NET implementation so I'm not sure how it fits in with the .NET evolutions)
The field is gone in .NET since https://github.com/drewnoakes/metadata-extractor-dotnet/commit/2281ceaad7dff2b8d6ccebadc992c758c6b964c2
@drewnoakes I guess I should report this change to Java implementation as well to align them?
There seem to be 4 pull request referenced here that seem to be "approved" (?), but as they are in "open" state, they have not been merged yet - is that correct?
I had difficulties to complete the work (especially the tests) and then kinda gave up. But now I need this feature again so I resumed the work, first by rebasing the first PR but I don't know how to resolve a conflict, I need help.
I commented on the PR and pushed a commit that I hope will help.
I'm using a
tif
file withgdalinfo
command and the outputs is like this:However in
ME
the corner coordinates and some info is not parsed, the output ofME
is:How should I parse these encoded values please? Thanks.
Some references: