Hexagon Geospatial
MENU

WebGIS

Need a push in the right direction when configuring WebMap, Portal or SDI services? Looking for hints and tips, or just looking for Ideas and information? The WebGIS discussion board is where you start those discussions, connect and share information.
Showing results for 
Search instead for 
Do you mean 
Reply
Highlighted
Occasional Contributor
Posts: 12
Registered: ‎10-14-2015
Accepted Solution

do not work SQL Server 2008 Spatial with WFS-G??

Hi team!

 

I have created several WFS-G services using Microsoft_Access and SQL_Server and i had not problems. however, actually we are using a SQL_Server_Spatial database, we have not problems to see and display the data, but i can not configure WFS-G. 

 

When I type "Geometry" to the Geometry tag, the xml of service shows a bbox with coords 0, i can add the service to GeospatialPortal but search do not get results. 

 

When I type "Geometry_SPA" to the Geometry tag, the xml of service shows an error and the service do not work.

 

anyone knows if is it possible use SQL_Srvr_Spatial and what have i to do??

or if there is some document where says that it is not supported?

 

thanks

I hope can help me

 

best regards!!

David R

Regular Contributor
Posts: 315
Registered: ‎10-12-2015

Re: do not work SQL Server 2008 Spatial with WFS-G??

I have a test WFS-G running against SQL Server spatial.

I am running SQL Server 2014, same should work fine against 2008R2.

What did you set the connectionType to for the WFSOrigPipe? For SQL Server spatial it should be SQLServerSpatialRW.GDatabase.

My dataset geometry field names are SHAPE and SHAPE_SPA. in the Web.config I used SHAPE. 

Below is extract from the web.config showing the core setup for my test wfs-g.

 

...

<WFSGOrigPipe name="origPipe" firstPipe="true" connectionLocation="GeoTrainSpatial@NZSF2015SERVER" connectionType="SQLServerSpatialRW.GDatabase" connectionInfo="Data Source=NZSF2015SERVER;Initial Catalog=GeoTrainSpatial;User ID=geospatialservice;Password=xxxxxxxxxx;" serviceTitle="Kerikeri" serviceFees="none" serviceAccessConstraints="none" defaultCoordsystem="EPSG:2193" swapCoord="true">
<!--<Service>(M) - contains information about service provider (for GetCapabilities response).
Service attributes:
- providerName - [optional] the provider name.
- providerSite - [optional] the provider site.
- individualName - [optional] the individual name.
- positionName - [optional] the position name.
- facsimile - [optional] the facismile number.
- voice - [optional] the voice number.
- deliveryPoint - [optional] the delivery point address.
- city - [optional] the city.
- administrativeArea - [optional] the administrative area.
- postalCode - [optional] the post code.
- country - [optional] the country.
- electronicMailAddress - [optional] the email address.
- hoursOfService - [optional] the hours of service.
- contactOnlineResource - [optional] the contact online resource.
- contactInstructions - [optional] the contact instructions.
- role - [optional] the role name.
-->
<Service providerName="sample provider name" providerSite="http://www.hexagonsafetyinfrastructure.com/" individualName="Shaun Falconer" positionName="Geospatial Vendor Team Lead" voice="+64 22 659 8856" facsimile="none" deliveryPoint="sample delivery point" city="Kerikeri" administrativeArea="Kerikeri" postalCode="sample postal code" country="New Zealand" electronicMailAddress="sampleElectronicMailAddress@hexagonsi.com" contactOnlineResource="sample contact online resource" hoursOfService="24x7" contactInstructions="none" role="none" />
<!--
<GazetteerMapping> - [mandatory] contains information about features structure.

<GazetteerMapping> attributes:
- identifier - [mandatory] the gazetteer identifier

<GazetteerMapping> child nodes:
- LocationInstances - [mandatory] - contains information about features collection.
- Hierarchy - [mandatory] - contains information about relations collection.
-->
<GazetteerMapping identifier="KerikeriGazetteerID">
<!--
<LocationInstances> - [mandatory] contains information about features collection. It is features container.
<LocationInstance> attributes:
- namespace - [mandatory] the namespace of the served features
- prefix - [mandatory] the prefix mapping to the namespace of the served features
<LocationInstance> child nodes:
- Feature - [mandatory] the feature collection.
-->
<LocationInstances namespace="http://www.intergraph.com/geomedia/gml" prefix="gmgml">
<!--
<Feature> - one feature maps one table in the database. You should configure as many features as Gazetteer service should serve.

