[Gdal-dev] Drivers for Golden Software Grid Formats (long)
Andrey Kiselev
dron at ak4719.spb.edu
Mon Jan 29 15:22:23 EST 2007
On Mon, Jan 29, 2007 at 09:50:52AM -0500, Kevin Locke wrote:
> > 1. The binary driver could be derived from the RAWDataset class, just
> > like the PNM driver. It prevents code duplication and provides us
> > with free of charge Create() method. Also RAWDataset has several
> > optimizations for speed. But the min/max collecting ability will be
> > lost here, of course.
>
> That's a good idea, I hadn't even noticed that class. The only
> drawbacks of not updating the min/max that I have observed is that
> Surfer (v8) uses these values to set contour interval and a few other
> measurement presets (I'll check more thoroughly this afternoon). So
> it may not be a big problem to leave them untouched, as long as the
> data does not change significantly. Do you think it is worth the
> speed/elegance improvements to have the driver subclass RawDataset at
> the risk of some incompatibility with other programs?
Well, I do not have any strong opinion on this. I think that particular
driver can be implemented in any way.
> > 2. Ther are people which can be allergic to things like
> > 'std::numeric_limits<double>::max()' or 'dynamic_cast' :-)
>
> I've removed the dynamic_casts. The numeric_limits stuff will take
> some thought in a few places, but I should be able to get it done
> shortly.
I am not sure whether it is portable enough. Mateusz may have more clues
related to MSVC embedded and MSVC 6 compilers.
> >> First, is there a portable file truncate function? [...]
> >
> > It seems we do not have the one, though it can be added.
>
> That would be appreciated. For the ASCII format, grid lines are
> likely to change length on every write and setting min/max at the end
> of copy() can also require some shifting. My approach of padding the
> end with spaces seems to work, but it is less than elegant.
Huh, I did padding in my code to wrote GRD files! I wil think how
truncate function could be implemented.
Best regards,
Andrey
--
Andrey V. Kiselev
ICQ# 26871517
More information about the Gdal-dev
mailing list