[Geoserver-users] GeoServer and Google and Custom CoverageStores

Ronak,
I suspect that the accepts method is being called with a file and it
is silently returning false. I am saying silently since the correct
way to use logging in geotools/geoserver is underlined here

http://geoserver.org/display/GEOS/GSIP+13+-+Logging

so a quick hint is to do something like:

  /** Logger. */
  private final static Logger LOGGER =
org.geotools.util.logging.Logging.getLogger("org.geotools.gce.geotiff");

instead of

private static final Logger logger =
Logging.getLogger(LidarCoveragePlugin.class);

Anyway, what do you enter into the UI to create a coveragestore?

Simone.

-------------------------------------------------------
Ing. Simone Giannecchini
GeoSolutions S.A.S.
Owner - Software Engineer
Via Carignoni 51
55041 Camaiore (LU)
Italy

phone: +39 0584983027
fax: +39 0584983027
mob: +39 333 8128928

http://www.geo-solutions.it
http://simboss.blogspot.com/
http://www.linkedin.com/in/simonegiannecchini

-------------------------------------------------------

On Mon, Mar 9, 2009 at 9:40 PM, Patel, Ronak Avinash (US SSA)
<ronak.patel@anonymised.com> wrote:

Simone,

Answers to your questions:

1. No I don't see any call to the format's accepts method getting called. I have a print line and a Java.util.Logger warning message printing out there which I don't see in the logs.

2. I am using Jetty. I drop my plugin into the WEB-INF/lib directory of the Geoserver runtime that I downloaded from the web.

3. I did not build the geoserver. I am using the version that is available from http://geoserver.org/display/GEOS/Stable I am using the OS Independent Binary Version.

I am attaching some source code so you can see what I'm doing.

Ronak Patel

-----Original Message-----
From: simboss1@anonymised.com [mailto:simboss1@anonymised.com] On Behalf Of Simone Giannecchini
Sent: Monday, March 09, 2009 1:24 PM
To: Patel, Ronak Avinash (US SSA)
Cc: geoserver-users@lists.sourceforge.net
Subject: Re: [Geoserver-users] GeoServer and Google and Custom CoverageStores

Ciao Ronak,
it's not that easy to help you out without some code to run here,
anyway, I am going to try anyway ( I will be around for a few hours so
taht we can interact).
First question, does your format's accepts method get ever called from
Geoserver?
Second questions, how are you testing things? jetty? Tomcat?
Third question, how did you build your geoserver? Did you include the
relevanto geotools jars into the build process?

Simone.
-------------------------------------------------------
Ing. Simone Giannecchini
GeoSolutions S.A.S.
Owner - Software Engineer
Via Carignoni 51
55041 Camaiore (LU)
Italy

phone: +39 0584983027
fax: +39 0584983027
mob: +39 333 8128928

http://www.geo-solutions.it
http://simboss.blogspot.com/
http://www.linkedin.com/in/simonegiannecchini

-------------------------------------------------------

On Mon, Mar 9, 2009 at 9:19 PM, Patel, Ronak Avinash (US SSA)
<ronak.patel@anonymised.com> wrote:

Simone,

Another question,

When I do a WCS GetCapabilities, I don't see my plugin being called. Is this supposed to happen?

When is my plugin ever called by Geoserver? When will Geoserver try to invoke my plugin's read methods?

I'm playing trail and error and it's wasting a lot of time.

Any help you can provide would be great.

Thanks,

Ronak Patel

-----Original Message-----
From: simboss1@anonymised.com [mailto:simboss1@anonymised.com] On Behalf Of Simone Giannecchini
Sent: Friday, March 06, 2009 10:05 AM
To: Patel, Ronak Avinash (US SSA)
Cc: geoserver-users@lists.sourceforge.net
Subject: Re: [Geoserver-users] GeoServer and Google and Custom CoverageStores

Ciao Ronak,
a few advices:

1> to be sure that your spi actually works, be sure to
copy/paste/modify and execute one of the services tests from the
various other plugins.... If that test work then it means that the SPI
registry is seeing your coverage. (reading the email more carefully,
if your plugin shows up in the plugins list then this step might be
useless)
2> when you do the test with the string, don't swallow the
exception, that's a bad practice because if something bad happens you
don't know why. I might be that geoserver di tricking your URL before
it reaches the plugin so what works outside geoserver does not work
inside it and you are not able to see it. I guess this is probably
what's happening.

Simone.

-------------------------------------------------------
Ing. Simone Giannecchini
GeoSolutions S.A.S.
Owner - Software Engineer
Via Carignoni 51
55041 Camaiore (LU)
Italy

phone: +39 0584983027
fax: +39 0584983027
mob: +39 333 8128928

http://www.geo-solutions.it
http://simboss.blogspot.com/
http://www.linkedin.com/in/simonegiannecchini

-------------------------------------------------------

On Fri, Mar 6, 2009 at 3:08 AM, Patel, Ronak Avinash (US SSA)
<ronak.patel@anonymised.com> wrote:

Simone,

I have three classes:

1. One class implements the GridFormatFactorySpi interface and returns
the Format through the createFormat method.

2. I have a class that extends AbstractGridFormat and implements the
deprecated Format interface.

I overrode getDocURL() and stuck a System.out.println() there.
I overrode getName() to return the name of my plugin.
I overrode getVersion() to return "1.0"
I overrode getVendor() to return the name of my company.
I overrode the accepts method and stuck a few System.out.println()s

My implementation is:

if(obj instanceof URL) {
return true;
}

if(obj instanceof String) {
//check if it can be turned to a URL
try {
new URL(obj.toString());
return true;
} catch (final MalformedURLException e) {
return false;
}
}

return false;

in the getReader() method I have a System.out.println() and I return my
reader object.

My reader object goes ahead and contacts a SOAP Web Service to obtain a
list of Coverages.

Ronak

-----Original Message-----
From: Simone Giannecchini [mailto:simboss1@anonymised.com]
Sent: Thursday, March 05, 2009 6:01 PM
To: Patel, Ronak Avinash (US SSA)
Cc: geoserver-users@lists.sourceforge.net
Subject: Re: [Geoserver-users] GeoServer and Google and Custom
CoverageStores

Ciao Ronak,
can you be more specific about the nature of your plugin?

Simone.
-------------------------------------------------------
Ing. Simone Giannecchini
GeoSolutions S.A.S.
Owner - Software Engineer
Via Carignoni 51
55041 Camaiore (LU)
Italy

phone: +39 0584983027
fax: +39 0584983027
mob: +39 333 8128928

http://www.geo-solutions.it
http://simboss.blogspot.com/
http://www.linkedin.com/in/simonegiannecchini

-------------------------------------------------------

On Fri, Mar 6, 2009 at 2:27 AM, Patel, Ronak Avinash (US SSA)
<ronak.patel@anonymised.com> wrote:

Hello,

I was finally able to have Geoserver load my custom coverage store and

I

see it displayed in the WCS Config Screen under CoverageStores.

However, I don't see Geoserver ever making a call to my plugin. I

don't

see it ever retrieving my GridCoverageReader and iterating through it.

Can anyone shine any light on that kind of scenario?

Also, I am trying to integrate Geoserver with Google Earth and NASA
WorldWind and I am confused as to the proper URL I should be using to
access the WMS portion of Geoserver.

Thanks,

Ronak Patel

------------------------------------------------------------------------
------

Open Source Business Conference (OSBC), March 24-25, 2009, San

Francisco, CA

-OSBC tackles the biggest issue in open source: Open Sourcing the

Enterprise

-Strategies to boost innovation and cut costs with open source

participation

-Receive a $600 discount off the registration fee with the source

code: SFAD

http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users