Feature attributes:
- table - [mandatory] the name of mapped table in the database.
- id - [mandatory] the name of id field for this table in the database.
- alias - [optional] the alias name for table (abstract name for this feature). Default value: table name .If alias is not set, then default value is used.

Feature child nodes:
- FieldAliases - [optional] contains information about fields' aliases.
- GeographicIdentifier - [mandatory] mapping for geographic identifier. For more information, see SI_LocationInstance attributes in Gazetteer Service specification.
- AlternativeGeographicIdentifier - [optional] mapping for alternative geographic identifier. For more information, see SI_LocationInstance attributes in Gazetteer Service specification.
- GeographicExtent - [optional] mapping for geographic extent. For more information, see SI_LocationInstance attributes in Gazetteer Service specification.
- Administrator - [optional] mapping for administrator. For more information, see SI_LocationInstance attributes in Gazetteer Service specification.
- Position - [optional] mapping for position attribute. For more information, see SI_LocationInstance attributes in Gazetteer Service specification.
- LocationType - [optional] mapping for location type. For more information, see SI_LocationInstance attributes in Gazetteer Service specification.
- Exclude - [optional] contains the list of fields that should be excluded.
- SqlFilter - [optional] contains additional SQL filter.
-->
<Feature table="NZ_Street_Address_Electoral" id="OBJECTID" alias="Address">
<!--
In <FieldAliases> tag, you can define the collection of <FieldAlias> tags. One field alias maps one field in the database.

<FieldAliases> attributes:
- alias - [mandatory] the new alias name for the database field.
- fieldName - [mandatory] the name of the database field.
Please note that the alias names should not be equal to gazetteer special field names i.e. "geographicIdentifier".
-->
<FieldAliases>
<FieldAlias alias="Address" fieldName="address" />
<!--<FieldAlias alias="Name" fieldName="LocalityName" />-->
</FieldAliases>
<!--
GeographicIdentifier attributes:
- fieldName - [mandatory] the database field name that should be mapped to geographicIdentifier attribute.
-->
<GeographicIdentifier fieldName="address" />
<!--
AlternativeGeographicIdentifier attributes:
- fieldName - [mandatory] the database field name that should be mapped to alternativeGeographicIdentifier attribute.
-->
<AlternativeGeographicIdentifier fieldName="address" />

<!--
GeographicExtent attributes:
- type - [mandatory] the type of the geographicExtent attribute. The possible types are "geographicDescriptionField" (geographic extent should be sourced from one of fields) or "geographicDescriptionText" (geographic extent is provided as a constant in configuration).
- fieldName - [optional] the field name that should be mapped to geographicExtent attribute. Please note that this attribute is required if geographicExtent type value is set to "geographicDescriptionField"; in the other case, attribute is omitted.
- extentText - [optional] the constant value of geographicExtent attribute. Please note that this attribute is required if geographicExtent type value is set to "geographicDescriptionText"; in the other case, attribute is omitted.
-->
<GeographicExtent type="geographicDescriptionField" fieldName="SHAPE" />
<!--
Administrator attributes:
- roleCodeValue - [mandatory] the role of the resource provider. For more info please see ISO 19115 specification (A.3.2).
- roleCodeList - [mandatory] the role code list. For more info please see ISO 19115 specification (A.3.2).
- organizationName - [optional] the organization name.
- individualName - [optional] the individual name.
- positionName - [optional] the position name.
Please note that the count of individualName + organisationName + positionName must be > 0
-->
<Administrator roleCodeValue="owner" roleCodeList="www.example.com" organizationName="Kerikeri" />
<!--
Position attributes:
- type - [optional] the type of the position attribute.
The possible types are:
- "AnyGeometry" (position should be calculated as CENTERPOINT of arbitrary geometry taken from field),
- "PointGeometry" (position should be taken from field containing point geometry),
- "PointXY" (position should be generated from two fields containing X and Y coordinate),
- "RelatedTable" (position should be calculated as a CENTERPOINT of merged geometries of child records using defined relation).

Position child nodes:
<AnyGeometry> - [optional] tag is required if position type value is set to "AnyGeometry"; in the other case, tag is omitted.
<PointGeometry> - [optional] tag is required if position type value is set to "PointGeometry"; in the other case, tag is omitted.
<PointXY> - [optional] tag is required if position type value is set to "PointXY"; in the other case tag is omitted.
<RelatedTable> - [optional] tag is required if position type value is set to "RelatedTable"; in the other case, tag is omitted.
-->
<Position type="PointGeometry">
<!--
PointGeometry attributes:
- fieldName - [mandatory] the field name with point field. The position should be taken from this field.
-->
<PointGeometry fieldName="SHAPE" />
</Position>
<!--
LocationType childNodes:
- Name - [mandatory] locationType name.
- Id - [mandatory] locationType id.
- Theme - [mandatory] locationType theme.
- Description - [mandatory] locationType description.
- Definition - [mandatory] locationType definition.
- Owner - [mandatory] locationType owner.
-->
<LocationType>
<!--
LocationType children common attributes:
- type - [mandatory] the type of the locationType attribute.

