[Geoserver-users] Howto: SDE attribute domains & getfeatureinfo

I'm playing with geoserver 1.6.0 RC2 WMS support, and I'm very happy to look
at how geoserver is fast reading a lot of data from a SDE/Oracle
datasource and serving them as WMS server, but... I need to know if
it's possible to show attribute domains.
Let me explain: i have a large dataset and a set of sde data sources
that have attributes mapped to "attribute domains".
This means that for my road table i have an attribute called TYPES
that contains values like 01, 02, 03 and more...
values for this codes are in another table in SDE database that
contains values like 01 = highway, 02 = simple road, and more...
When i use getfeatureinfo i need to show the "real" values of my
attributes (highway, simple road, ecc...) but at this time geoserver
(and mapserver too...) shows the codes (10, 02, 03)...
Any suggestion to resolve this problem? I need to manually query the
SDE db, or geoserver it's able to do all this work if correctly
configured?
Thanks in advance.
Diego Guidi

--
Diego Guidi
http://lacorrente.blogspot.com

Hi Diego,

you can use a SDE registered spatial view if that fits your needs.

More elaborated solutions would imply the use of community-schema datastore
but that's not for production yet.

Though I guess for that simple use case using a view would be enough?

cheers,

Gabriel

On Monday 14 January 2008 04:51:37 pm Diego Guidi wrote:

I'm playing with geoserver 1.6.0 RC2 WMS support, and I'm very happy to
look at how geoserver is fast reading a lot of data from a SDE/Oracle
datasource and serving them as WMS server, but... I need to know if
it's possible to show attribute domains.
Let me explain: i have a large dataset and a set of sde data sources
that have attributes mapped to "attribute domains".
This means that for my road table i have an attribute called TYPES
that contains values like 01, 02, 03 and more...
values for this codes are in another table in SDE database that
contains values like 01 = highway, 02 = simple road, and more...
When i use getfeatureinfo i need to show the "real" values of my
attributes (highway, simple road, ecc...) but at this time geoserver
(and mapserver too...) shows the codes (10, 02, 03)...
Any suggestion to resolve this problem? I need to manually query the
SDE db, or geoserver it's able to do all this work if correctly
configured?
Thanks in advance.
Diego Guidi

I'm not sure if we support it for ArcSDE, Saul might know better, but in other databases this is generally handled with a 'view'. You'd define a view that does the mapping for you, and then have GeoServer serve that view instead of the raw table. But I'm not positive that our ArcSDE reader, or ArcSDE itself, really supports this.

best regards,

Chris

Diego Guidi wrote:

I'm playing with geoserver 1.6.0 RC2 WMS support, and I'm very happy to look
at how geoserver is fast reading a lot of data from a SDE/Oracle
datasource and serving them as WMS server, but... I need to know if
it's possible to show attribute domains.
Let me explain: i have a large dataset and a set of sde data sources
that have attributes mapped to "attribute domains".
This means that for my road table i have an attribute called TYPES
that contains values like 01, 02, 03 and more...
values for this codes are in another table in SDE database that
contains values like 01 = highway, 02 = simple road, and more...
When i use getfeatureinfo i need to show the "real" values of my
attributes (highway, simple road, ecc...) but at this time geoserver
(and mapserver too...) shows the codes (10, 02, 03)...
Any suggestion to resolve this problem? I need to manually query the
SDE db, or geoserver it's able to do all this work if correctly
configured?
Thanks in advance.
Diego Guidi

I'm not sure if we support it for ArcSDE, Saul might know better, but in
other databases this is generally handled with a 'view'. You'd define a
view that does the mapping for you, and then have GeoServer serve that
view instead of the raw table.

thanks a lot for the fast responses

Saul is on vacation this week, but I can tell you that if you can create a
spatial view GeoServer will treat it as a normal layer. The spatial view
can include a join to your lookup table, so that you have a column in your
view with the written-out values of the codes.

Use the sdetable command ... for example:

sdetable -o create_view -T AUDUBON_BUTTERFLY_S_V -t
"AUDUBON_GRID_POLY,AUDUBON_BUTTERFLY" -c
"AUDUBON_GRID_POLY.SHAPE,AUDUBON_BUTTERFLY.SPECIES,AUDUBON_BUTTERFLY.DATE_,AUDUBON_BUTTERFLY.LOCATION,AUDUB
ON_BUTTERFLY.QUAD_BLOCK" -w "AUDUBON_GRID_POLY.QUAD_BLOCK =
AUDUBON_BUTTERFLY.QUAD_BLOCK"

Create the view AUDUBON_BUTTERFLY_S_V from a layer AUDUBON_GRID_POLY and a
table AUDUBON_BUTTERFLY. List the columns you want to keep from both, then
the -w is the where statement - how to do the join. Here I'm joining on a
field QUAD_BLOCK which is in both. In your example, you can join on the
code column, but only keep the real value column.

--
View this message in context: http://www.nabble.com/Howto%3A-SDE-attribute-domains---getfeatureinfo-tp14804613p14804965.html
Sent from the GeoServer - User mailing list archive at Nabble.com.

Diego,

Right now SDE attribute domains are NOT supported in the ArcSDE plugin.
Actually, I'm not entirely sure that they are even supportable by the
base ArcSDE "jsde" api provided by ESRI, and a casual glance through the
JSDE api documentation
(http://edndoc.esri.com/arcsde/9.2/api/japi/docs/index.html) didn't come
up with anything that looked very useful.

If you've defined a featureclass in ArcSDE with attribute domains, and
you want to fetch features from the WFS (or, say, label features on a
map using the WMS) where the attribute value is returned with the DOMAIN
value rather than the actual column value, then I think you'd need to do
some ArcSDE hacking inside the geotools codebase.

If, on the other hand, you're happy doing the column value -> display
value mapping at the WMS/WFS client level (say a web application or
client-side application) then you can do the coding there.

In any case, I've created a JIRA to make sure we keep this on our radar!

thanks much,
--saul

On Mon, 2008-01-14 at 17:13 +0100, Diego Guidi wrote:

> I'm not sure if we support it for ArcSDE, Saul might know better, but in
> other databases this is generally handled with a 'view'. You'd define a
> view that does the mapping for you, and then have GeoServer serve that
> view instead of the raw table.
thanks a lot for the fast responses