|
View:
New views
14 Messages
—
Rating Filter:
Alert me
|
|
|
Rendering rasters without JAIHello, I've been trying to get my geotools project to compile and run
on my mac and everything seems to work OK except for the when I try to render rasters, as there is very limited JAI support for the mac (no native library components). Now UDig seems to do just fine, so there's obviously a workaround. I am using JMapPane as the basis of my code, and that's where all the rendering happens. Does that mean I have to dig into that code and rework all the JAI calls, or is there a quicker workaround? Thanx gaby -- ************************************************************************ ****** ** Anyone who has the power to make you believe absurdities has ** ** the power to make you commit injustices - Voltaire (1767) ** ************************************************************************ ****** ------------------------------------------------------------------------- This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use priority code J8TL2D2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone _______________________________________________ Geotools-gt2-users mailing list Geotools-gt2-users@... https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users |
|
|
Re: Rendering rasters without JAII think you can install JAI and ImageIO into your mac JRE.
Reading the udig documentation it looks like uDig is making do with what is included with macosx; remember that uDig is shipping with an old version of geotools prior to all of Simone's nice work. Here are the udig docs: - http://udig.refractions.net/confluence/display/ADMIN/04+Java+Runtime+Environment#04JavaRuntimeEnvironment-MacOSX I do remember we used to take a liunux download; and stuff the jars manually into the macosx JRE; I am under the impression there are installers to do it for you now... here is a really old set of instructions to that effect. - http://docs.codehaus.org/display/GEOT/1+Java+Install - http://docs.codehaus.org/display/GEOTOOLS/6+Can+Geotools2+be+used+on+Mac+OS+X I no several mac osx develoeprs (Jesse, Justin etc...) but so I have not managed to get a good set of install instructions out of them; Jesse *is* working on a uDig installer that will update your JRE right now; so perhaps contacting him and asking to help him test will be the easiest approach. Jody Gabriella Turek wrote: > Hello, I've been trying to get my geotools project to compile and run > on my mac and > everything seems to work OK except for the when I try to render > rasters, as there is very limited > JAI support for the mac (no native library components). Now UDig > seems to do just fine, so > there's obviously a workaround. I am using JMapPane as the basis of > my code, and that's where > all the rendering happens. Does that mean I have to dig into that > code and rework all the JAI calls, > or is there a quicker workaround? > Thanx > gaby > ------------------------------------------------------------------------- This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use priority code J8TL2D2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone _______________________________________________ Geotools-gt2-users mailing list Geotools-gt2-users@... https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users |
|
|
Re: Rendering rasters without JAIHi Jody, the problem is not installing JAI, I have done that. The
problem is that it's a partial install, ie you can install the jars, but not the OS dependent libraries which do not exist for Mac OS X. Which means that you're doing fine as long as you use methods that do not depend on those libraries, but you're sunk if you do (we had the same problem with a project at my previous job). Gaby On 10/05/2008, at 5:04 PM, Jody Garnett wrote: > I think you can install JAI and ImageIO into your mac JRE. > > Reading the udig documentation it looks like uDig is making do with > what is included with macosx; remember that uDig is shipping with > an old version of geotools prior to all of Simone's nice work. > > Here are the udig docs: > - http://udig.refractions.net/confluence/display/ADMIN/04+Java > +Runtime+Environment#04JavaRuntimeEnvironment-MacOSX > > I do remember we used to take a liunux download; and stuff the jars > manually into the macosx JRE; I am under the impression there are > installers to do it for you now... here is a really old set of > instructions to that effect. > - http://docs.codehaus.org/display/GEOT/1+Java+Install > - http://docs.codehaus.org/display/GEOTOOLS/6+Can+Geotools2+be+used > +on+Mac+OS+X > > I no several mac osx develoeprs (Jesse, Justin etc...) but so I > have not managed to get a good set of install instructions out of > them; Jesse *is* working on a uDig installer that will update your > JRE right now; so perhaps contacting him and asking to help him > test will be the easiest approach. > > Jody > > Gabriella Turek wrote: >> Hello, I've been trying to get my geotools project to compile and run >> on my mac and >> everything seems to work OK except for the when I try to render >> rasters, as there is very limited >> JAI support for the mac (no native library components). Now UDig >> seems to do just fine, so >> there's obviously a workaround. I am using JMapPane as the basis of >> my code, and that's where >> all the rendering happens. Does that mean I have to dig into that >> code and rework all the JAI calls, >> or is there a quicker workaround? >> Thanx >> gaby >> > ------------------------------------------------------------------------- This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use priority code J8TL2D2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone _______________________________________________ Geotools-gt2-users mailing list Geotools-gt2-users@... https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users |
|
|
Re: Rendering rasters without JAIGabriella Turek ha scritto:
> Hi Jody, the problem is not installing JAI, I have done that. The > problem is that it's a partial install, ie you can install the jars, > but not the OS > dependent libraries which do not exist for Mac OS X. Which means that > you're doing fine as long as you use methods that do not > depend on those libraries, but you're sunk if you do (we had the same > problem with a project at my previous job). I'm not aware of any conscious decision to make gt2 dependent on any native method of JAI. So, if you can report back what's going wrong, we'd like to hear. GeoServer is exercising most of the coverage libraries and we do ship only with the pure java part of JAI, installing the native one is optional. Yet, I don't remember significant complaints about lack of functionality. It's slower of course, but should work fine anyways. So let us know what's breaking in your case Cheers Andrea ------------------------------------------------------------------------- This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use priority code J8TL2D2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone _______________________________________________ Geotools-gt2-users mailing list Geotools-gt2-users@... https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users |
|
|
Re: Rendering rasters without JAIHi Gabriella,
Unless you have an old Mac you shouldn't need to install JAI or ImageIO. They come pre-installed as part of the OS (I'm running 10.4 on a macbook and it has both). The jars should be in /System/Library/Java/Extensions. http://developer.apple.com/releasenotes/Java/index.html#//apple_ref/doc/uid/TP30000872-TP30000425 The only JAI prob I've had with Geotools on the Mac was getting nonsense values from convolution when using anything other than a minimal kernel size. I talked about that in a recent thread. And the problem was actually fixed by turning native lib support *off* like this: Properties p = new Properties(System.getProperties()); if (p.getProperty("os.name").compareToIgnoreCase("mac os x") == 0) { p.put("com.sun.media.jai.disableMediaLib", "true"); System.setProperties(p); } Michael ------------------------------------------------------------------------- This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use priority code J8TL2D2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone _______________________________________________ Geotools-gt2-users mailing list Geotools-gt2-users@... https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users |
|
|
Re: Rendering rasters without JAIHum, here's the error I get when I try to read a geo referenced jpg
Exception in thread "AWT-EventQueue-0" java.lang.IllegalArgumentException: ImageRead: No OperationDescriptor is registered in the current operation registry under this name. at javax.media.jai.JAI.createNS(JAI.java:1074) at javax.media.jai.JAI.create(JAI.java:977) at org.geotools.gce.image.WorldImageReader.read (WorldImageReader.java:451) at nz.co.niwa.geotools.GeoToolsMapPane.loadGeoRefencedFile (GeoToolsMapPane.java:126) at nz.co.niwa.geotools.GeoToolsMapPane.actionPerformed (GeoToolsMapPane.java:445) at javax.swing.AbstractButton.fireActionPerformed (AbstractButton.java:1882) at javax.swing.AbstractButton$Handler.actionPerformed (AbstractButton.java:2202) at javax.swing.DefaultButtonModel.fireActionPerformed (DefaultButtonModel.java:420) at javax.swing.DefaultButtonModel.setPressed (DefaultButtonModel.java:258) at javax.swing.AbstractButton.doClick(AbstractButton.java:334) at javax.swing.plaf.basic.BasicMenuItemUI.doClick (BasicMenuItemUI.java:1051) at javax.swing.plaf.basic.BasicMenuItemUI $Handler.mouseReleased(BasicMenuItemUI.java:1092) at java.awt.Component.processMouseEvent(Component.java:5583) at javax.swing.JComponent.processMouseEvent(JComponent.java: 3135) at java.awt.Component.processEvent(Component.java:5348) at java.awt.Container.processEvent(Container.java:2010) at java.awt.Component.dispatchEventImpl(Component.java:4050) at java.awt.Container.dispatchEventImpl(Container.java:2068) at java.awt.Component.dispatchEvent(Component.java:3885) at java.awt.LightweightDispatcher.retargetMouseEvent (Container.java:4256) at java.awt.LightweightDispatcher.processMouseEvent (Container.java:3936) at java.awt.LightweightDispatcher.dispatchEvent (Container.java:3866) at java.awt.Container.dispatchEventImpl(Container.java:2054) at java.awt.Window.dispatchEventImpl(Window.java:1791) at java.awt.Component.dispatchEvent(Component.java:3885) at java.awt.EventQueue.dispatchEvent(EventQueue.java:463) at java.awt.EventDispatchThread.pumpOneEventForHierarchy (EventDispatchThread.java:269) at java.awt.EventDispatchThread.pumpEventsForHierarchy (EventDispatchThread.java:190) at java.awt.EventDispatchThread.pumpEvents (EventDispatchThread.java:184) at java.awt.EventDispatchThread.pumpEvents (EventDispatchThread.java:176) at java.awt.EventDispatchThread.run(EventDispatchThread.java: 110) Perhaps I am misinterpreting the error message, but I did not get this on my linux box Gaby -- ************************************************************************ ** ** Anyone who has the power to make you believe absurdities has ** ** the power to make you commit injustices - Voltaire (1767) ** ************************************************************************ * ------------------------------------------------------------------------- This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use priority code J8TL2D2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone _______________________________________________ Geotools-gt2-users mailing list Geotools-gt2-users@... https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users |
|
|
Re: Rendering rasters without JAIGabriella Turek ha scritto:
> Hum, here's the error I get when I try to read a geo referenced jpg > > Exception in thread "AWT-EventQueue-0" > java.lang.IllegalArgumentException: ImageRead: No OperationDescriptor is > registered in the current operation registry under this name. > at javax.media.jai.JAI.createNS(JAI.java:1074) > at javax.media.jai.JAI.create(JAI.java:977) This is happening because you lack the "JAI Image I/O library". GeoTools needs both, JAI and the ImageIO extension: https://jai-imageio.dev.java.net/ Cheers Andrea ------------------------------------------------------------------------- This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use priority code J8TL2D2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone _______________________________________________ Geotools-gt2-users mailing list Geotools-gt2-users@... https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users |
|
|
Re: Rendering rasters without JAIYes. Wierd - my machine is a couple of years old (it had OS 10.4.4 I
think when I got it, since patched to 10.4.8) but I didn't have to install any JAI stuff. Sorry if I gave you misleading info. Out of interest what version of Mac OS are you running Gabriella ? Michael On Sat, May 10, 2008 at 10:42 PM, Andrea Aime <aaime@...> wrote: > Gabriella Turek ha scritto: >> >> Hum, here's the error I get when I try to read a geo referenced jpg >> >> Exception in thread "AWT-EventQueue-0" java.lang.IllegalArgumentException: >> ImageRead: No OperationDescriptor is registered in the current operation >> registry under this name. >> at javax.media.jai.JAI.createNS(JAI.java:1074) >> at javax.media.jai.JAI.create(JAI.java:977) > > This is happening because you lack the "JAI Image I/O library". GeoTools > needs both, JAI and the ImageIO extension: https://jai-imageio.dev.java.net/ > > Cheers > Andrea > ------------------------------------------------------------------------- This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use priority code J8TL2D2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone _______________________________________________ Geotools-gt2-users mailing list Geotools-gt2-users@... https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users |
|
|
Re: Rendering rasters without JAIOoops, you're right I did not have jai-image-io installed. But here's
the funny thing: I downloaded it (the linux version, I suppose it doesn't matter) and installed it in /System/Library/Java/Extensions but I still get the same error message. I then looked at my classpath and I remember having to add the other jai jar files expressly to it to make my demo work (except for this error). So I also added the jai-imageio.jar file expressly to the classpath, and I still get the error. I am running 10.4.11 in my PPC powerbook, java version 1.5.0_13 gaby -- ************************************************************************ ******* ** Anyone who has the power to make you believe absurdities has ** ** the power to make you commit injustices - Voltaire (1767) ** ************************************************************************ ******* ------------------------------------------------------------------------- This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use priority code J8TL2D2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone _______________________________________________ Geotools-gt2-users mailing list Geotools-gt2-users@... https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users |
|
|
Re: Rendering rasters without JAIHi folks,
Regarding this ImageIO / Mac problem - Gabriella and I chatted a bit further about it off the list. The error comes from a call in WorldImageReader.java: JAI.create("ImageRead"... to load the coverage raster from file. The problem is that the ImageReadDescriptor class isn't in Apple's version of ImageIO. I think on other platforms it is part of the native lib stuff (correct me if I'm wrong) and on the Mac there are only the pure Java components of ImageIO. But a bit of testing showed that Gabriella can read her jpeg file successfully using ImageIO functions directly. So would it cause any problems if that were done in the WorldImageReader class and the analagous code in the WorldImageWriter class ? Michael On Sun, May 11, 2008 at 9:47 AM, Gabriella Turek <tetoroa@...> wrote: > Ooops, you're right I did not have jai-image-io installed. But here's the > funny thing: > I downloaded it (the linux version, I suppose it doesn't matter) and > installed it in /System/Library/Java/Extensions but I still get the same > error message. > I then looked at my classpath and I remember having to add the other jai jar > files expressly to it > to make my demo work (except for this error). So I also added the > jai-imageio.jar file expressly to the classpath, and I still get the error. > I am running 10.4.11 in my PPC powerbook, java version 1.5.0_13 > gaby > > -- > ******************************************************************************* > ** Anyone who has the power to make you believe absurdities has ** > ** the power to make you commit injustices - Voltaire (1767) > ** > ******************************************************************************* > > > > > ------------------------------------------------------------------------- This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use priority code J8TL2D2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone _______________________________________________ Geotools-gt2-users mailing list Geotools-gt2-users@... https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users |
|
|
Re: Rendering rasters without JAIHi there.
I'm a mac developer for the gvSIG project, which used to install jai_imageio.jar as discussed in this thread (that is, as extracted from some other platform's distribution). But recenty we found serious side effects: java applets cause mozilla-based browsers to crash. If you don't put the jar in the Extensions directory but use it in the classpath when needed, you will avoid those problems. For more details, http://runas.cap.gva.es/pipermail/gvsig_internacional/2008-March/001546.html Regards. |
|
|
Re: Re ndering rasters without JAISuper - many thanks for this info
Michael On 6/19/08, H.Mijail <hmijail@...> wrote: > > Hi there. > > I'm a mac developer for the gvSIG project, which used to install > jai_imageio.jar as discussed in this thread (that is, as extracted from > some other platform's distribution). But recenty we found serious side > effects: java applets cause mozilla-based browsers to crash. > > If you don't put the jar in the Extensions directory but use it in the > classpath when needed, you will avoid those problems. > > For more details, > http://runas.cap.gva.es/pipermail/gvsig_internacional/2008-March/001546.html > > Regards. > -- ------------------------------------------------------------------------- Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://sourceforge.net/services/buy/index.php _______________________________________________ Geotools-gt2-users mailing list Geotools-gt2-users@... https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users |
|
|
Re: Rendering rasters without JAIHi
Sorry to dig up an old thread but I'm getting this problem on both windows and a linux. I'm deploying with maven and have the pure java jars as dependencies (jai_core, jai_codec, jai_imageio). I've been using geotools version 2.4.4 (possibly the problem has already been resolved in the development version). Anyway, in each case I can only perform the read if I've deployed the native libraries. The code I use is below, I think it's based on code from a tutorial. ImageMosaicFormatFactory imfFact = new ImageMosaicFormatFactory(); ImageMosaicFormat fmt = (ImageMosaicFormat) imfFact.createFormat(); if (fmt.accepts(dataIndex)){ ImageMosaicReader reader = (ImageMosaicReader) fmt.getReader(dataIndex); coverage = (GridCoverage2D) reader.read(null); reader.dispose(); } Is there a pure java workaround for this? Cheers Alistair Michael Bedward wrote: > Hi folks, > > Regarding this ImageIO / Mac problem - Gabriella and I chatted a bit > further about it off the list. The error comes from a call in > WorldImageReader.java: > > JAI.create("ImageRead"... > > to load the coverage raster from file. The problem is that the > ImageReadDescriptor class isn't in Apple's version of ImageIO. I > think on other platforms it is part of the native lib stuff (correct > me if I'm wrong) and on the Mac there are only the pure Java > components of ImageIO. > > But a bit of testing showed that Gabriella can read her jpeg file > successfully using ImageIO functions directly. So would it cause any > problems if that were done in the WorldImageReader class and the > analagous code in the WorldImageWriter class ? > > Michae > > > > On Sun, May 11, 2008 at 9:47 AM, Gabriella Turek <tetoroa@...> wrote: > >> Ooops, you're right I did not have jai-image-io installed. But here's the >> funny thing: >> I downloaded it (the linux version, I suppose it doesn't matter) and >> installed it in /System/Library/Java/Extensions but I still get the same >> error message. >> I then looked at my classpath and I remember having to add the other jai jar >> files expressly to it >> to make my demo work (except for this error). So I also added the >> jai-imageio.jar file expressly to the classpath, and I still get the error. >> I am running 10.4.11 in my PPC powerbook, java version 1.5.0_13 >> gaby >> >> -- >> ******************************************************************************* >> ** Anyone who has the power to make you believe absurdities has ** >> ** the power to make you commit injustices - Voltaire (1767) >> ** >> ******************************************************************************* >> >> >> >> >> >> > > ------------------------------------------------------------------------- > This SF.net email is sponsored by the 2008 JavaOne(SM) Conference > Don't miss this year's exciting event. There's still time to save $100. > Use priority code J8TL2D2. > http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone > _______________________________________________ > Geotools-gt2-users mailing list > Geotools-gt2-users@... > https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users > > > ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Geotools-gt2-users mailing list Geotools-gt2-users@... https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users |
|
|
Re: Rendering rasters without JAI> Hi > > Sorry to dig up an old thread but I'm getting this problem on both > windows and a linux. Not a problem ... let me check my code. > I'm deploying with maven and have the pure java jars as dependencies (jai_core, jai_codec, jai_imageio). > In udig we have the following line during application start up: > if( Platform.getOS().equals(Platform.OS_WIN32) ){ > // PNG native support is not very good .. this turns it off > ImageUtilities.allowNativeCodec("png", > ImageReaderSpi.class, false); //$NON-NLS-1$ > } I also had problems with different configurations of JRE with or without native support and recorded my findings here: - http://jira.codehaus.org/browse/GEOT-1862 Near as I can tell the default ImageReader that comes with one of the JRE bundles is bad; and we do better to make use of the pure java reader; or we do better to make use of a replacement installed by the ImageIO extension. Jody ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Geotools-gt2-users mailing list Geotools-gt2-users@... https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users |
| Free Forum Powered by Nabble | Forum Help |