Skip to: Site menu | Main content

GeoTools

The Open Source Java GIS Toolkit

6 Can Geotools2 be used on Mac OS X Print

Yes! But, Geotools code uses two java extensions: JAI and JAI Image IO. See 2.2 Dependencies for information about how to install these on Mac OS X.

With the JAI extension installed, most of the geotools codebase will build and pass tests, except for the gtopo30, reprojection (extra CS authority factories) and rendering-styling (tests) modules. The SpearfishSample code in the Maps and styles was tested and works.

The maven build process checks for the JAI Image IO extension, so you will need to comment this out to get it to build if you do not have this installed. Comment out the following section in the gt/maven.xml file:

maven.xml
Unable to find source-code formatter for language: xnl. Available languages are: actionscript, html, java, javascript, none, sql, xhtml, xml
<ant:available  classname="com.sun.media.imageio.stream.RawImageInputStream"
  property="imageio.present"/>
    <fail unless="imageio.present"
          message="JAI ImageIO extension not found.
Please download and install it from:
http://java.sun.com/products/java-media/jai/downloads/download-iio.html"
          />

With the pure java parts of the JAI Image IO installed, all of the geotools codebase (except rendering-styling) builds and passes tests, and you do not need to comment out the checks in maven.xml. However, this method of installing and using JAI Image IO is not well tested with geotools.