I have a question about the DescribeFeatureType response in the case of a table with mixed geometries (points and polygons for example).
How does Geoserver output this kind of "layer" in a DescribeFeatureType response? Does anybody have an example?
I can tell you only about the oracle spatial data source. It determines the type of geometry from the first row in the table. So if the first line has a point geometry, it will report the feature type attribute as a point type.
Quoting Bart van den Eijnden <bartvde@anonymised.com>:
Hi list,
I have a question about the DescribeFeatureType response in the case of a
table with mixed geometries (points and polygons for example).
That is a great question! Here are some not so great answers....
- The answer should be - "according to the OGC specification". This probably
means that the gml:Geometry type is referenced as the super class of Point and
Polygon - but you can probably do some gml magic to describe what you want.
- The quick annoying answer is - the way you specify in your schema.xml fragment
(I think GeoServer just echo's this fragment back for the DescribeFeatureType
response - but I may be wrong).
A related question - you did not ask is "How does GeoServer return multiple
Feature Types in the same Feature Collection". The answer I think is still
"poorly" due to limitaitons in the gml writer. But if this was set up you could
declare you feature twice - once with points and once with polygons.
How does Geoserver output this kind of "layer" in a DescribeFeatureType
response? Does anybody have an example?
Have you looked at the GML spec? They have lots of painful example in there, the
answer could be as simple as using the XMLSchema syntax for a disjunction. I
will ask an XML expert I know at work and get back to you.