[Geoserver-users] Custom DataStores

Patel, Ronak Avinash (US SSA) wrote:

Justin,

So if I understand properly, I use the DataStore API to serve features
to the WFS service.

Correct.

I use the AbstractGridFormat, AbstractGridCoverage2DReader and
associated classes to release Coverage information.

Correct.

I would do the same for the corresponding WMS capability with the
StreamingRenderer.

Not sure exactly what you mean. Once you have "plugged in" your data store and coverage extensions, the WMS should work transparently without any further modifications.

So, would I have a total of three extension points and 3 different
classes I would have to extend and plug into Geoserver, using Spring
Framework?

Not sure I understand the third, but two for sure. As for how to plug-in , the datastore and coverage plugins would be geotools plugins, which uses a different plugin system, similar in nature to the jai plugin system. Basically you need to have a META-INF/services directory at the root of the source tree. Inside of it will be two files:

org.geotools.data.DataStoreFactorySpi
org.geotools.coverage.grid.io.GridFormatFactorySpi

The contents of each of the files will be the fully qualified class names of the respective factory implementations.

Or, would I have all of this in one class and I'm just returning
different readers depending on the "TypeName" that the user chooses?

Nope, the DataStore interface is only for vector data.

Hope that helps.

-Justin

Ronak

-----Original Message-----
From: Justin Deoliveira [mailto:jdeolive@anonymised.com] Sent: Wednesday, February 11, 2009 1:28 PM
To: Patel, Ronak Avinash (US SSA)
Cc: geoserver-users@lists.sourceforge.net
Subject: Re: [Geoserver-users] Custom DataStores

Hi Ronak,

Patel, Ronak Avinash (US SSA) wrote:

Hello,

I guess my main problem is that I don't understand the lingo that's being used here.

   1. What is a "feature" in the DataStore sense? Is this the same

thing

      as what WFS considers to be a "feature"?

More or less. The term "feature" definitely comes form WFS. When in teh context of data store a feature means an entry in a dataset which has some attributes.

   2. How do I return coverages through this DataStore interface? What
      format are the coverages supposed to be in?

Coverages are not managed via the DataStore interface. Look at the AbstractGridFormat and AbstractGridCoverage2DReader classes in the org.geotools.coverage.grid.io package for the data access classes relevant to coverages.

   3. Are there any typeNames that I must return? Or can typenames be
      any random string I want? What is a TypeName used for? Does this
      get shown to the enduser of Geoserver?

Yes type names is the list of "types" you want to publish through the datastore, and should not be random. Type name is used by the outside world to identify "datasets" served by the datastore. For instance when the datastore is db based, type names correspond to table names.

   4. How do I return images through this interface? Is there any
      specific format those images have to be in? PlanarImage?
      RenderableImage? Or a simple byte?

The StreamingRenderer class (org.geotools.renderer.lite) can render data

from a DataStore into a Graphics2D context... which can originate from a

RenderedImage.

Thanks for your continued support!

Hope that helps :slight_smile:

Ronak

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

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

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

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

_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

--
Justin Deoliveira
OpenGeo - http://opengeo.org
Enterprise support for open source geospatial.