Hi all,

I'm switching from version 1.6.2 to version 1.7.2 and I'm having problems with 
the ImageMosaicPlugin.

We have 32GB of data, divided into 113 separate and adjacent Geotiffs and a 
shapefile for the tileindex.

This data has always worked under version 1.6.2, now after we made the switch 
to 1.7.2 we get an exception upon startup.
When I create a new CoverageDataStore, fill in all the forms, I then press 
"Apply", everything seems to work, we can request the layer.
But when I press "Save" and then "Reload", or "Save" and then simple restart 
the server we get an exception:

The exception when loading the looks as follows:

.......
12 Feb 08:21:37 WARN [geoserver.catalog] - Error loading 
'dmt_whole_64_blocks_dmt_whole/info.xml', ignoring
12 Feb 08:21:37 INFO [geoserver.catalog] -
java.lang.NullPointerException
        at 
org.geoserver.catalog.util.LegacyCoverageInfoReader.requestCRSs(LegacyCoverageInfoReader.java:201)
        at 
org.geoserver.catalog.util.LegacyCatalogImporter.readCoverage(LegacyCatalogImporter.java:624)
        at 
org.geoserver.catalog.util.LegacyCatalogImporter.imprt(LegacyCatalogImporter.java:221)
        at 
org.geoserver.config.GeoServerLoader.initialize(GeoServerLoader.java:112)
..............


I have corrected this error in the code in the file 
"org.geoserver.catalog.util.LegacyCoverageInfoReader.java":
I have rebuild localy and everything now works for me ...
Can you guys upload this correction to the repository?


+++++++++++++++++++++++
INCORRECT CODE:
+++++++++++++++++++++++

    public List<String> requestCRSs() throws Exception {
        Element supportedCRS = ReaderUtils.getChildElement(coverage, 
"supportedCRSs" );
        String[] requestCRS = ReaderUtils.getChildText( supportedCRS, 
"requestCRSs" ).trim().split(",");
        return Arrays.asList(requestCRS);
    }

    public List<String> responseCRSs() throws Exception {
        Element supportedCRS = ReaderUtils.getChildElement(coverage, 
"supportedCRSs" );
        String[] responseCRS = ReaderUtils.getChildText( supportedCRS, 
"responseCRSs" ).trim().split(",");
        return Arrays.asList(responseCRS);
    }

+++++++++++++++++++++++
CORRECTED CODE:
+++++++++++++++++++++++

    public List<String> requestCRSs() throws Exception {
        Element supportedCRS = ReaderUtils.getChildElement(coverage, 
"supportedCRSs" );
        String[] requestCRS = ReaderUtils.getChildText( supportedCRS, 
"requestCRSs" ) == null ? new String[]{} : ReaderUtils.getChildText( 
supportedCRS, "requestCRSs" ).trim().split(",");
        return Arrays.asList(requestCRS);
    }

    public List<String> responseCRSs() throws Exception {
        Element supportedCRS = ReaderUtils.getChildElement(coverage, 
"supportedCRSs" );
        String[] responseCRS = ReaderUtils.getChildText( supportedCRS, 
"responseCRSs" ) == null ? new String[]{} : ReaderUtils.getChildText( 
supportedCRS, "responseCRSs" ).trim().split(",");
        return Arrays.asList(responseCRS);
    }

+++++++++++++++++++++++


The info.xml looks like this in version 1.7.2:

