Hello list.
In our product my company is developing (based on GeoServer) we need support for feature association.
I mean, if I define a feature type with an attribute of type derived from gml:FeatureAssociationType, I would expect to receive in the GML document from the WFS interface something like this:
<LandParcel fid="Lp2034">
<area>2345</area>
<gml:extentOf>...</extentOf>
<adjacentTo xlink:type="simple" xlink:href="#Lp2035"/>
<adjacentTo xlink:type="simple" xlink:href="#Lp2036"/>
</LandParcel>
Where <adjacentTo> is of type derived from gml:FeatureAssociationType.
Now, I've read on Jira (http://jira.codehaus.org/browse/GEOS-595) that something related to this is in work in progress, but it seems to me far away to be realized soon.
I was wondering if it could be possible to realize a more simple solution but that can supply something useful in this direction (in a short time). My company would be glad to work to such solution, if we could get some direction from you.
I'll try to explain briefly my idea. In the text below I'm focused on PostGIS as the backend.
The idea is to extend the way GeoServer (I'm talking about current release, 1.3.2 - not sure if this is the right one for such extension) reads columns from the feature table: keeping the mapping mechanism the same, if GeoServer reads a column to actually be a foreign key, the resulting GML would be in the form with the xlink:href and not the normal nested attribute value.
A rough procedure would be to add a '#' character as a prefix to the foreign key value, assuming the caller will take care of adding in the same result the right feature with the referenced id. A finer way could be to supply some mean by which to specify the right prefix, in order to reference a remote property (as GML provides).
As I said, we would be interested in developing this, if:
1) the GeoServer team thinks it could be a nice addition;
2) it's not something hard to realize.
By not hard I mean something achievable in few coding days (2/3, not counting the setup time, the study time of a programmer new to GeoServer, etc.).
Any feedback would be much appreciated.
Thank you and Best Regards,
Fabio Da Soghe