USGS provides different resolution orthoimage quadrangles in the WorldImage format (*.tif with an accompanying *.tfw world file). Some of these quadrangles can be used by GeoServer (2.1.0 - 2.1.2) by creating a WorldImage store and publishing the layer (some of them throw an exception when trying to publish the layer). When publishing a GeoTiff layer that has been converted from a currently working WorldImage layer, I am getting the following exception:
2012-01-10 08:38:33,228 WARN [referencing.factory] - Axis elements found in a wkt definition, the force longitude first axis order hint might not be respected:
PROJCS["WGS84 / Simple Mercator", GEOGCS["WGS 84", DATUM["WGS_1984", SPHEROID["WGS_1984", 6378137.0, 298.257223563]], PRIMEM["Greenwich", 0.0], UNIT["degree", 0.017453292519943295]], PROJECTION["Mercator_1SP_Google"], PARAMETER["latitude_of_origin", 0.0], PARAMETER["central_meridian", 0.0], PARAMETER["scale_factor", 1.0], PARAMETER["false_easting", 0.0], PARAMETER["false_northing", 0.0], UNIT["m", 1.0], AXIS["x", EAST], AXIS["y", NORTH], AUTHORITY["EPSG","54004"]]
2012-01-10 08:38:39,674 INFO [geoserver.web] - Error saving layer
java.lang.NullPointerException
at org.geoserver.catalog.impl.CoverageStoreInfoImpl.getFormat(CoverageStoreInfoImpl.java:42)
...
I tried using gdal_translate in the following way (substitute 1234 with real values): gdal_translate -of GTiff -a_srs "EPSG:2239" -co "TILED=YES" 1234.tif ../geotiff/1234.tif
The conversion succeeds, and I can successfully create a GeoTiff store in GeoServer, but cannot publish the layer because of the error described above. This leads me to believe that I am trying to publish layers (in both cases) that are not properly formatted. Thus, what is the correct way to convert a [working] USGS orthoimage in WorldImage format to a tiled GeoTiff for GeoServer 2.1.2?
Parameter message can't be null
is an Apache error thrown when a FeedbackMessage doesn't have a message string (see here: bit.ly/zBUjy3 for the gory details). I suggest you post the whole stack trace so we might be able to identify what message GeoServer is trying to tell us.gdal_translate -a_srs
doesn't reproject, it merely assigns (or overwrites) the image's projection. If the image has no bounding information, it'll assume 1 US foot (for EPSG:2239) per pixel and place the image at the coordinate system's origin. If the bounding box is in a unit other than US feet, then your image could be anywhere or at any size depending on the units and origin of whatever projection it was digitised in.