[Geoserver-users] Custom DataStores

Justin,

Which version of GeoTools should I be using?

Version 2.5.1? Version 2.3.0?

Version 2.5.1 does not have the AbstractGridFormat and
AbstractGridCoverage2DReader classes.

Ronak

-----Original Message-----
From: Justin Deoliveira [mailto:jdeolive@anonymised.com]
Sent: Wednesday, February 11, 2009 8:39 PM
To: Patel, Ronak Avinash (US SSA)
Cc: geoserver-users@lists.sourceforge.net
Subject: Re: [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.

Patel, Ronak Avinash (US SSA) ha scritto:

Justin,

Which version of GeoTools should I be using?

Version 2.5.1? Version 2.3.0?

Version 2.5.1 does not have the AbstractGridFormat and
AbstractGridCoverage2DReader classes.

Each GeoServer series works against a specific GeoTools
brach.
GeoServer 1.7.x works against the GeoTools 2.5.x branch.
Each time we release GeoServer we make a parallel release
of GeoTools, since most of the fixes/improvements we
make require a significant number of changes in gt2.
This means that if you want to work against a GeoServer
1.7.x branch checkout, you need to work against the
GeoTools 2.5.x branch checkout as well.
If you want to work against releases, you need to pick
the correct GeoTools release, for example, GeoServer
1.7.2 was released against GeoTools 2.5.3.
The 2.3.x GeoTools series was used in GeoServer 1.5.x,
which is long gone.

The classes you're mentioning are definitely still
there in my GeoTools checkout.
Oh, if you want to create support for a simple
format have a look at the gtopo30 raster format
classes in GeoTools, they are probably the simplest
example you can find around.
If you want something comprehensive instead, look
at the GeoTiff related classes. They are both
in their own module under the geotools checkout,
modules/plugin folder.

Cheers
Andrea

--
Andrea Aime
OpenGeo - http://opengeo.org
Expert service straight from the developers.