<coverage format = "dmt_whole_64_blocks" >
  <name>dmt_whole</name>
  <label>dmt_whole is a Image mosaicking plugin</label>
  <description>Generated from dmt_whole_64_blocks</description>
  <wmspath>/</wmspath>
  <keywords>WCS,dmt_whole_64_blocks,dmt_whole</keywords>
  <!--
    the default style this CoverageInfoDTO can be represented by.
    at least must contain the "default" attribute
  -->
  <styles default = "raster" />
  <!--
    crs: native CRS definition, srsName: user defined CRS identifier
  -->
  <envelope crs = "PROJCS[&apos;WGS_1984_UTM_Zone_31N&apos;,
  GEOGCS[&apos;GCS_WGS_1984&apos;,
    DATUM[&apos;D_WGS_1984&apos;,
      SPHEROID[&apos;WGS_1984&apos;, 6378137.0, 298.257223563]],
    PRIMEM[&apos;Greenwich&apos;, 0.0],
    UNIT[&apos;degree&apos;, 0.017453292519943295],
    AXIS[&apos;Longitude&apos;, EAST],
    AXIS[&apos;Latitude&apos;, NORTH]],
  PROJECTION[&apos;Transverse_Mercator&apos;],
  PARAMETER[&apos;central_meridian&apos;, 3.0],
  PARAMETER[&apos;latitude_of_origin&apos;, 0.0],
  PARAMETER[&apos;scale_factor&apos;, 0.9996],
  PARAMETER[&apos;false_easting&apos;, 500000.0],
  PARAMETER[&apos;false_northing&apos;, 0.0],
  UNIT[&apos;m&apos;, 1.0],
  AXIS[&apos;x&apos;, EAST],
  AXIS[&apos;y&apos;, NORTH]]" srsName = "EPSG:32631" >
    <pos>436000.0 5648999.0</pos>
    <pos>610000.0 5736999.0</pos>
  </envelope>
  <grid dimension = "2" >
    <low>0 0 </low>
    <high>174000 88000 </high>
    <axisName>dmt_whole</axisName>
    <axisName>dmt_whole</axisName>
    <axisName>dmt_whole</axisName>
    <axisName>dmt_whole</axisName>
    <geoTransform >
      <scaleX>1.0</scaleX>
      <scaleY>-1.0</scaleY>
      <shearX>0.0</shearX>
      <shearY>0.0</shearY>
      <translateX>436000.0</translateX>
      <translateY>5736999.0</translateY>
    </geoTransform>
  </grid>
  <CoverageDimension >
    <name>dmt_whole</name>
    <description>GridSampleDimension[0.0,255.0]</description>
    <interval >
      <min>0.0</min>
      <max>255.0</max>
    </interval>
    <nullValues >
    </nullValues>
  </CoverageDimension>
  <CoverageDimension >
    <name>dmt_whole</name>
    <description>GridSampleDimension[0.0,255.0]</description>
    <interval >
      <min>0.0</min>
      <max>255.0</max>
    </interval>
    <nullValues >
    </nullValues>
  </CoverageDimension>
  <CoverageDimension >
    <name>dmt_whole</name>
    <description>GridSampleDimension[0.0,255.0]</description>
    <interval >
      <min>0.0</min>
      <max>255.0</max>
    </interval>
    <nullValues >
    </nullValues>
  </CoverageDimension>
  <CoverageDimension >
    <name>dmt_whole</name>
    <description>GridSampleDimension[0.0,255.0]</description>
    <interval >
      <min>0.0</min>
      <max>255.0</max>
    </interval>
    <nullValues >
    </nullValues>
  </CoverageDimension>
  <supportedCRSs >
    <requestCRSs></requestCRSs>
    <responseCRSs></responseCRSs>
  </supportedCRSs>
  <supportedFormats nativeFormat = "ImageMosaic" >
    <formats>ARCGRID,GEOTIFF,IMAGEMOSAIC,GIF,PNG,JPEG,TIFF,GTOPO30</formats>
  </supportedFormats>
  <supportedInterpolations default = "nearest neighbor" >
    <interpolationMethods>nearest 
neighbor,bilinear,bicubic</interpolationMethods>
  </supportedInterpolations>
  <parameters >
    <parameter name = "OutputTransparentColor" value = "" />
    <parameter name = "InputTransparentColor" value = "" />
    <parameter name = "InputImageThresholdValue" value = "NaN" />
  </parameters>
</coverage>


and used to look like this in 1.6.2:

