Search code examples
javaarcgisgeotools

Geotools ViewType on GridCoverage2D


I am currently updating our projects Geotools jars from 10.8 to RC 21. I've run into an issue where in the coverage jar(gt-coverage-21-RC.jar) the ViewType class no longer exists. Also the code that uses that class on the GridCoverage2D class doesn't exist.

So the following no longer works:

GridCoverage2D coverage = (GridCoverage2D) reader.read(null);
coverage = coverage.view(ViewType.GEOPHYSICS);

The ".view" function doesn't exist on the GridCoverage2D class and the ViewType class is completely removed from the jar file.

We perform this specific operation many times throughout our application with different "ViewType" settings so I don't think this is something I can just comment out and expect it to work. But I can't find any instructions on when and how this was changed/updated. I would love any information on this if anyone has had to deal with it.


Solution

  • It appears that they were removed in this change which seems to indicate they were deprecated back in geotools 13 and so were removed in geotools 14.

    I've opened a ticket to get the documentation updated to match.