Conversation
197g
left a comment
There was a problem hiding this comment.
I think it's too much in one PR. I'd rather merge the smaller features such as newly recognized tags and value types quickly and leave the mechanisms of parsing the types as a separate draft as everything involved needs quite a lot of polish and probably require a lot of extra work if it were to be maintenaned in the current state.
Okay I will then remove everything except for the types and tags and create another repo for my own use with the contents of the |
|
Sounds good. I do appreciate the work and would like to see it merged—or independently published—at some point. Don't hesitate to ask or propose additional interface in case something needs additional changes in |
|
I removed the geo stuff and put it in my own repository. |
0a0779c to
e2caf86
Compare
|
Rebased. |
Hi there,
this branch attempts to implement some support for geotiffs (#98). This can become quite involved and if we implement everything about geotiff, we end up with a re-implementation of
gdal.So instead, I wrote something that gets all of the missing geo data out of geotiffs.
Summary
ModelPixelScaleTag,ModelTransformationTag,ModelTiepointTag,GeoKeyDirectoryTag,GeoDoubleParamsTag,GeoAsciiParamsTag,GdalNodata.GeoKeyDirectoryTag) is read out and saved in a hashmap.Open questions
get_tagmethods which returns an option of a value given a geokey key.tags::Tagvalue so I can check for it in my for loop ingeo_key.rs, e.g. instead of explicitely checking for a value of34736I would rather compare againstTag::GeoDoubleParamsTag as u16but this does not work because of thetags!macro around theTagenum.Things to keep in mind
ModelTiepointTagonly contained one tiepoint, and thatgdalinfoshows all 5 tie point maps (top right, top bottom, center, etc.). This is apparently calculated, so this needs to take into account, theModelPixelScaleTag, the width and height of the raster image and the projection type. And then they must be calculating the other tie points by calculating raster points and then project those. I don't think it makes sense to implement that in this package (at this point anyways), to me this belongs more into ageo-toolspackage or something, which parses values from geotiff. I will have to implement this so I can report back at some point when I have something to show.Please let me know what you guys think and what is missing.