Howto: SDE attribute domains & getfeatureinfo

Diego Guidi diegoguidi at GMAIL.COM
Tue Jan 15 02:58:29 EST 2008


Thanks to you and to all in the mailing list for the fast responses.
I've ask for the same problem also in the Geoserver mailing list (I'm
evaluating both the products for my purposes) and I've received an
interesting response:
http://www.nabble.com/Howto%3A-SDE-attribute-domains---getfeatureinfo-td14804613.html
In fact, using a spatial view looks like an elegant solution and I
think that also mapserver could manage this views very well.
I try as soon as possible all the workarounds and i could post my experience :)

On Jan 15, 2008 5:45 AM, Howard Butler <hobu.inc at gmail.com> wrote:
>
>
> On Jan 14, 2008, at 9:50 AM, Diego Guidi wrote:
>
> > I'm playing with Mapserver 5.0 WMS support, and I'm very happy to look
> > at how mapserver 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 MapServer
> > (and GeoServer too...) shows the codes (10, 02, 03)...
> > Any suggestion to resolve this problem? I need to manually query the
> > SDE db, or MapServer it's able to do all this work if correctly
> > configured?
>
> Neither MapServer no GeoServer will fetch the domain values because
> they are contained in the "GeoDatabase", not in SDE proper.  Or, to
> put it more precisely, the ArcSDE SDK doesn't know anything (or at
> least very little) about table linkages that ArcObjects et. al. use on
> top of the storing the spatial data and attributes in the database.
> This means things like topology and attribute domains are not
> available to the SDKs, and therefore, not available to MapServer or
> GeoServer using the methods that we use to connect to ArcSDE.
>
> Using a parallel connection to the database, say using OCI, you could
> follow the table linkages to get your domain values.  A simple
> approach would be to write a script that connects to Oracle using your
> favorite scripting language and emits mapfile CLASS/LABEL information
> for each of the domain tables that you wish to map.   Then use the
> snazzy INCLUDE syntax to pull in just your definitions for the layers
> (utilizing some sort of naming scheme). Not overly elegant or at all
> dynamic, but one way to do the job.
>
> Howard
>
>
>



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



More information about the mapserver-users mailing list