Crap, hit send too quickly:

I have a PR against my own fork here to illustrate the changes.

https://github.com/dvntucker/geotools/pull/4/files

1) A couple static blocks were changing the NetCDF default enhance mode to
just Enhance.CoordSystems. I removed these calls since Enhance.CoordSystems
is already part of the defaults, along with Enhance.ScaleMissing and
Enhance.ConvertEnums. I don't know a whole lot about NetCDF, but it seems
like these defaults should be kept in place? Is there a reason to keep this
call? All the tests pass fine without it.

2) The original datatype was being used to create the sample/color model in
the raster, instead of the enhanced datatype. So even after changing the
defaults the NetCDF reader was creating a raster with integer bands and
failing to write to it. I changed the utility method used to get the
datatype to use the getDataType method instead of the getOriginalDatatype
method. The only niggle here is that the utility method name
(getRawDataType) suggests that the method actually IS interested in the
base datatype, but... it's only ever used when creating the sample model,
so... not sure if the base type would ever be useful there. Maybe the
utility method should be renamed?

Anyone have any feedback or reasons not to make these changes? All the
tests pass with them.

Cheers,
Devon

On Wed, Sep 7, 2016 at 2:37 PM, Devon Tucker <[email protected]> wrote:

> Hi all,
>
> I was looking into why the NetCDF reader isn't respecting scale_factor and
> add_offset and found a few things that I'm looking for feedback on.
>
>
------------------------------------------------------------------------------
_______________________________________________
GeoTools-Devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel

Reply via email to