<coverage format = "dmt_whole" >
  <name> dmt_whole</name>
  <label>dmt_whole is a Image mosaicking plugin</label>
  <description>Generated from dmt_local_blocks</description>
  <wmspath>/</wmspath>
  <metadataLink about = "" type = "" metadataType = "" >







    null







  </metadataLink>
  <keywords>WCS,dmt_local_blocks,dmt_whole</keywords>
  <!--
    the default style this CoverageInfoDTO can be represented by.
    at least must contain the "default" attribute
  -->
  <styles default = "raster" />
  <envelope crs = "PROJCS['WGS 84 / UTM zone 31N',
  GEOGCS['WGS 84',
    DATUM['World Geodetic System 1984',
      SPHEROID['WGS 84', 6378137.0, 298.257223563, AUTHORITY['EPSG','7030']],
      AUTHORITY['EPSG','6326']],
    PRIMEM['Greenwich', 0.0, AUTHORITY['EPSG','8901']],
    UNIT['degree', 0.017453292519943295],
    AXIS['Geodetic longitude', EAST],
    AXIS['Geodetic latitude', NORTH],
    AUTHORITY['EPSG','4326']],
  PROJECTION['Transverse_Mercator'],
  PARAMETER['central_meridian', 3.0],
  PARAMETER['latitude_of_origin', 0.0],
  PARAMETER['scale_factor', 0.9996],
  PARAMETER['false_easting', 500000.0],
  PARAMETER['false_northing', 0.0],
  UNIT['m', 1.0],
  AXIS['Easting', EAST],
  AXIS['Northing', NORTH],
  AUTHORITY['EPSG','32631']]" srsName = "EPSG:32631" >
    <pos>500000.0 5648999.0</pos>
    <pos>600000.0 5719999.0</pos>
  </envelope>
  <grid dimension = "2" >
    <low>0 0 </low>
    <high>100000 71000 </high>
    <axisName>x</axisName>
    <axisName>y</axisName>
    <geoTransform >
      <scaleX>0.05</scaleX>
      <scaleY>-0.05</scaleY>
      <shearX>0.0</shearX>
      <shearY>0.0</shearY>
      <translateX>500000.025</translateX>
      <translateY>5652548.975</translateY>
    </geoTransform>
  </grid>
  <CoverageDimension >
    <name>dmt_whole [0 ... 255]</name>
    <description>GridSampleDimension[0.0,255.0]</description>
    <interval >
      <min>0.0</min>
      <max>255.0</max>
    </interval>
  </CoverageDimension>
  <CoverageDimension >
    <name>dmt_whole [0 ... 255]</name>
    <description>GridSampleDimension[0.0,255.0]</description>
    <interval >
      <min>0.0</min>
      <max>255.0</max>
    </interval>
  </CoverageDimension>
  <CoverageDimension >
    <name>dmt_whole [0 ... 255]</name>
    <description>GridSampleDimension[0.0,255.0]</description>
    <interval >
      <min>0.0</min>
      <max>255.0</max>
    </interval>
  </CoverageDimension>
  <supportedCRSs >
  </supportedCRSs>
  <supportedFormats nativeFormat = "ImageMosaic" >
    <formats>ARCGRID,GTOPO30,GIF,PNG,JPEG,TIFF,GEOTIFF,IMAGEMOSAIC</formats>
  </supportedFormats>
  <supportedInterpolations default = "nearest neighbor" >
    <interpolationMethods>nearest 
neighbor,bilinear,bicubic</interpolationMethods>
  </supportedInterpolations>
  <parameters >
    <parameter name = "InputTransparentColor" value = "" />
    <parameter name = "OutputTransparentColor" value = "" />
    <parameter name = "InputImageThresholdValue" value = "NaN" />
  </parameters>
</coverage>



Regards,
Stephen Kempenaers

---
This e-mail, any attachments and the information it contains are confidential 
and meant only for the use of the addressee(s) only.  Access to this e-mail by 
anyone other than the addressee(s) is unauthorized.  If you are not the 
intended addressee (or responsible for delivery of the message to such person), 
you may not use, copy, distribute or deliver to anyone this message (or any 
part of its contents) or take any action in reliance on it.  In such case, you 
should destroy this message and notify the sender immediately.  If you have 
received this e-mail in error, please notify us immediately by e-mail or 
telephone and delete the e-mail from any computer.
All reasonable precautions have been taken to ensure no viruses are present in 
this e-mail and its attachments.  As our company cannot accept responsibility 
for any loss or damage arising from the use of this e-mail or attachments we 
recommend that you subject these to your virus checking procedures prior to use.



------------------------------------------------------------------------------
Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM)
software. With Adobe AIR, Ajax developers can use existing skills and code to
build responsive, highly engaging applications that combine the power of local
resources and data with the reach of the web. Download the Adobe AIR SDK and
Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com
_______________________________________________
Geotools-devel mailing list
Geotools-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geotools-devel

Reply via email to