10 | | As far as I can tell there are four bugs in the ENVIDataset related to this |
11 | | 1) ENVIDataset::ProcessMapinfo() Doesn't understand the "Arbitrary" projection and defaults to LOCAL_CS - which is probably ok, but; |
12 | | 2) ENVIDataset::WriteProjectionInfo fails to write map info field when projection is LOCAL_CS |
13 | | 3) ENVIDataset::Open() causes bHeaderDirty to be set (should only happen when something external updates the image?) |
14 | | 4) ENVIDataset::FlushCache() should truncate existing file before overwriting |
| 5 | 1. open envi file in read/write mode uses OPEN_EXISTING flag on .hdr |
| 6 | 1. ENVIDataset::Open() doesn't understand "Arbitrary" projection so generates a "LOCAL_CS" projection string |
| 7 | 1. close dataset causing ENVIDataset::FlushCache() to be called |
| 8 | 1. FlushCache() re-writes hdr file as the bHeaderDirty was set in the Open() function. map info field is omitted for some reason? |
| 9 | 1. FlushCache() overwrites the old hdr file without clearing first causing trailing data in the file |
| 10 | |
| 11 | As far as I can tell there are four bugs in the ENVIDataset related to this: |
| 12 | |
| 13 | 1. ENVIDataset::ProcessMapinfo() Doesn't understand the "Arbitrary" projection and defaults to LOCAL_CS - which is probably ok, but; |
| 14 | 1. ENVIDataset::WriteProjectionInfo fails to write map info field when projection is LOCAL_CS |
| 15 | 1. ENVIDataset::Open() causes bHeaderDirty to be set (should only happen when something external updates the image?) |
| 16 | 1. ENVIDataset::FlushCache() should truncate existing file before overwriting |