Hi Ede
I am going to partially revert no data reading
back to Apache Commons Imaging
The reason is that the actual method that uses JAI (I added yesterday)
still throws a
NumberFormatException with one of the 24 test files that Roberto provided.
While commons imaging works file with all.
Peppe

Il giorno mer 23 set 2020 alle ore 18:22 jump-pilot-svn--- via
Jump-pilot-devel <jump-pilot-devel@lists.sourceforge.net> ha scritto:

> Revision: 6526
>           http://sourceforge.net/p/jump-pilot/code/6526
> Author:   edso
> Date:     2020-09-23 16:22:46 +0000 (Wed, 23 Sep 2020)
> Log Message:
> -----------
> rename getImage() to getRenderedOp() because it's what it does
> keep getImage() deprecated for now
>
> Modified Paths:
> --------------
>
> core/trunk/src/com/vividsolutions/jump/workbench/imagery/geoimg/GeoRaster.java
>     core/trunk/src/org/openjump/core/rasterimage/TiffUtilsV2.java
>
> Modified:
> core/trunk/src/com/vividsolutions/jump/workbench/imagery/geoimg/GeoRaster.java
> ===================================================================
> ---
> core/trunk/src/com/vividsolutions/jump/workbench/imagery/geoimg/GeoRaster.java
>     2020-09-23 16:20:40 UTC (rev 6525)
> +++
> core/trunk/src/com/vividsolutions/jump/workbench/imagery/geoimg/GeoRaster.java
>     2020-09-23 16:22:46 UTC (rev 6526)
> @@ -279,7 +279,12 @@
>    protected void normalize(RenderedOp image) {
>    }
>
> +  @Deprecated // use getRenderedOP() instead
>    public RenderedOp getImage() throws ReferencedImageException {
> +    return getRenderedOp();
> +  }
> +
> +  public RenderedOp getRenderedOp() throws ReferencedImageException {
>      if (src == null)
>        readRasterfile();
>      return src;
>
> Modified: core/trunk/src/org/openjump/core/rasterimage/TiffUtilsV2.java
> ===================================================================
> --- core/trunk/src/org/openjump/core/rasterimage/TiffUtilsV2.java
>  2020-09-23 16:20:40 UTC (rev 6525)
> +++ core/trunk/src/org/openjump/core/rasterimage/TiffUtilsV2.java
>  2020-09-23 16:22:46 UTC (rev 6526)
> @@ -42,13 +42,12 @@
>    // a File -> RenderedOp cache mapping to prevent recreating inputs for
> the same file
>    private static HashMap<File,GeoReferencedRaster> geoRasterCache = new
> HashMap<File,GeoReferencedRaster>();
>
> -
>    public static RenderedOp getRenderedOp(File tiffFile) throws
> IOException {
>      GeoReferencedRaster geoRaster = getGeoReferencedRaster(tiffFile);
>      RenderedOp rop;
>      try {
> -      rop = geoRaster.getImage();
> -    } catch (ReferencedImageException e) {
> +      rop = geoRaster.getRenderedOp();
> +    } catch (Exception e) {
>        // TODO: handle errors better, wrapping it in IOException here
>        //       because that's what's handled up from here
>        throw new IOException(e);
>
>
>
> _______________________________________________
> Jump-pilot-devel mailing list
> Jump-pilot-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel
>
_______________________________________________
Jump-pilot-devel mailing list
Jump-pilot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel

Reply via email to