The possible types are:
- "DbField" (location type should be sourced from one of database fields),
- "Constant" (location type is provided as a constant in configuration).

LocationType child nodes:
<Constant> - [optional] tag is required if position type value is set to "Constant"; in the other case, tag is omitted.
<Field> - [optional] tag is required if position type value is set to "DbField"; in the other case, tag is omitted.
-->
<Name type="Constant">
<!--
Field attributes:
- name - [mandatory] the field name with name.
NOTE!!! The field in the database must have NOT NULL contraint set.
If a null value for locationType name is provided an exception will be returned.
-->
<!--Field name="nameField"/-->
<!--
Constant attributes:
- name - [mandatory] the constant value of name.
-->
<Constant name="Address" />
</Name>
<Id type="Constant">
<!--
Field attributes:
- name - [mandatory] the field name with id.
-->
<!--Field name="idField"/-->
<!--
Constant attributes:
- name - [mandatory] the constant value of id.
-->
<Constant name="id" />
</Id>
<Theme type="Constant">
<!--
Field attributes:
- name - [mandatory] the field name with theme.
-->
<!--Field name="themeField"/-->
<!--
Constant attributes:
- name - [mandatory] the constant value of theme.
-->
<Constant name="Landbase" />
</Theme>
<Definition type="Constant">
<!--
Field attributes:
- name - [mandatory] the field name with definition.
-->
<!--Field name="definitionField"/-->
<!--
Constant attributes:
- name - [mandatory] the constant value of definition.
-->
<Constant name="definition" />
</Definition>
<Description type="Constant">
<!--
Field attributes:
- name - [mandatory] the field name with description.
-->
<!--Field name="descriptionField"/-->
<!--
Constant attributes:
- name - [mandatory] the constant value of description.
-->
<Constant name="description" />
</Description>
<Owner type="Constant">
<!--
Field attributes:
- name - [mandatory] the field name with owner.
-->
<!--Field name="ownerField"/-->
<!--
Constant attributes:
- name - [mandatory] the constant value of owner.
-->
<Constant name="owner" />
</Owner>
</LocationType>
<!--
Exclude attributes:
- fieldNames - [mandatory] type a comma separated list of fields, which should be excluded from response.
-->
<!--Exclude fieldNames="temp1,temp2" /-->
<!--
SqlFilter attributes:
- sqlExpression - [mandatory] an appropriate sql WHERE clause (FILTER property on GWM OriginatigPipe)
i.e. "Name IS NOT NULL" (records where Name is null will be omitted)
-->
<SqlFilter sqlExpression="address is NOT NULL" />
</Feature>
<Feature table="NZ_Primary_Land_Parcels" id="OBJECTID">
<GeographicIdentifier fieldName="search_appellation"/>
<GeographicExtent type="geographicDescriptionField" fieldName="SHAPE"/>
<Administrator roleCodeValue="owner" roleCodeList="www.example.com" organizationName="Sample Organization"/>
<Position type="AnyGeometry">
<AnyGeometry fieldName="SHAPE"/>
</Position>
<LocationType>
<Name type="Constant">
<Constant name="Land Parcel"/>
</Name>
<Id type="Constant">
<Constant name="OBJECTID"/>
</Id>
<Theme type="Constant">
<Constant name="Landbase"/>
</Theme>
<Definition type="Constant">
<Constant name="definition"/>
</Definition>
<Description type="Constant">
<Constant name="description"/>
</Description>
<Owner type="Constant">
<Constant name="LINZ"/>
</Owner>
</LocationType>
</Feature>
</LocationInstances>

...

Occasional Contributor
Posts: 12
Registered: ‎10-14-2015

Re: do not work SQL Server 2008 Spatial with WFS-G??

Hello ShaunF and everyone

thankyou very much,

 

mi error was the connectioType, I was using SQLServerRO. with your help my service is working fine.

 

 

best regards!!!

David

Do you need immediate support?
If you encounter a critical issue and need immediate assistance please submit a Service Request through our Support Portal.