Roberdt ha scritto:
> Hi there,
> 
> I use Geoserver (with an Oracle datastore) to highlight features in an
> OpenLayers app . The geometry type is determined via a DescribeFeatureType
> request, but the request always returns "gml:GeometryPropertyType" for the
> geometry attribute, which effectively highlights polygons as if they were
> points. 
> 
> My guess was that a custom schema.xml would help solve this problem, but the
> functionality is broken and scheduled to be fixed in 1.7.3. So for now I
> installed a 1.6.5 Geoserver,  which picks up my schema.xml but always sets
> the more generic "gml:GeometryPropertyType" instead of
> "gml:PolygonPropertyType".
> 
> Comments on issue  this http://jira.codehaus.org/browse/GEOS-1124
> http://jira.codehaus.org/browse/GEOS-1124  suggest that this is not a bug
> because Oracle allows storing multiple geometry types in one column. 
> 
> Is there a way to specify the specific type of my geometry attribute in
> Geoserver when using an Oracle datastore? More or less like the
> '"gml_<column_name>_type" "polygon"' in the METADATA section of a MapServer
> mapfile.
> 
> Thanks for helping me out!

Hi Robert,
while one can use the schema.xml workaround, there is a direct
solution for your problem as well, that is, actually declaring the
geometry type in Oracle.

It is not well known, but you can declare the geometry type in Oracle
by adding a bit of metadata in your spatial index, and GeoServer will
pick it up and generate the proper schema by itself.

Here is an example of a spatial index creation for a point layer:

CREATE INDEX FT1_GEOMETRY_IDX ON FT1(GEOMETRY) INDEXTYPE IS 
MDSYS.SPATIAL_INDEX PARAMETERS ('SDO_INDX_DIMS=2 LAYER_GTYPE="POINT"')

Please refer to the Oracle documentation for more details.

Cheers
Andrea

PS: this question was for the users ml, the devel ml is for GS
core developers to talk to each other, not for users to ask
questions to developers (we're all subscribed to the users ml as
well).

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

------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
Geoserver-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-devel

Reply via email to