[JPP-Devel] OJN 1.2D: Add Image Layer
Hi, when I load a TIFF file which has a worldfile with Layer>Add Image Layer a new layer appears but nothing happens (no errormessage and no image)! Running OpenJUMPNight 1.2D with Eclipse I see the error: com.vividsolutions.jump.JUMPException: Neither geotiff tags nor valid worldfile found. This is not a valid GeoTIFF file. at com.vividsolutions.jump.workbench.imagery.geotiff.GeoTIFFImage.init(GeoTIFFImage.java:72) at com.vividsolutions.jump.workbench.imagery.geotiff.GeoTIFFImage.(GeoTIFFImage.java:56) at com.vividsolutions.jump.workbench.imagery.geotiff.GeoTIFFImageFactory.createImage(GeoTIFFImageFactory.java:53) at com.vividsolutions.jump.workbench.imagery.ImageryLayerDataset.createImage(ImageryLayerDataset.java:76) at com.vividsolutions.jump.workbench.ui.plugin.imagery.ImageFeatureCreator.createFeature(ImageFeatureCreator.java:174) at com.vividsolutions.jump.workbench.ui.plugin.imagery.ImageFeatureCreator.access$0(ImageFeatureCreator.java:159) at com.vividsolutions.jump.workbench.ui.plugin.imagery.ImageFeatureCreator$1.yield(ImageFeatureCreator.java:153) at com.vividsolutions.jump.util.CollectionUtil.collect(CollectionUtil.java:298) at com.vividsolutions.jump.workbench.ui.plugin.imagery.ImageFeatureCreator.createFeatures(ImageFeatureCreator.java:148) at com.vividsolutions.jump.workbench.ui.plugin.imagery.ImageFeatureCreator.getImages(ImageFeatureCreator.java:79) at com.vividsolutions.jump.workbench.ui.plugin.imagery.AddImageLayerPlugIn.execute(AddImageLayerPlugIn.java:34) at com.vividsolutions.jump.workbench.plugin.AbstractPlugIn$1.actionPerformed(AbstractPlugIn.java:130) at javax.swing.AbstractButton.fireActionPerformed(Unknown Source) at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source) at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source) at javax.swing.DefaultButtonModel.setPressed(Unknown Source) at javax.swing.AbstractButton.doClick(Unknown Source) at javax.swing.plaf.basic.BasicMenuItemUI.doClick(Unknown Source) at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(Unknown Source) at java.awt.Component.processMouseEvent(Unknown Source) at javax.swing.JComponent.processMouseEvent(Unknown Source) at java.awt.Component.processEvent(Unknown Source) at java.awt.Container.processEvent(Unknown Source) at java.awt.Component.dispatchEventImpl(Unknown Source) at java.awt.Container.dispatchEventImpl(Unknown Source) at java.awt.Component.dispatchEvent(Unknown Source) at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source) at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source) at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source) at java.awt.Container.dispatchEventImpl(Unknown Source) at java.awt.Window.dispatchEventImpl(Unknown Source) at java.awt.Component.dispatchEvent(Unknown Source) at java.awt.EventQueue.dispatchEvent(Unknown Source) at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.run(Unknown Source) Regards, Uwe - This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ ___ Jump-pilot-devel mailing list Jump-pilot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel
Re: [JPP-Devel] OJN 1.2D: Add Image Layer
Hi, I made a quick test with one 9996 by 9996 pixel colour image. The original is band interleaved geotiff. I converted it with gdal_translate to following formats: - png (gdal_translate -of PNG jumptest.tif jumptest.png) - jpeg (gdal_translate -of jpeg jumptest.tif jumptest.jpg) - ecw (gdal_translate -of ECW -co LARGE_OK=YES jumptest.tif jumptest.ecw) - pixel interleaved geotiff (gdal_translate -of GTiff -co interleave=pixel jumptest.tif jumptest_pixel_int.tif) I created also ESRI world file (.tfw) and copied it for jpeg and png formats as .jgw and .pgw, respectively. Results: - band interleaved tiff does not show - jpeg does not show - png does not show - pixel interleaved tiff shows OK - ecw shows OK Read error with band interleaved tiffs is quite usual, and a few weeks ago GDAL default was changed to pixel interleave. There must be another reason for problems with jpeg and png. Right click - Properties on the failed jpeg and png image layer shows this error: Javax.media.jai.util.ImagingException: All factories fail for the operation "FileLoad" Regards, -Jukka- > -Alkuperäinen viesti- > Lähettäjä: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] > Puolesta Uwe Dalluege > Lähetetty: 17. elokuuta 2007 11:48 > Vastaanottaja: Devel Jump > Aihe: [JPP-Devel] OJN 1.2D: Add Image Layer > > Hi, > > when I load a TIFF file which has a worldfile with Layer>Add > Image Layer a new layer appears but nothing happens (no > errormessage and no image)! > > Running OpenJUMPNight 1.2D with Eclipse I see the error: > > com.vividsolutions.jump.JUMPException: Neither geotiff tags > nor valid worldfile found. > This is not a valid GeoTIFF file. > at > com.vividsolutions.jump.workbench.imagery.geotiff.GeoTIFFImage > .init(GeoTIFFImage.java:72) > at > com.vividsolutions.jump.workbench.imagery.geotiff.GeoTIFFImage > .(GeoTIFFImage.java:56) > at > com.vividsolutions.jump.workbench.imagery.geotiff.GeoTIFFImage > Factory.createImage(GeoTIFFImageFactory.java:53) > at > com.vividsolutions.jump.workbench.imagery.ImageryLayerDataset. > createImage(ImageryLayerDataset.java:76) > at > com.vividsolutions.jump.workbench.ui.plugin.imagery.ImageFeatu > reCreator.createFeature(ImageFeatureCreator.java:174) > at > com.vividsolutions.jump.workbench.ui.plugin.imagery.ImageFeatu > reCreator.access$0(ImageFeatureCreator.java:159) > at > com.vividsolutions.jump.workbench.ui.plugin.imagery.ImageFeatu > reCreator$1.yield(ImageFeatureCreator.java:153) > at > com.vividsolutions.jump.util.CollectionUtil.collect(Collection > Util.java:298) > at > com.vividsolutions.jump.workbench.ui.plugin.imagery.ImageFeatu > reCreator.createFeatures(ImageFeatureCreator.java:148) > at > com.vividsolutions.jump.workbench.ui.plugin.imagery.ImageFeatu > reCreator.getImages(ImageFeatureCreator.java:79) > at > com.vividsolutions.jump.workbench.ui.plugin.imagery.AddImageLa > yerPlugIn.execute(AddImageLayerPlugIn.java:34) > at > com.vividsolutions.jump.workbench.plugin.AbstractPlugIn$1.acti > onPerformed(AbstractPlugIn.java:130) > at javax.swing.AbstractButton.fireActionPerformed(Unknown Source) > at > javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source) > at > javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source) > at javax.swing.DefaultButtonModel.setPressed(Unknown Source) > at javax.swing.AbstractButton.doClick(Unknown Source) > at javax.swing.plaf.basic.BasicMenuItemUI.doClick(Unknown Source) > at > javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(U > nknown Source) > at java.awt.Component.processMouseEvent(Unknown Source) > at javax.swing.JComponent.processMouseEvent(Unknown Source) > at java.awt.Component.processEvent(Unknown Source) > at java.awt.Container.processEvent(Unknown Source) > at java.awt.Component.dispatchEventImpl(Unknown Source) > at java.awt.Container.dispatchEventImpl(Unknown Source) > at java.awt.Component.dispatchEvent(Unknown Source) > at > java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source) > at > java.awt.LightweightDispatcher.processMouseEvent(Unknown Source) > at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source) > at java.awt.Container.dispatchEventImpl(Unknown Source) > at java.awt.Window.dispatchEventImpl(Unknown Source) > at java.awt.Component.dispatchEvent(Unknown Source) > at java.awt.EventQueue.dispatchEvent(Unknown Source) > at > java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source) > at > java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source) > at java.awt.EventDispatchThread.pumpEvents(Unknown Source) > at java.awt.EventDispatchThread.pumpEvents(Unknown Source) > at java.awt.EventDispatchThread.run(Unknown Source) > > > Regards, > > Uwe > > > -- > --- > This SF.net email is sponsored b
Re: [JPP-Devel] OJN 1.2D: Add Image Layer
mhm.. interesting... and thanx for test but normal jpgs/png without a worldfile can be displayed on my computer i tested by taking a screenshot 1440x900 and then stored the screenshot as jpg and png - non interlace - with Adobe Photoshop the only issue was, that OJ became quite slow stefan Rahkonen Jukka schrieb: > Hi, > > I made a quick test with one 9996 by 9996 pixel colour image. The original is > band interleaved geotiff. I converted it with gdal_translate to following > formats: > > - png (gdal_translate -of PNG jumptest.tif jumptest.png) > - jpeg (gdal_translate -of jpeg jumptest.tif jumptest.jpg) > - ecw (gdal_translate -of ECW -co LARGE_OK=YES jumptest.tif jumptest.ecw) > - pixel interleaved geotiff (gdal_translate -of GTiff -co interleave=pixel > jumptest.tif jumptest_pixel_int.tif) > > I created also ESRI world file (.tfw) and copied it for jpeg and png formats > as .jgw and .pgw, respectively. > > Results: > - band interleaved tiff does not show > - jpeg does not show > - png does not show > - pixel interleaved tiff shows OK > - ecw shows OK > > Read error with band interleaved tiffs is quite usual, and a few weeks ago > GDAL default was changed to pixel interleave. There must be another reason > for problems with jpeg and png. > > Right click - Properties on the failed jpeg and png image layer shows this > error: > Javax.media.jai.util.ImagingException: All factories fail for the operation > "FileLoad" > > Regards, > > -Jukka- > > > > >> -Alkuperäinen viesti- >> Lähettäjä: [EMAIL PROTECTED] >> [mailto:[EMAIL PROTECTED] >> Puolesta Uwe Dalluege >> Lähetetty: 17. elokuuta 2007 11:48 >> Vastaanottaja: Devel Jump >> Aihe: [JPP-Devel] OJN 1.2D: Add Image Layer >> >> Hi, >> >> when I load a TIFF file which has a worldfile with Layer>Add >> Image Layer a new layer appears but nothing happens (no >> errormessage and no image)! >> >> Running OpenJUMPNight 1.2D with Eclipse I see the error: >> >> com.vividsolutions.jump.JUMPException: Neither geotiff tags >> nor valid worldfile found. >> This is not a valid GeoTIFF file. >> at >> com.vividsolutions.jump.workbench.imagery.geotiff.GeoTIFFImage >> .init(GeoTIFFImage.java:72) >> at >> com.vividsolutions.jump.workbench.imagery.geotiff.GeoTIFFImage >> .(GeoTIFFImage.java:56) >> at >> com.vividsolutions.jump.workbench.imagery.geotiff.GeoTIFFImage >> Factory.createImage(GeoTIFFImageFactory.java:53) >> at >> com.vividsolutions.jump.workbench.imagery.ImageryLayerDataset. >> createImage(ImageryLayerDataset.java:76) >> at >> com.vividsolutions.jump.workbench.ui.plugin.imagery.ImageFeatu >> reCreator.createFeature(ImageFeatureCreator.java:174) >> at >> com.vividsolutions.jump.workbench.ui.plugin.imagery.ImageFeatu >> reCreator.access$0(ImageFeatureCreator.java:159) >> at >> com.vividsolutions.jump.workbench.ui.plugin.imagery.ImageFeatu >> reCreator$1.yield(ImageFeatureCreator.java:153) >> at >> com.vividsolutions.jump.util.CollectionUtil.collect(Collection >> Util.java:298) >> at >> com.vividsolutions.jump.workbench.ui.plugin.imagery.ImageFeatu >> reCreator.createFeatures(ImageFeatureCreator.java:148) >> at >> com.vividsolutions.jump.workbench.ui.plugin.imagery.ImageFeatu >> reCreator.getImages(ImageFeatureCreator.java:79) >> at >> com.vividsolutions.jump.workbench.ui.plugin.imagery.AddImageLa >> yerPlugIn.execute(AddImageLayerPlugIn.java:34) >> at >> com.vividsolutions.jump.workbench.plugin.AbstractPlugIn$1.acti >> onPerformed(AbstractPlugIn.java:130) >> at javax.swing.AbstractButton.fireActionPerformed(Unknown Source) >> at >> javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source) >> at >> javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source) >> at javax.swing.DefaultButtonModel.setPressed(Unknown Source) >> at javax.swing.AbstractButton.doClick(Unknown Source) >> at javax.swing.plaf.basic.BasicMenuItemUI.doClick(Unknown Source) >> at >> javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(U >> nknown Source) >> at java.awt.Component.processMouseEvent(Unknown Source) >> at javax.swing.JComponent.processMouseEvent(Unknown Source) >> at java.awt.Component.processEvent(Unknown Source) >> at java.awt.Container.processEvent(Unknown Source) >> at java.awt.Component.dispatchEventImpl(Unknown Source) >> at java.awt.Container.dispatchEventImpl(Unknown Source) >> at java.awt.Component.dispatchEvent(Unknown Source) >> at >> java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source) >> at >> java.awt.LightweightDispatcher.processMouseEvent(Unknown Source) >> at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source) >> at java.awt.Container.dispatchEventImpl(Unknown Source) >> at java.awt.Window.dispatchEventImpl(Unknown Source) >> at java.awt.Component.dispatchEvent(Unknown Source) >> at java.awt.EventQueue.dispatchEvent(Unknown Source) >> at >> java.awt
Re: [JPP-Devel] OJN 1.2D: Add Image Layer
btw.. if it does not load.. can it be a image size problem? because 9996x9996 px is shown by Adobe Photoshop as file with 285MB size in memory (stored as jpg: 15MB - of course depending on the image packability itself) If i try to load the file with OpenJUMP (java memory option -Xmx256M).. then it is not shown as well.. without any error message don't know how diffcult it is to obtain at least a message from jai that the file is to large. stefan Rahkonen Jukka schrieb: > Hi, > > I made a quick test with one 9996 by 9996 pixel colour image. The original is > band interleaved geotiff. I converted it with gdal_translate to following > formats: > > - png (gdal_translate -of PNG jumptest.tif jumptest.png) > - jpeg (gdal_translate -of jpeg jumptest.tif jumptest.jpg) > - ecw (gdal_translate -of ECW -co LARGE_OK=YES jumptest.tif jumptest.ecw) > - pixel interleaved geotiff (gdal_translate -of GTiff -co interleave=pixel > jumptest.tif jumptest_pixel_int.tif) > > I created also ESRI world file (.tfw) and copied it for jpeg and png formats > as .jgw and .pgw, respectively. > > Results: > - band interleaved tiff does not show > - jpeg does not show > - png does not show > - pixel interleaved tiff shows OK > - ecw shows OK > > Read error with band interleaved tiffs is quite usual, and a few weeks ago > GDAL default was changed to pixel interleave. There must be another reason > for problems with jpeg and png. > > Right click - Properties on the failed jpeg and png image layer shows this > error: > Javax.media.jai.util.ImagingException: All factories fail for the operation > "FileLoad" > > Regards, > > -Jukka- > > > > >> -Alkuperäinen viesti- >> Lähettäjä: [EMAIL PROTECTED] >> [mailto:[EMAIL PROTECTED] >> Puolesta Uwe Dalluege >> Lähetetty: 17. elokuuta 2007 11:48 >> Vastaanottaja: Devel Jump >> Aihe: [JPP-Devel] OJN 1.2D: Add Image Layer >> >> Hi, >> >> when I load a TIFF file which has a worldfile with Layer>Add >> Image Layer a new layer appears but nothing happens (no >> errormessage and no image)! >> >> Running OpenJUMPNight 1.2D with Eclipse I see the error: >> >> com.vividsolutions.jump.JUMPException: Neither geotiff tags >> nor valid worldfile found. >> This is not a valid GeoTIFF file. >> at >> com.vividsolutions.jump.workbench.imagery.geotiff.GeoTIFFImage >> .init(GeoTIFFImage.java:72) >> at >> com.vividsolutions.jump.workbench.imagery.geotiff.GeoTIFFImage >> .(GeoTIFFImage.java:56) >> at >> com.vividsolutions.jump.workbench.imagery.geotiff.GeoTIFFImage >> Factory.createImage(GeoTIFFImageFactory.java:53) >> at >> com.vividsolutions.jump.workbench.imagery.ImageryLayerDataset. >> createImage(ImageryLayerDataset.java:76) >> at >> com.vividsolutions.jump.workbench.ui.plugin.imagery.ImageFeatu >> reCreator.createFeature(ImageFeatureCreator.java:174) >> at >> com.vividsolutions.jump.workbench.ui.plugin.imagery.ImageFeatu >> reCreator.access$0(ImageFeatureCreator.java:159) >> at >> com.vividsolutions.jump.workbench.ui.plugin.imagery.ImageFeatu >> reCreator$1.yield(ImageFeatureCreator.java:153) >> at >> com.vividsolutions.jump.util.CollectionUtil.collect(Collection >> Util.java:298) >> at >> com.vividsolutions.jump.workbench.ui.plugin.imagery.ImageFeatu >> reCreator.createFeatures(ImageFeatureCreator.java:148) >> at >> com.vividsolutions.jump.workbench.ui.plugin.imagery.ImageFeatu >> reCreator.getImages(ImageFeatureCreator.java:79) >> at >> com.vividsolutions.jump.workbench.ui.plugin.imagery.AddImageLa >> yerPlugIn.execute(AddImageLayerPlugIn.java:34) >> at >> com.vividsolutions.jump.workbench.plugin.AbstractPlugIn$1.acti >> onPerformed(AbstractPlugIn.java:130) >> at javax.swing.AbstractButton.fireActionPerformed(Unknown Source) >> at >> javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source) >> at >> javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source) >> at javax.swing.DefaultButtonModel.setPressed(Unknown Source) >> at javax.swing.AbstractButton.doClick(Unknown Source) >> at javax.swing.plaf.basic.BasicMenuItemUI.doClick(Unknown Source) >> at >> javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(U >> nknown Source) >> at java.awt.Component.processMouseEvent(Unknown Source) >> at javax.swing.JComponent.processMouseEvent(Unknown Source) >> at java.awt.Component.processEvent(Unknown Source) >> at java.awt.Container.processEvent(Unknown Source) >> at java.awt.Component.dispatchEventImpl(Unknown Source) >> at java.awt.Container.dispatchEventImpl(Unknown Source) >> at java.awt.Component.dispatchEvent(Unknown Source) >> at >> java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source) >> at >> java.awt.LightweightDispatcher.processMouseEvent(Unknown Source) >> at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source) >> at java.awt.Container.dispatchEventImpl(Unknown Source) >> at java.awt.Window.dispatchEve
Re: [JPP-Devel] OJN 1.2D: Add Image Layer
Hi, It really seems to be due to the size. I made small versions (1000 by 1000 pixels) of the png and jpg images, and they do work. They also seem to accept both .tfw named world files and those named according to image format (jgw/pgw). That's good. User should get some informative warning about file exceeding the size limits, perhaps with a hint to use tiff of ecw formats instead for bigger images. By the way, those interested in trying how OpenJUMP performs with ecw can download wonderful images to play with from geotorrent.org. For example 1.8 gigabyte europe_landsat742 image covering almost whole Europe, despite half of Finland :( , works very well and consumes just few tens of megabytes of OpenJUMP memory. Image dimensions totals 141970 by 141970 pixels. There are other good images as well, and they are free for any use. -Jukka- > -Alkuperäinen viesti- > Lähettäjä: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] > Puolesta Stefan Steiniger > Lähetetty: 17. elokuuta 2007 14:34 > Vastaanottaja: List for discussion of JPP development and use. > Aihe: Re: [JPP-Devel] OJN 1.2D: Add Image Layer > > btw.. if it does not load.. > can it be a image size problem? > > because 9996x9996 px is shown by Adobe Photoshop as file with > 285MB size in memory (stored as jpg: 15MB - of course > depending on the image packability itself) > > If i try to load the file with OpenJUMP (java memory option > -Xmx256M).. > then it is not shown as well.. without any error message > > don't know how diffcult it is to obtain at least a message > from jai that the file is to large. > > > stefan > > Rahkonen Jukka schrieb: > > Hi, > > > > I made a quick test with one 9996 by 9996 pixel colour > image. The original is band interleaved geotiff. I converted > it with gdal_translate to following formats: > > > > - png (gdal_translate -of PNG jumptest.tif jumptest.png) > > - jpeg (gdal_translate -of jpeg jumptest.tif jumptest.jpg) > > - ecw (gdal_translate -of ECW -co LARGE_OK=YES jumptest.tif > jumptest.ecw) > > - pixel interleaved geotiff (gdal_translate -of GTiff -co > interleave=pixel jumptest.tif jumptest_pixel_int.tif) > > > > I created also ESRI world file (.tfw) and copied it for > jpeg and png formats as .jgw and .pgw, respectively. > > > > Results: > > - band interleaved tiff does not show > > - jpeg does not show > > - png does not show > > - pixel interleaved tiff shows OK > > - ecw shows OK > > > > Read error with band interleaved tiffs is quite usual, and > a few weeks ago GDAL default was changed to pixel interleave. > There must be another reason for problems with jpeg and png. > > > > Right click - Properties on the failed jpeg and png image > layer shows this error: > > Javax.media.jai.util.ImagingException: All factories fail > for the operation "FileLoad" > > > > Regards, > > > > -Jukka- > > > > > > > > > >> -Alkuperäinen viesti- > >> Lähettäjä: [EMAIL PROTECTED] > >> [mailto:[EMAIL PROTECTED] > >> Puolesta Uwe Dalluege > >> Lähetetty: 17. elokuuta 2007 11:48 > >> Vastaanottaja: Devel Jump > >> Aihe: [JPP-Devel] OJN 1.2D: Add Image Layer > >> > >> Hi, > >> > >> when I load a TIFF file which has a worldfile with Layer>Add > >> Image Layer a new layer appears but nothing happens (no > >> errormessage and no image)! > >> > >> Running OpenJUMPNight 1.2D with Eclipse I see the error: > >> > >> com.vividsolutions.jump.JUMPException: Neither geotiff tags > >> nor valid worldfile found. > >> This is not a valid GeoTIFF file. > >> at > >> com.vividsolutions.jump.workbench.imagery.geotiff.GeoTIFFImage > >> .init(GeoTIFFImage.java:72) > >> at > >> com.vividsolutions.jump.workbench.imagery.geotiff.GeoTIFFImage > >> .(GeoTIFFImage.java:56) > >> at > >> com.vividsolutions.jump.workbench.imagery.geotiff.GeoTIFFImage > >> Factory.createImage(GeoTIFFImageFactory.java:53) > >> at > >> com.vividsolutions.jump.workbench.imagery.ImageryLayerDataset. > >> createImage(ImageryLayerDataset.java:76) > >> at > >> com.vividsolutions.jump.workbench.ui.plugin.imagery.ImageFeatu > >> reCreator.createFeature(ImageFeatureCreator.java:174) > >> at > >> com.vividsolutions.jump.workbench.ui.plugin.imagery.ImageFeatu > >> reCreator.access$0(ImageFeatureCreator.java:159) > >> at > >> com.vividsolutions.jump.workbench.ui.plugin.imagery.ImageFeatu > >> reCreator$1.yield(ImageFeatureCreator.java:153) > >> at > >> com.vividsolutions.jump.util.CollectionUtil.collect(Collection > >> Util.java:298) > >> at > >> com.vividsolutions.jump.workbench.ui.plugin.imagery.ImageFeatu > >> reCreator.createFeatures(ImageFeatureCreator.java:148) > >> at > >> com.vividsolutions.jump.workbench.ui.plugin.imagery.ImageFeatu > >> reCreator.getImages(ImageFeatureCreator.java:79) > >> at > >> com.vividsolutions.jump.workbench.ui.plugin.imagery.AddImageLa > >> yerPlugIn.execute(AddImageLayerPlugIn.java:34) > >> at > >> com.vividsolutions.jump.workbench.plugin.A
Re: [JPP-Devel] Mouse wheel zoom
Paul, I have always found the function of mouse wheel zoom that you described very useful. It reduces the need for panninf when you zoom in on an object. The Sunburned Surveyor On 8/16/07, Larry Becker <[EMAIL PROTECTED]> wrote: > Hi Paul, > > I tried that method and didn't find it useful, but the code is still > there commented out if you want to test it yourself. > > //zoomAt(e.getPoint(), zoomFactor); //zoom to cursor > > regards, > Larry > > On 8/16/07, Paul Austin <[EMAIL PROTECTED]> wrote: > > I just thought of an interesting enhancement to the mouse wheel zoom > > functionality > > > > At the moment when you zoom it zooms in and out based on the existing > > window center. > > > > What would be useful is if you could use the mouse location as the > > center when zooming in (and maybe out). > > > > This may confuse some users so it could be done as a keyboard modifier, > > e.g. Ctrl + wheel uses the mouse location as the centre. > > > > What do people think? > > > > Paul > > > > - > > This SF.net email is sponsored by: Splunk Inc. > > Still grepping through log files to find problems? Stop. > > Now Search log events and configuration files using AJAX and a browser. > > Download your FREE copy of Splunk now >> http://get.splunk.com/ > > ___ > > Jump-pilot-devel mailing list > > Jump-pilot-devel@lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel > > > > > -- > http://amusingprogrammer.blogspot.com/ > > - > This SF.net email is sponsored by: Splunk Inc. > Still grepping through log files to find problems? Stop. > Now Search log events and configuration files using AJAX and a browser. > Download your FREE copy of Splunk now >> http://get.splunk.com/ > ___ > Jump-pilot-devel mailing list > Jump-pilot-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel > - This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ ___ Jump-pilot-devel mailing list Jump-pilot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel
Re: [JPP-Devel] OJN 1.2D: Add Image Layer
This whole issue of support for large image sizes is the reason that SkyJUMP doesn't have Image Layers yet. It seems to open up a can of worms. If you need jai to process images, IMHO you are already in (memory) trouble. Also, some formats, such as GeoTIFF are simply to complex to ever get working reliably for all variations. As with the discussions of vector formats, it all boils down to the fact that there isn't one single good (and open) file format that well supported. I think that perhaps the best way to handle image formats (and perhaps some other issues too) is to bite the bullet and add a JNI interface to gdal. I can imagine modifying the MrSID plugin (which uses JNI) to do this. I believe there are versions of gdal for most platforms. regards, Larry On 8/17/07, Rahkonen Jukka <[EMAIL PROTECTED]> wrote: > Hi, > > It really seems to be due to the size. I made small versions (1000 by 1000 > pixels) of the png and jpg images, and they do work. They also seem to > accept both .tfw named world files and those named according to image format > (jgw/pgw). That's good. > > User should get some informative warning about file exceeding the size > limits, perhaps with a hint to use tiff of ecw formats instead for bigger > images. > > By the way, those interested in trying how OpenJUMP performs with ecw can > download wonderful images to play with from geotorrent.org. For example 1.8 > gigabyte europe_landsat742 image covering almost whole Europe, despite half > of Finland :( , works very well and consumes just few tens of megabytes of > OpenJUMP memory. Image dimensions totals 141970 by 141970 pixels. There are > other good images as well, and they are free for any use. > > -Jukka- > > > > > > > -Alkuperäinen viesti- > > Lähettäjä: [EMAIL PROTECTED] > > [mailto:[EMAIL PROTECTED] > > Puolesta Stefan Steiniger > > Lähetetty: 17. elokuuta 2007 14:34 > > Vastaanottaja: List for discussion of JPP development and use. > > Aihe: Re: [JPP-Devel] OJN 1.2D: Add Image Layer > > > > btw.. if it does not load.. > > can it be a image size problem? > > > > because 9996x9996 px is shown by Adobe Photoshop as file with > > 285MB size in memory (stored as jpg: 15MB - of course > > depending on the image packability itself) > > > > If i try to load the file with OpenJUMP (java memory option > > -Xmx256M).. > > then it is not shown as well.. without any error message > > > > don't know how diffcult it is to obtain at least a message > > from jai that the file is to large. > > > > > > stefan > > > > Rahkonen Jukka schrieb: > > > Hi, > > > > > > I made a quick test with one 9996 by 9996 pixel colour > > image. The original is band interleaved geotiff. I converted > > it with gdal_translate to following formats: > > > > > > - png (gdal_translate -of PNG jumptest.tif jumptest.png) > > > - jpeg (gdal_translate -of jpeg jumptest.tif jumptest.jpg) > > > - ecw (gdal_translate -of ECW -co LARGE_OK=YES jumptest.tif > > jumptest.ecw) > > > - pixel interleaved geotiff (gdal_translate -of GTiff -co > > interleave=pixel jumptest.tif jumptest_pixel_int.tif) > > > > > > I created also ESRI world file (.tfw) and copied it for > > jpeg and png formats as .jgw and .pgw, respectively. > > > > > > Results: > > > - band interleaved tiff does not show > > > - jpeg does not show > > > - png does not show > > > - pixel interleaved tiff shows OK > > > - ecw shows OK > > > > > > Read error with band interleaved tiffs is quite usual, and > > a few weeks ago GDAL default was changed to pixel interleave. > > There must be another reason for problems with jpeg and png. > > > > > > Right click - Properties on the failed jpeg and png image > > layer shows this error: > > > Javax.media.jai.util.ImagingException: All factories fail > > for the operation "FileLoad" > > > > > > Regards, > > > > > > -Jukka- > > > > > > > > > > > > > > >> -Alkuperäinen viesti- > > >> Lähettäjä: [EMAIL PROTECTED] > > >> [mailto:[EMAIL PROTECTED] > > >> Puolesta Uwe Dalluege > > >> Lähetetty: 17. elokuuta 2007 11:48 > > >> Vastaanottaja: Devel Jump > > >> Aihe: [JPP-Devel] OJN 1.2D: Add Image Layer > > >> > > >> Hi, > > >> > > >> when I load a TIFF file which has a worldfile with Layer>Add > > >> Image Layer a new layer appears but nothing happens (no > > >> errormessage and no image)! > > >> > > >> Running OpenJUMPNight 1.2D with Eclipse I see the error: > > >> > > >> com.vividsolutions.jump.JUMPException: Neither geotiff tags > > >> nor valid worldfile found. > > >> This is not a valid GeoTIFF file. > > >> at > > >> com.vividsolutions.jump.workbench.imagery.geotiff.GeoTIFFImage > > >> .init(GeoTIFFImage.java:72) > > >> at > > >> com.vividsolutions.jump.workbench.imagery.geotiff.GeoTIFFImage > > >> .(GeoTIFFImage.java:56) > > >> at > > >> com.vividsolutions.jump.workbench.imagery.geotiff.GeoTIFFImage > > >> Factory.createImage(GeoTIFFImageFactory.java:53) > > >> at > > >> com.vividsolutions.jump.workbench.imagery.ImageryLayerDatas
Re: [JPP-Devel] OJN 1.2D: Add Image Layer
There is also another option that using a jni interface to an image library. You can always execute a command line tool which you use to create a temporary file for the resize and crop and then load that. I switched my photo web site code to do this as I was having memory and quality problems with JAI. Paul Larry Becker wrote: > This whole issue of support for large image sizes is the reason that > SkyJUMP doesn't have Image Layers yet. It seems to open up a can of > worms. If you need jai to process images, IMHO you are already in > (memory) trouble. Also, some formats, such as GeoTIFF are simply to > complex to ever get working reliably for all variations. As with the > discussions of vector formats, it all boils down to the fact that > there isn't one single good (and open) file format that well > supported. > > I think that perhaps the best way to handle image formats (and perhaps > some other issues too) is to bite the bullet and add a JNI interface > to gdal. I can imagine modifying the MrSID plugin (which uses JNI) to > do this. I believe there are versions of gdal for most platforms. > > regards, > Larry > > On 8/17/07, Rahkonen Jukka <[EMAIL PROTECTED]> wrote: > >> Hi, >> >> It really seems to be due to the size. I made small versions (1000 by 1000 >> pixels) of the png and jpg images, and they do work. They also seem to >> accept both .tfw named world files and those named according to image format >> (jgw/pgw). That's good. >> >> User should get some informative warning about file exceeding the size >> limits, perhaps with a hint to use tiff of ecw formats instead for bigger >> images. >> >> By the way, those interested in trying how OpenJUMP performs with ecw can >> download wonderful images to play with from geotorrent.org. For example 1.8 >> gigabyte europe_landsat742 image covering almost whole Europe, despite half >> of Finland :( , works very well and consumes just few tens of megabytes of >> OpenJUMP memory. Image dimensions totals 141970 by 141970 pixels. There >> are other good images as well, and they are free for any use. >> >> -Jukka- >> >> >> >> >> >> >>> -Alkuperäinen viesti- >>> Lähettäjä: [EMAIL PROTECTED] >>> [mailto:[EMAIL PROTECTED] >>> Puolesta Stefan Steiniger >>> Lähetetty: 17. elokuuta 2007 14:34 >>> Vastaanottaja: List for discussion of JPP development and use. >>> Aihe: Re: [JPP-Devel] OJN 1.2D: Add Image Layer >>> >>> btw.. if it does not load.. >>> can it be a image size problem? >>> >>> because 9996x9996 px is shown by Adobe Photoshop as file with >>> 285MB size in memory (stored as jpg: 15MB - of course >>> depending on the image packability itself) >>> >>> If i try to load the file with OpenJUMP (java memory option >>> -Xmx256M).. >>> then it is not shown as well.. without any error message >>> >>> don't know how diffcult it is to obtain at least a message >>> from jai that the file is to large. >>> >>> >>> stefan >>> >>> Rahkonen Jukka schrieb: >>> Hi, I made a quick test with one 9996 by 9996 pixel colour >>> image. The original is band interleaved geotiff. I converted >>> it with gdal_translate to following formats: >>> - png (gdal_translate -of PNG jumptest.tif jumptest.png) - jpeg (gdal_translate -of jpeg jumptest.tif jumptest.jpg) - ecw (gdal_translate -of ECW -co LARGE_OK=YES jumptest.tif >>> jumptest.ecw) >>> - pixel interleaved geotiff (gdal_translate -of GTiff -co >>> interleave=pixel jumptest.tif jumptest_pixel_int.tif) >>> I created also ESRI world file (.tfw) and copied it for >>> jpeg and png formats as .jgw and .pgw, respectively. >>> Results: - band interleaved tiff does not show - jpeg does not show - png does not show - pixel interleaved tiff shows OK - ecw shows OK Read error with band interleaved tiffs is quite usual, and >>> a few weeks ago GDAL default was changed to pixel interleave. >>> There must be another reason for problems with jpeg and png. >>> Right click - Properties on the failed jpeg and png image >>> layer shows this error: >>> Javax.media.jai.util.ImagingException: All factories fail >>> for the operation "FileLoad" >>> Regards, -Jukka- > -Alkuperäinen viesti- > Lähettäjä: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] > Puolesta Uwe Dalluege > Lähetetty: 17. elokuuta 2007 11:48 > Vastaanottaja: Devel Jump > Aihe: [JPP-Devel] OJN 1.2D: Add Image Layer > > Hi, > > when I load a TIFF file which has a worldfile with Layer>Add > Image Layer a new layer appears but nothing happens (no > errormessage and no image)! > > Running OpenJUMPNight 1.2D with Eclipse I see the error: > > com.vividsolutions.jump.JUMPException: Neither geotiff tags
Re: [JPP-Devel] Mouse wheel zoom
Now that I think of it, I guess I didn't really give the mode a chance. The ZoomAt method will zoom to any point, but then that point becomes the center of the window. In order for it to work correctly, you would have to make a ZoomTo? function that would keep the zoom point under the cursor. Larry On 8/17/07, Sunburned Surveyor <[EMAIL PROTECTED]> wrote: > Paul, > > I have always found the function of mouse wheel zoom that you > described very useful. It reduces the need for panninf when you zoom > in on an object. > > The Sunburned Surveyor > > On 8/16/07, Larry Becker <[EMAIL PROTECTED]> wrote: > > Hi Paul, > > > > I tried that method and didn't find it useful, but the code is still > > there commented out if you want to test it yourself. > > > > //zoomAt(e.getPoint(), zoomFactor); //zoom to cursor > > > > regards, > > Larry > > > > On 8/16/07, Paul Austin <[EMAIL PROTECTED]> wrote: > > > I just thought of an interesting enhancement to the mouse wheel zoom > > > functionality > > > > > > At the moment when you zoom it zooms in and out based on the existing > > > window center. > > > > > > What would be useful is if you could use the mouse location as the > > > center when zooming in (and maybe out). > > > > > > This may confuse some users so it could be done as a keyboard modifier, > > > e.g. Ctrl + wheel uses the mouse location as the centre. > > > > > > What do people think? > > > > > > Paul > > > > > > - > > > This SF.net email is sponsored by: Splunk Inc. > > > Still grepping through log files to find problems? Stop. > > > Now Search log events and configuration files using AJAX and a browser. > > > Download your FREE copy of Splunk now >> http://get.splunk.com/ > > > ___ > > > Jump-pilot-devel mailing list > > > Jump-pilot-devel@lists.sourceforge.net > > > https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel > > > > > > > > > -- > > http://amusingprogrammer.blogspot.com/ > > > > - > > This SF.net email is sponsored by: Splunk Inc. > > Still grepping through log files to find problems? Stop. > > Now Search log events and configuration files using AJAX and a browser. > > Download your FREE copy of Splunk now >> http://get.splunk.com/ > > ___ > > Jump-pilot-devel mailing list > > Jump-pilot-devel@lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel > > > > - > This SF.net email is sponsored by: Splunk Inc. > Still grepping through log files to find problems? Stop. > Now Search log events and configuration files using AJAX and a browser. > Download your FREE copy of Splunk now >> http://get.splunk.com/ > ___ > Jump-pilot-devel mailing list > Jump-pilot-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel > -- http://amusingprogrammer.blogspot.com/ - This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ ___ Jump-pilot-devel mailing list Jump-pilot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel
Re: [JPP-Devel] OJN 1.2D: Add Image Layer
Hi Paul, Now that you mention it, I was remembering incorrectly. The MrSID plugin does ues a command line tool and not JNI. This has the advantage of spawning a new process that doesn't affect the Java process memory. Larry On 8/17/07, Paul Austin <[EMAIL PROTECTED]> wrote: > There is also another option that using a jni interface to an image > library. You can always execute a command line tool which you use to > create a temporary file for the resize and crop and then load that. > > I switched my photo web site code to do this as I was having memory and > quality problems with JAI. > > Paul > > Larry Becker wrote: > > This whole issue of support for large image sizes is the reason that > > SkyJUMP doesn't have Image Layers yet. It seems to open up a can of > > worms. If you need jai to process images, IMHO you are already in > > (memory) trouble. Also, some formats, such as GeoTIFF are simply to > > complex to ever get working reliably for all variations. As with the > > discussions of vector formats, it all boils down to the fact that > > there isn't one single good (and open) file format that well > > supported. > > > > I think that perhaps the best way to handle image formats (and perhaps > > some other issues too) is to bite the bullet and add a JNI interface > > to gdal. I can imagine modifying the MrSID plugin (which uses JNI) to > > do this. I believe there are versions of gdal for most platforms. > > > > regards, > > Larry > > > > On 8/17/07, Rahkonen Jukka <[EMAIL PROTECTED]> wrote: > > > >> Hi, > >> > >> It really seems to be due to the size. I made small versions (1000 by 1000 > >> pixels) of the png and jpg images, and they do work. They also seem to > >> accept both .tfw named world files and those named according to image > >> format (jgw/pgw). That's good. > >> > >> User should get some informative warning about file exceeding the size > >> limits, perhaps with a hint to use tiff of ecw formats instead for bigger > >> images. > >> > >> By the way, those interested in trying how OpenJUMP performs with ecw can > >> download wonderful images to play with from geotorrent.org. For example > >> 1.8 gigabyte europe_landsat742 image covering almost whole Europe, despite > >> half of Finland :( , works very well and consumes just few tens of > >> megabytes of OpenJUMP memory. Image dimensions totals 141970 by 141970 > >> pixels. There are other good images as well, and they are free for any > >> use. > >> > >> -Jukka- > >> > >> > >> > >> > >> > >> > >>> -Alkuperäinen viesti- > >>> Lähettäjä: [EMAIL PROTECTED] > >>> [mailto:[EMAIL PROTECTED] > >>> Puolesta Stefan Steiniger > >>> Lähetetty: 17. elokuuta 2007 14:34 > >>> Vastaanottaja: List for discussion of JPP development and use. > >>> Aihe: Re: [JPP-Devel] OJN 1.2D: Add Image Layer > >>> > >>> btw.. if it does not load.. > >>> can it be a image size problem? > >>> > >>> because 9996x9996 px is shown by Adobe Photoshop as file with > >>> 285MB size in memory (stored as jpg: 15MB - of course > >>> depending on the image packability itself) > >>> > >>> If i try to load the file with OpenJUMP (java memory option > >>> -Xmx256M).. > >>> then it is not shown as well.. without any error message > >>> > >>> don't know how diffcult it is to obtain at least a message > >>> from jai that the file is to large. > >>> > >>> > >>> stefan > >>> > >>> Rahkonen Jukka schrieb: > >>> > Hi, > > I made a quick test with one 9996 by 9996 pixel colour > > >>> image. The original is band interleaved geotiff. I converted > >>> it with gdal_translate to following formats: > >>> > - png (gdal_translate -of PNG jumptest.tif jumptest.png) > - jpeg (gdal_translate -of jpeg jumptest.tif jumptest.jpg) > - ecw (gdal_translate -of ECW -co LARGE_OK=YES jumptest.tif > > >>> jumptest.ecw) > >>> > - pixel interleaved geotiff (gdal_translate -of GTiff -co > > >>> interleave=pixel jumptest.tif jumptest_pixel_int.tif) > >>> > I created also ESRI world file (.tfw) and copied it for > > >>> jpeg and png formats as .jgw and .pgw, respectively. > >>> > Results: > - band interleaved tiff does not show > - jpeg does not show > - png does not show > - pixel interleaved tiff shows OK > - ecw shows OK > > Read error with band interleaved tiffs is quite usual, and > > >>> a few weeks ago GDAL default was changed to pixel interleave. > >>> There must be another reason for problems with jpeg and png. > >>> > Right click - Properties on the failed jpeg and png image > > >>> layer shows this error: > >>> > Javax.media.jai.util.ImagingException: All factories fail > > >>> for the operation "FileLoad" > >>> > Regards, > > -Jukka- > > > > > > > -Alkuperäinen viesti- > > Lähettäjä: [EMAIL PROTECTED] > > [mailto:[EMAIL PROTECTED] > > Puolesta Uwe Dalluege > > Lähetetty: 17. elokuuta
Re: [JPP-Devel] Mouse wheel zoom
Does anyone know the easiest way to move the mouse pointer to the center of the map viewport. What I want to do is when you zoom using my suggested center at current mouse location on Shirt + mouse wheel that it moves the mouse to the center of the viewport. This way if you want to zoom in several levels at the same spot your mouse is always on that spot. Paul - This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ ___ Jump-pilot-devel mailing list Jump-pilot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel
Re: [JPP-Devel] Mouse wheel zoom
Hi Larry, What I wanted to do is move the cursor and the point to the center of the viewport. Paul Larry Becker wrote: > OK the code to perform the mouse wheel zoom at cursor is: > > public void mouseWheelMoved(MouseWheelEvent e) { > int nclicks = e.getWheelRotation(); //negative is up/away > try { > double zoomFactor = (nclicks > 0) > ? (1 / (Math.abs(nclicks)*WHEEL_ZOOM_IN_FACTOR)) : > (Math.abs(nclicks)*WHEEL_ZOOM_IN_FACTOR); > zoomAt(e.getPoint(), zoomFactor); //zoom to cursor > Coordinate zoomPoint = > getPanel().getViewport().toModelCoordinate(e.getPoint()); > Coordinate centre = > getPanel().getViewport().getEnvelopeInModelCoordinates().centre(); > double xDisplacement = zoomPoint.x - centre.x; > double yDisplacement = zoomPoint.y - centre.y; > Envelope oldEnvelope = > getPanel().getViewport().getEnvelopeInModelCoordinates(); > getPanel().getViewport().zoom(new Envelope(oldEnvelope.getMinX() - > xDisplacement, oldEnvelope.getMaxX() - xDisplacement, > oldEnvelope.getMinY() - yDisplacement, > oldEnvelope.getMaxY() - yDisplacement)); > //zoomAt(getPanel().getViewport().toViewPoint( //zoom to center > //getPanel().getViewport(). > //getEnvelopeInModelCoordinates().centre()), > zoomFactor); > } catch (Throwable t) { > getPanel().getContext().handleThrowable(t); > } > } > > If everyone likes this mode better (I do), I'll commit the changes to > ZoomTool. > > regards, > Larry > > On 8/17/07, Paul Austin <[EMAIL PROTECTED]> wrote: > >> Does anyone know the easiest way to move the mouse pointer to the center >> of the map viewport. What I want to do is when you zoom using my >> suggested center at current mouse location on Shirt + mouse wheel that >> it moves the mouse to the center of the viewport. This way if you want >> to zoom in several levels at the same spot your mouse is always on that >> spot. >> >> Paul >> >> - >> This SF.net email is sponsored by: Splunk Inc. >> Still grepping through log files to find problems? Stop. >> Now Search log events and configuration files using AJAX and a browser. >> Download your FREE copy of Splunk now >> http://get.splunk.com/ >> ___ >> Jump-pilot-devel mailing list >> Jump-pilot-devel@lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel >> >> > > > - This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ ___ Jump-pilot-devel mailing list Jump-pilot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel
Re: [JPP-Devel] Mouse wheel zoom
OK the code to perform the mouse wheel zoom at cursor is: public void mouseWheelMoved(MouseWheelEvent e) { int nclicks = e.getWheelRotation(); //negative is up/away try { double zoomFactor = (nclicks > 0) ? (1 / (Math.abs(nclicks)*WHEEL_ZOOM_IN_FACTOR)) : (Math.abs(nclicks)*WHEEL_ZOOM_IN_FACTOR); zoomAt(e.getPoint(), zoomFactor); //zoom to cursor Coordinate zoomPoint = getPanel().getViewport().toModelCoordinate(e.getPoint()); Coordinate centre = getPanel().getViewport().getEnvelopeInModelCoordinates().centre(); double xDisplacement = zoomPoint.x - centre.x; double yDisplacement = zoomPoint.y - centre.y; Envelope oldEnvelope = getPanel().getViewport().getEnvelopeInModelCoordinates(); getPanel().getViewport().zoom(new Envelope(oldEnvelope.getMinX() - xDisplacement, oldEnvelope.getMaxX() - xDisplacement, oldEnvelope.getMinY() - yDisplacement, oldEnvelope.getMaxY() - yDisplacement)); //zoomAt(getPanel().getViewport().toViewPoint( //zoom to center // getPanel().getViewport(). // getEnvelopeInModelCoordinates().centre()), zoomFactor); } catch (Throwable t) { getPanel().getContext().handleThrowable(t); } } If everyone likes this mode better (I do), I'll commit the changes to ZoomTool. regards, Larry On 8/17/07, Paul Austin <[EMAIL PROTECTED]> wrote: > Does anyone know the easiest way to move the mouse pointer to the center > of the map viewport. What I want to do is when you zoom using my > suggested center at current mouse location on Shirt + mouse wheel that > it moves the mouse to the center of the viewport. This way if you want > to zoom in several levels at the same spot your mouse is always on that > spot. > > Paul > > - > This SF.net email is sponsored by: Splunk Inc. > Still grepping through log files to find problems? Stop. > Now Search log events and configuration files using AJAX and a browser. > Download your FREE copy of Splunk now >> http://get.splunk.com/ > ___ > Jump-pilot-devel mailing list > Jump-pilot-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel > -- http://amusingprogrammer.blogspot.com/ - This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ ___ Jump-pilot-devel mailing list Jump-pilot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel
Re: [JPP-Devel] Mouse wheel zoom
Hmm, that seems a bit confusing to the user, especially if accidentally invoked. I've never been fond of interfaces that take control of my cursor, like jumping it to be over the default button. It might have a bad interaction with other modes for accessibility such as mouse keys. However if you want to try, I suppose you could use postEvent(). regards, Larry On 8/17/07, Paul Austin <[EMAIL PROTECTED]> wrote: > Hi Larry, > > What I wanted to do is move the cursor and the point to the center of > the viewport. > > Paul > > Larry Becker wrote: > > OK the code to perform the mouse wheel zoom at cursor is: > > > > public void mouseWheelMoved(MouseWheelEvent e) { > > int nclicks = e.getWheelRotation(); //negative is up/away > > try { > > double zoomFactor = (nclicks > 0) > > ? (1 / (Math.abs(nclicks)*WHEEL_ZOOM_IN_FACTOR)) : > > (Math.abs(nclicks)*WHEEL_ZOOM_IN_FACTOR); > > zoomAt(e.getPoint(), zoomFactor); //zoom to cursor > > Coordinate zoomPoint = > > getPanel().getViewport().toModelCoordinate(e.getPoint()); > > Coordinate centre = > > getPanel().getViewport().getEnvelopeInModelCoordinates().centre(); > > double xDisplacement = zoomPoint.x - centre.x; > > double yDisplacement = zoomPoint.y - centre.y; > > Envelope oldEnvelope = > > getPanel().getViewport().getEnvelopeInModelCoordinates(); > > getPanel().getViewport().zoom(new > > Envelope(oldEnvelope.getMinX() - > > xDisplacement, oldEnvelope.getMaxX() - xDisplacement, > > oldEnvelope.getMinY() - yDisplacement, > > oldEnvelope.getMaxY() - yDisplacement)); > > //zoomAt(getPanel().getViewport().toViewPoint( //zoom to center > > //getPanel().getViewport(). > > //getEnvelopeInModelCoordinates().centre()), > > zoomFactor); > > } catch (Throwable t) { > > getPanel().getContext().handleThrowable(t); > > } > > } > > > > If everyone likes this mode better (I do), I'll commit the changes to > > ZoomTool. > > > > regards, > > Larry > > > > On 8/17/07, Paul Austin <[EMAIL PROTECTED]> wrote: > > > >> Does anyone know the easiest way to move the mouse pointer to the center > >> of the map viewport. What I want to do is when you zoom using my > >> suggested center at current mouse location on Shirt + mouse wheel that > >> it moves the mouse to the center of the viewport. This way if you want > >> to zoom in several levels at the same spot your mouse is always on that > >> spot. > >> > >> Paul > >> > >> - > >> This SF.net email is sponsored by: Splunk Inc. > >> Still grepping through log files to find problems? Stop. > >> Now Search log events and configuration files using AJAX and a browser. > >> Download your FREE copy of Splunk now >> http://get.splunk.com/ > >> ___ > >> Jump-pilot-devel mailing list > >> Jump-pilot-devel@lists.sourceforge.net > >> https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel > >> > >> > > > > > > > > > - > This SF.net email is sponsored by: Splunk Inc. > Still grepping through log files to find problems? Stop. > Now Search log events and configuration files using AJAX and a browser. > Download your FREE copy of Splunk now >> http://get.splunk.com/ > ___ > Jump-pilot-devel mailing list > Jump-pilot-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel > -- http://amusingprogrammer.blogspot.com/ - This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ ___ Jump-pilot-devel mailing list Jump-pilot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel
Re: [JPP-Devel] Mouse wheel zoom
Hi Larry, Normally I hate people messing with my mouse pointer but in this case I would find it useful. Here are the three options for mouse wheel zooming that I see. 1. Zoom in and out of the current viewport center (not that useful in my view). 2. Zoom in and out at the current mouse location (google maps does this) (default option) 3. Zoom in and out of the current mouse location but center the viewport and mouse pointer at that location (advanced option while holding down the shift key) Another thing I'd like to see is an integrated pan and zoom mode, where if you double click it zooms but when you drag it pans, much like google maps does. This could be integrated into the current pan tool. I'd still like the BBOX zoom functionality from the zoom tool. Paul - This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ ___ Jump-pilot-devel mailing list Jump-pilot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel
Re: [JPP-Devel] Mouse wheel zoom
Hi Paul, Some of the functionality you are talking about is already present in my new ZoomRealTime tool, which pans and zooms continuously in real time. Perhaps I should port it over (it just needs internationalization) before doing any more tweaks to Mouse Wheel Zoom, which I thought was pretty cool when I first got it working, but now seems a little tired in comparison with ZoomRealTime. I do agree that your #2 is more useful, now that I have tried it. I'll wait for more feedback from others before committing the change. regards, Larry On 8/17/07, Paul Austin <[EMAIL PROTECTED]> wrote: > Hi Larry, > > Normally I hate people messing with my mouse pointer but in this case I > would find it useful. > > Here are the three options for mouse wheel zooming that I see. > >1. Zoom in and out of the current viewport center (not that useful in > my view). >2. Zoom in and out at the current mouse location (google maps does > this) (default option) >3. Zoom in and out of the current mouse location but center the > viewport and mouse pointer at that location (advanced option while > holding down the shift key) > > Another thing I'd like to see is an integrated pan and zoom mode, where > if you double click it zooms but when you drag it pans, much like google > maps does. This could be integrated into the current pan tool. I'd still > like the BBOX zoom functionality from the zoom tool. > > Paul > > - > This SF.net email is sponsored by: Splunk Inc. > Still grepping through log files to find problems? Stop. > Now Search log events and configuration files using AJAX and a browser. > Download your FREE copy of Splunk now >> http://get.splunk.com/ > ___ > Jump-pilot-devel mailing list > Jump-pilot-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel > -- http://amusingprogrammer.blogspot.com/ - This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ ___ Jump-pilot-devel mailing list Jump-pilot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel
[JPP-Devel] Zoom Realtime tool
OK, I have added a Zoom Realtime tool to the toolbar. This tool uses image stretching to simulate the zoom before it occurs for an accurate preview. Left click and drag down to zoom in, or up to zoom out. Moving side to side will position the image. Alternatively, right click and drag to the right to zoom in, or left to zoom out while moving up and down to drag the image. Precise zooming is possible using a combination of these methods. You can also double-click to center. Quasimode access to the regular zoom and pan tools is available as usual. To avoid confusion, mouse wheel zooming is not active for this tool. regards, Larry Becker -- http://amusingprogrammer.blogspot.com/ - This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ ___ Jump-pilot-devel mailing list Jump-pilot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel
Re: [JPP-Devel] Mouse wheel zoom
Well, I guess I'll commit the change on the strength or Paul and Sunburn's recommendation. We can always back out the change if we don't like it. Larry On 8/17/07, Larry Becker <[EMAIL PROTECTED]> wrote: > Hi Paul, > > Some of the functionality you are talking about is already present > in my new ZoomRealTime tool, which pans and zooms continuously in real > time. Perhaps I should port it over (it just needs > internationalization) before doing any more tweaks to Mouse Wheel > Zoom, which I thought was pretty cool when I first got it working, but > now seems a little tired in comparison with ZoomRealTime. > > I do agree that your #2 is more useful, now that I have tried it. > I'll wait for more feedback from others before committing the change. > > regards, > Larry > > > > On 8/17/07, Paul Austin <[EMAIL PROTECTED]> wrote: > > Hi Larry, > > > > Normally I hate people messing with my mouse pointer but in this case I > > would find it useful. > > > > Here are the three options for mouse wheel zooming that I see. > > > >1. Zoom in and out of the current viewport center (not that useful in > > my view). > >2. Zoom in and out at the current mouse location (google maps does > > this) (default option) > >3. Zoom in and out of the current mouse location but center the > > viewport and mouse pointer at that location (advanced option while > > holding down the shift key) > > > > Another thing I'd like to see is an integrated pan and zoom mode, where > > if you double click it zooms but when you drag it pans, much like google > > maps does. This could be integrated into the current pan tool. I'd still > > like the BBOX zoom functionality from the zoom tool. > > > > Paul > > > > - > > This SF.net email is sponsored by: Splunk Inc. > > Still grepping through log files to find problems? Stop. > > Now Search log events and configuration files using AJAX and a browser. > > Download your FREE copy of Splunk now >> http://get.splunk.com/ > > ___ > > Jump-pilot-devel mailing list > > Jump-pilot-devel@lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel > > > > > -- > http://amusingprogrammer.blogspot.com/ > -- http://amusingprogrammer.blogspot.com/ - This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ ___ Jump-pilot-devel mailing list Jump-pilot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel
Re: [JPP-Devel] Mouse wheel zoom
Larry, Before you commit, can you replace duplicate method calls such as getPanel().getViewport() with a local variable and make the method call once. There are two reasons for this. 1. There is less code to read on each line which makes working out what is going on easier. 2. When debuging if you follow a one method call per line rule it makes stepping into a method easier you don't have to go up and down into each method call. Cheers, Paul Larry Becker wrote: > Well, I guess I'll commit the change on the strength or Paul and > Sunburn's recommendation. We can always back out the change if we > don't like it. > > Larry > > On 8/17/07, Larry Becker <[EMAIL PROTECTED]> wrote: > >> Hi Paul, >> >> Some of the functionality you are talking about is already present >> in my new ZoomRealTime tool, which pans and zooms continuously in real >> time. Perhaps I should port it over (it just needs >> internationalization) before doing any more tweaks to Mouse Wheel >> Zoom, which I thought was pretty cool when I first got it working, but >> now seems a little tired in comparison with ZoomRealTime. >> >> I do agree that your #2 is more useful, now that I have tried it. >> I'll wait for more feedback from others before committing the change. >> >> regards, >> Larry >> >> >> >> On 8/17/07, Paul Austin <[EMAIL PROTECTED]> wrote: >> >>> Hi Larry, >>> >>> Normally I hate people messing with my mouse pointer but in this case I >>> would find it useful. >>> >>> Here are the three options for mouse wheel zooming that I see. >>> >>>1. Zoom in and out of the current viewport center (not that useful in >>> my view). >>>2. Zoom in and out at the current mouse location (google maps does >>> this) (default option) >>>3. Zoom in and out of the current mouse location but center the >>> viewport and mouse pointer at that location (advanced option while >>> holding down the shift key) >>> >>> Another thing I'd like to see is an integrated pan and zoom mode, where >>> if you double click it zooms but when you drag it pans, much like google >>> maps does. This could be integrated into the current pan tool. I'd still >>> like the BBOX zoom functionality from the zoom tool. >>> >>> Paul >>> >>> - >>> This SF.net email is sponsored by: Splunk Inc. >>> Still grepping through log files to find problems? Stop. >>> Now Search log events and configuration files using AJAX and a browser. >>> Download your FREE copy of Splunk now >> http://get.splunk.com/ >>> ___ >>> Jump-pilot-devel mailing list >>> Jump-pilot-devel@lists.sourceforge.net >>> https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel >>> >>> >> -- >> http://amusingprogrammer.blogspot.com/ >> >> > > > - This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ ___ Jump-pilot-devel mailing list Jump-pilot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel
Re: [JPP-Devel] Mouse wheel zoom
Those duplicate method calls are mostly cut and pasted from PanTool code. As you might have noticed, JUMP code tends not to create many variables. With threading, there is actually some justification for this. I've gotten used to it over the years and don't really notice it much anymore. I've quit fighting it anyway, but I'll make an effort to have more readable code in the future. regards, Larry On 8/17/07, Paul Austin <[EMAIL PROTECTED]> wrote: > Larry, > > Before you commit, can you replace duplicate method calls such as > getPanel().getViewport() with a local variable and make the method call > once. There are two reasons for this. > > 1. There is less code to read on each line which makes working out what > is going on easier. > 2. When debuging if you follow a one method call per line rule it makes > stepping into a method easier you don't have to go up and down into each > method call. > > Cheers, > Paul > > Larry Becker wrote: > > Well, I guess I'll commit the change on the strength or Paul and > > Sunburn's recommendation. We can always back out the change if we > > don't like it. > > > > Larry > > > > On 8/17/07, Larry Becker <[EMAIL PROTECTED]> wrote: > > > >> Hi Paul, > >> > >> Some of the functionality you are talking about is already present > >> in my new ZoomRealTime tool, which pans and zooms continuously in real > >> time. Perhaps I should port it over (it just needs > >> internationalization) before doing any more tweaks to Mouse Wheel > >> Zoom, which I thought was pretty cool when I first got it working, but > >> now seems a little tired in comparison with ZoomRealTime. > >> > >> I do agree that your #2 is more useful, now that I have tried it. > >> I'll wait for more feedback from others before committing the change. > >> > >> regards, > >> Larry > >> > >> > >> > >> On 8/17/07, Paul Austin <[EMAIL PROTECTED]> wrote: > >> > >>> Hi Larry, > >>> > >>> Normally I hate people messing with my mouse pointer but in this case I > >>> would find it useful. > >>> > >>> Here are the three options for mouse wheel zooming that I see. > >>> > >>>1. Zoom in and out of the current viewport center (not that useful in > >>> my view). > >>>2. Zoom in and out at the current mouse location (google maps does > >>> this) (default option) > >>>3. Zoom in and out of the current mouse location but center the > >>> viewport and mouse pointer at that location (advanced option while > >>> holding down the shift key) > >>> > >>> Another thing I'd like to see is an integrated pan and zoom mode, where > >>> if you double click it zooms but when you drag it pans, much like google > >>> maps does. This could be integrated into the current pan tool. I'd still > >>> like the BBOX zoom functionality from the zoom tool. > >>> > >>> Paul > >>> > >>> - > >>> This SF.net email is sponsored by: Splunk Inc. > >>> Still grepping through log files to find problems? Stop. > >>> Now Search log events and configuration files using AJAX and a browser. > >>> Download your FREE copy of Splunk now >> http://get.splunk.com/ > >>> ___ > >>> Jump-pilot-devel mailing list > >>> Jump-pilot-devel@lists.sourceforge.net > >>> https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel > >>> > >>> > >> -- > >> http://amusingprogrammer.blogspot.com/ > >> > >> > > > > > > > > > - > This SF.net email is sponsored by: Splunk Inc. > Still grepping through log files to find problems? Stop. > Now Search log events and configuration files using AJAX and a browser. > Download your FREE copy of Splunk now >> http://get.splunk.com/ > ___ > Jump-pilot-devel mailing list > Jump-pilot-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel > -- http://amusingprogrammer.blogspot.com/ - This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ ___ Jump-pilot-devel mailing list Jump-pilot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel