Ciao Cedric,
sorry for getting back to you with such a delay but it is a busy period.
See below...
On 10/11/06, Cédric Briançon <[EMAIL PROTECTED]> wrote:
> Dear Geoserver-users list,
>
> I'm developping a coverage store for geoserver to manage a netCDF file.
> In the implementation of this coverage store, I have an error when I use
> the method "reader.setInput(inStream)".
> Here is a little part of the "read" method :
>
> public GridCoverage read(GeneralParameterValue[] params) throws
> IllegalArgumentException, IOException {
> ...
> // Construct a reader
> final ImageReader reader = readerSpi.createReaderInstance(null);
> final ImageInputStream inStream;
> if (source instanceof File || source instanceof URL) {
> inStream = ImageIO.createImageInputStream(source);
> } else {
> throw new IllegalArgumentException("The source parameter is not
> a valid input type !");
> }
> reader.setInput(inStream, true);
> ...
> }
>
> The error displayed in geoserver is :
> org.vfny.geoserver.global.ConfigurationException:
> java.lang.IllegalArgumentException: Incorrect input type!
> This occurs when I try to create a coverage for the coverage store that
> I have previously created in geoserver.
> The tomcat's logs say :
>
> org.vfny.geoserver.global.ConfigurationException:
> java.lang.IllegalArgumentException: Incorrect input type!
> at
> org.vfny.geoserver.action.data.DataCoveragesNewAction.execute(DataCoveragesNewAction.java:155)
> ....
> Caused by: java.lang.IllegalArgumentException: Incorrect input type!
> at javax.imageio.ImageReader.setInput(Unknown Source)
> at
> fr.geomatys.netCDF.io.FileBasedReader.setInput(FileBasedReader.java:90)
> at fr.geomatys.netCDF.io.DefaultReader.setInput(DefaultReader.java:88)
> at javax.imageio.ImageReader.setInput(Unknown Source)
> at fr.geomatys.netCDF.NetcdfReader.read(NetcdfReader.java:221)
> at
> org.vfny.geoserver.action.data.DataCoveragesNewAction.execute(DataCoveragesNewAction.java:139)
> ... 24 more
>
> Actually my netCDF coverage store is recognised in geoserver, I can
> create a coverage store for my netCDF file, the method
> read(GeneralParameterValue[] params) is the main problem.
>
> Cheers,
> Cédric B.
I have to say that it is really clear to me what you means by the
method "reader.setInput(inStream)". But I guess you are talking about
adn ImageReader subclass. A bit more info would be of much help.
I think I already talked to Martin about this, I think having somehow
access to this reader you are implementing (even to a snapshot of it)
would be interesting for the both of us as well as for the
geotools/geoserver community since Alex Petkov and Myself (well not
really me but one of my guys) are all working in background on a
netcdf reader/writer.
Hope to hear to you soon! (well at least sooner than you heard from
me, sorry again man :-) ).
Simone.
>
> -------------------------------------------------------------------------
> Using Tomcat but need to do more? Need to support web services, security?
> Get stuff done quickly with pre-integrated technology to make your job easier
> Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
> _______________________________________________
> Geoserver-users mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/geoserver-users
>
--
-------------------------------------------------------
Eng. Simone Giannecchini
President /CEO GeoSolutions
http://www.geo-solutions.it
-------------------------------------------------------
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Geotools-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel