hey Mike, questions inline

On 22.09.2020 16:56, jump-pilot-svn--- via Jump-pilot-devel wrote:
> Revision: 6517
>           http://sourceforge.net/p/jump-pilot/code/6517
> Author:   michaudm
> Date:     2020-09-22 14:56:54 +0000 (Tue, 22 Sep 2020)
> Log Message:
> -----------
> Do not use RasterPainter, inherit from GeoImage and use superclass paint 
> method instead (avoid redundant and error-prone code)
>
> Modified Paths:
> --------------
>     
> core/trunk/src/com/vividsolutions/jump/workbench/imagery/geotiff/GeoReferencedRaster.java
>     
> core/trunk/src/com/vividsolutions/jump/workbench/imagery/geotiff/GeoTIFFImage.java
>     
> core/trunk/src/com/vividsolutions/jump/workbench/imagery/geotiff/RasterPainter.java
>
> Modified: 
> core/trunk/src/com/vividsolutions/jump/workbench/imagery/geotiff/GeoReferencedRaster.java
>SNIP
> @@ -217,9 +217,19 @@
>
>    void setEnvelope()
>    {
> +      //Coordinate coorRaster_imageLB = new Coordinate(
> +      //    coorRasterTiff_tiepointLT.x, src.getHeight(), 0);
> +      //Coordinate coorRaster_imageRT = new Coordinate(src.getWidth(), 0, 0);
> +      // Get the image coordinate of the bottom left corner of the bottom 
> left pixel
> +      // from the image coordinate of the center of the bottom left pixel
>        Coordinate coorRaster_imageLB = new Coordinate(
> -          coorRasterTiff_tiepointLT.x, src.getHeight(), 0);
> -      Coordinate coorRaster_imageRT = new Coordinate(src.getWidth(), 0, 0);
> +              coorRasterTiff_tiepointLT.x-0.5,
> +              src.getHeight()-0.5);
> +      // Get the image coordinate of the top right corner of the top right 
> pixel
> +      // from the image coordinate of the center of the top right pixel
> +      Coordinate coorRaster_imageRT = new Coordinate(
> +            src.getWidth()-0.5,
> +            -0.5);
>        Coordinate coorModel_imageLB = rasterToModelSpace(coorRaster_imageLB);
>        Coordinate coorModel_imageRT = rasterToModelSpace(coorRaster_imageRT);

what does this change do? seems you didn't mention it in the commit message

>
> Modified: 
> core/trunk/src/com/vividsolutions/jump/workbench/imagery/geotiff/GeoTIFFImage.java
> ===================================================================
> --- 
> core/trunk/src/com/vividsolutions/jump/workbench/imagery/geotiff/GeoTIFFImage.java
>         2020-09-22 12:06:16 UTC (rev 6516)
> +++ 
> core/trunk/src/com/vividsolutions/jump/workbench/imagery/geotiff/GeoTIFFImage.java
>         2020-09-22 14:56:54 UTC (rev 6517)
> @@ -36,16 +36,18 @@
>  import com.vividsolutions.jump.feature.Feature;
>  import com.vividsolutions.jump.workbench.imagery.ReferencedImage;
>  import com.vividsolutions.jump.workbench.imagery.ReferencedImageException;
> +import com.vividsolutions.jump.workbench.imagery.geoimg.GeoImage;
>  import com.vividsolutions.jump.workbench.ui.Viewport;
>
>  /**
>   * legacy GeoTIFF reader
>   */
> -public class GeoTIFFImage implements ReferencedImage {
> +public class GeoTIFFImage extends GeoImage implements ReferencedImage  {
>    private GeoTIFFRaster gtr;
> -  private RasterPainter rasterPainter;
> +  //private RasterPainter rasterPainter;
>
>    public GeoTIFFImage(String location) throws JUMPException {
SNIP

seems your doing a lot of work on the GeoTIFF Plus driver. does the XTIFF JAI 
reader work well for you? shouldn't we strive to move the readers strengths 
into the  geoimg framework? actually i wrote geoimg using the geotiff driver as 
starting point, that's why they're so similar.

..ede


_______________________________________________
Jump-pilot-devel mailing list
Jump-pilot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel

Reply via email to