Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>Check that you have JAI and ImageIO avaialble. Either via maven dependency, or by installing them as Java Extensions as outlined in the Quickstart.</p> <ul> <li><a href="http://docs.geotools.org/latest/userguide/tutorial/quickstart/eclipse.html" rel="nofollow">http://docs.geotools.org/latest/userguide/tutorial/quickstart/eclipse.html</a></li> </ul> <p>Update:</p> <p>I was able to catch up on the GeoTools IRC channel and confirm this is an environment issue. In class <em>works for me</em> fashion I was able to connect using the WMSLab tutorial example to the WMS in question and display results.</p> <p>So lets check out "problem" environment::</p> <p>System.out.println( GeoTools.getAboutInfo() );</p> <p>Result::</p> <p>GeoTools version 9-SNAPSHOT (built from ree5a6830d2c774ee9a4eb9e024d989c2a1bcdfe3) Java version: 1.7.0_09 Operating system: Windows 7 6.1 GeoTools jars on classpath:</p> <p>A couple ideas:</p> <ul> <li>Check out the ImageLab to confirm JAI / ImageIO is availble?</li> </ul> <p>This worked!</p> <ul> <li>Save the image retrieved from the browser and try loading it using straight up Java</li> </ul> <p>Example from WorldImageReader::</p> <pre><code>File input = ... ImageInputStreamSpi inStreamSPI= ImageIOExt.getImageInputStreamSPI( input ); if (inStreamSPI == null) throw new IllegalStateException("Unsuppported"); </code></pre> <p>Apparently this was not successful?</p> <ul> <li>GeoTools has not gone through QA on Java 7 yet, downgrade to Java 6?</li> </ul> <p>Recently a Java 7 build box has been volunteered. When GeoTools works in Java 7 the release notes and tutorials will be updated.</p> <ul> <li>Especially on windows the implementation of PNG support is suspect.</li> </ul> <p>The following code from the uDig project disables the native implementation allowing the pure Java implementation to have a crack at it::</p> <pre><code> if (Platform.getOS().equals(Platform.OS_WIN32)) { try { // PNG native support is not very good .. this turns it off ImageUtilities.allowNativeCodec("png", ImageReaderSpi.class, false); //$NON-NLS-1$ } catch (Throwable t) { // we should not die if JAI is missing; we have a warning for that... System.out.println("Difficulty turnning windows native PNG support (which will result in scrambled images from WMS servers)"); //$NON-NLS-1$ t.printStackTrace(); } } </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload