On 10/12/2020 19:27, michael michaud wrote:
> There are two problems in GeoImage.paint when using very high level of zoom :
> - the image to display is computed with jai transformations like scaling, 
> subsampling or cropping which use float parameters : at very high levels of 
> zoom, the lower right corner of the image is not displayed at its right 
> position compared with vector data which use doubles for transformations.

we could use the vector(envelope) calculation results to scale the image. 
that'd solve the disparity. questions is though which of the two is the more 
correct one, as i understand that floating point has a higher accuracy than 
then doubles when talking about small values.

>I tried to replace jai transformations usinf floats by other transformations 
>using doubles (like jai affine transform), but it is much slower.

performancewise we might be able to switch scaling algorithms for some 
operations

>It seems that current implementation efficiency is for a large part related to 
>the use of subsample jai transformation which is way faster than other type of 
>scaling, but which use float parameters.

when we know which is more accurate (float/double) we can can streamline 
vector/image calculation and the difference would disappear

> - the second point, maybe related to the previous one is that zooming finally 
> ends with an exception :
> Caused by: java.lang.IllegalArgumentException: Crop The rectangular crop area 
> must not be outside the image.
> at javax.media.jai.JAI.createNS(JAI.java:1087)
> at javax.media.jai.JAI.create(JAI.java:973)
> at 
> com.vividsolutions.jump.workbench.imagery.geoimg.GeoImage.paint(GeoImage.java:298)

this should probably be checked beforehand. of course it makes no sense to add 
a crop if there is nothing to crop ;)


---

** [bugs:#507] GeoImage and high zoom level**

**Status:** open
**Milestone:** OJ_future
**Created:** Mon Oct 12, 2020 05:27 PM UTC by michael michaud
**Last Updated:** Mon Oct 12, 2020 05:27 PM UTC
**Owner:** nobody


There are two problems in GeoImage.paint when using very high level of zoom :
- the image to display is computed with jai transformations like scaling, 
subsampling or cropping which use float parameters : at very high levels of 
zoom, the lower right corner of the image is not displayed at its right 
position compared with vector data which use doubles for transformations. I 
tried to replace jai transformations usinf floats by other transformations 
using doubles (like jai affine transform), but it is much slower. It seems that 
current implementation efficiency is for a large part related to the use of 
subsample jai transformation which is way faster than other type of scaling, 
but which use float parameters.
- the second point, maybe related to the previous one is that zooming finally 
ends with an exception :
Caused by: java.lang.IllegalArgumentException: Crop The rectangular crop area 
must not be outside the image.
        at javax.media.jai.JAI.createNS(JAI.java:1087)
        at javax.media.jai.JAI.create(JAI.java:973)
        at 
com.vividsolutions.jump.workbench.imagery.geoimg.GeoImage.paint(GeoImage.java:298)


---

Sent from sourceforge.net because jump-pilot-devel@lists.sourceforge.net is 
subscribed to https://sourceforge.net/p/jump-pilot/bugs/

To unsubscribe from further messages, a project admin can change settings at 
https://sourceforge.net/p/jump-pilot/admin/bugs/options.  Or, if this is a 
mailing list, you can unsubscribe from the mailing list.
_______________________________________________
Jump-pilot-devel mailing list
Jump-pilot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel

Reply via email to