[Geoserver-users] Geoserver:WFS DescribeFeatureType for Sql Server

Hello Everyone

I am doing WFS With Geoserver/Sql server 2008
Sql server 2008 Geometry datatype property specifies itself as a
generic “gml:GeometryPropertyType”.
How can i make something more specific like “gml:LineStringPropertyType”.

I’ve seen the spatial fields do this in the past with my
oracle/geoserver setup here, it turned out to be because I did not
have a proper spatial index on my table.

Please let me know how to do for Sql server 2008

Thanks
Sreenath

Hi Sreenath,

You can override the schema produced by geoserver by placing a schema.xsd file into the feature type configuration directory of the feature type you want to override. Perform the following steps:

1) Make a DFT request against teh feature type, and save the result to a file

2) Edit the file manually, changing gml:GeometryPropertyType to gml:LineStringPropertyType

3) Save the file into <data_directory>/featureTypes/<yourFeatureType>/schema.xsd

Now subsequent DescribeFeatureType and GetFeature calls will use this schema instead of generating one from the table.

-Justin

sreenath reddy wrote:

Hello Everyone

I am doing WFS With Geoserver/Sql server 2008
Sql server 2008 Geometry datatype property specifies itself as a
generic “gml:GeometryPropertyType”.
How can i make something more specific like “gml:LineStringPropertyType”.

I’ve seen the spatial fields do this in the past with my
oracle/geoserver setup here, it turned out to be because I did not
have a proper spatial index on my table.

Please let me know how to do for Sql server 2008

Thanks
Sreenath

------------------------------------------------------------------------------
The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your
production scanning environment may not be a perfect world - but thanks to
Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700
Series Scanner you'll get full speed at 300 dpi even with all image processing features enabled. http://p.sf.net/sfu/kodak-com
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

--
Justin Deoliveira
OpenGeo - http://opengeo.org
Enterprise support for open source geospatial.

It is appreciated if you can keep replies on the public list. Thanks :slight_smile:

You may have to do a server restart before the new schema properly kicks in. Have you done one?

sreenath reddy wrote:

Hello Justin
Thanks for your reply. I am not getting Schema now.
After following your steps for WFS GetFeature1.1.Xml

<xsd:schema elementFormDefault="qualified" targetNamespace="http://SAE">
<xsd:import namespace="http://www.opengis.net/gml&quot;
schemaLocation="http://localhost:8080/geoserver/schemas/gml/3.1.1/base/gml.xsd&quot;/&gt;
</xsd:schema>

Before following your steps i got
<xsd:schema elementFormDefault="qualified" targetNamespace="http://SAE">
<xsd:import namespace="http://www.opengis.net/gml&quot;
schemaLocation="http://localhost:8080/geoserver/schemas/gml/3.1.1/base/gml.xsd&quot;/&gt;
-
<xsd:complexType name="CecmGeoLocationType">
-
<xsd:complexContent>
-
<xsd:extension base="gml:AbstractFeatureType">
-
<xsd:sequence>
<xsd:element maxOccurs="1" minOccurs="0" name="EventId"
nillable="true" type="xsd:int"/>
<xsd:element maxOccurs="1" minOccurs="0" name="Location"
nillable="true" type="gml:GeometryPropertyType"/>
<xsd:element maxOccurs="1" minOccurs="0" name="EventName"
nillable="true" type="xsd:string"/>
<xsd:element maxOccurs="1" minOccurs="0" name="EventTypeId"
nillable="true" type="xsd:string"/>
<xsd:element maxOccurs="1" minOccurs="0" name="EventDescription"
nillable="true" type="xsd:string"/>
<xsd:element maxOccurs="1" minOccurs="0" name="EventStartDate"
nillable="true" type="xsd:dateTime"/>
<xsd:element maxOccurs="1" minOccurs="0" name="EventEndDate"
nillable="true" type="xsd:dateTime"/>
<xsd:element maxOccurs="1" minOccurs="0" name="EventOtherDetails"
nillable="true" type="xsd:string"/>
<xsd:element maxOccurs="1" minOccurs="0" name="LocationDetails"
nillable="true" type="xsd:string"/>
</xsd:sequence>
</xsd:extension>
</xsd:complexContent>
</xsd:complexType>
<xsd:element name="CecmGeoLocation" substitutionGroup="gml:_Feature"
type="cecm:CecmGeoLocationType"/>
</xsd:schema>

On Wed, May 13, 2009 at 2:31 PM, Justin Deoliveira <jdeolive@anonymised.com> wrote:

Hi Sreenath,

You can override the schema produced by geoserver by placing a schema.xsd
file into the feature type configuration directory of the feature type you
want to override. Perform the following steps:

1) Make a DFT request against teh feature type, and save the result to a
file

2) Edit the file manually, changing gml:GeometryPropertyType to
gml:LineStringPropertyType

3) Save the file into
<data_directory>/featureTypes/<yourFeatureType>/schema.xsd

Now subsequent DescribeFeatureType and GetFeature calls will use this schema
instead of generating one from the table.

-Justin

sreenath reddy wrote:

Hello Everyone

I am doing WFS With Geoserver/Sql server 2008
Sql server 2008 Geometry datatype property specifies itself as a
generic "gml:GeometryPropertyType".
How can i make something more specific like "gml:LineStringPropertyType".

I've seen the spatial fields do this in the past with my
oracle/geoserver setup here, it turned out to be because I did not
have a proper spatial index on my table.

Please let me know how to do for Sql server 2008

Thanks
Sreenath

------------------------------------------------------------------------------
The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your
production scanning environment may not be a perfect world - but thanks to
Kodak, there's a perfect scanner to get the job done! With the NEW KODAK
i700
Series Scanner you'll get full speed at 300 dpi even with all image
processing features enabled. http://p.sf.net/sfu/kodak-com
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

--
Justin Deoliveira
OpenGeo - http://opengeo.org
Enterprise support for open source geospatial.

--
Justin Deoliveira
OpenGeo - http://opengeo.org
Enterprise support for open source geospatial.