WebGIS Discussions

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
Staff
Posts: 27
Registered: ‎12-22-2016

Re: Not able to configure WFS-G with oracle and postgis database

Hi Jan,

 

I am getting the log as you specified

 

2017-09-01 13:55:22,686 [83] DEBUG Intergraph.GeoMedia.Web.SDI.Gazetteer.Pipes.WFSGOriginatingPipe.Common.DataAccessManager [(null)] - Getting database recordset feature='GISDATA.STATECAPTITAL' sqlfilter=' ( ( ( NAME ) LIKE ( 'Raj%' ) ESCAPE '\' ) ) '.

But still no result.

 

Regards,

Jai Ram Gaur

 

Highlighted
Technical Evangelist
Posts: 1,275
Registered: ‎09-11-2015

Re: Not able to configure WFS-G with oracle and postgis database

You have to go to the database level and try the query there. Open SQLPlus or SQL Developer and run:

  • SELECT NAME FROM GISDATA.STATECAPTITAL WHERE ( ( ( NAME ) LIKE ( 'Raj%' ) ESCAPE '\' ) );
    or simply
  • SELECT NAME FROM GISDATA.STATECAPTITAL WHERE NAME LIKE 'Raj%';
    or
  • SELECT COUNT(NAME) FROM GISDATA.STATECAPTITAL WHERE NAME LIKE 'Raj%';

What do you get?

 

Jan Neumann
Post Sales Engineer Web Applications
Hexagon Geospatial

Highlighted
Regular Contributor
Posts: 246
Registered: ‎10-26-2015

Re: Not able to configure WFS-G with oracle and postgis database

Jai,

Are you aware that the LIKE operator in Oracle is case sensitive so is there a row in the Oracle database object that starts "Raj"?

 

By default Geospatial Portal will capitalise the first letter of every word entered into a WFS-G search (regardless of how you type it within the interface). This is defined within the parameter "Intergraph.WebSolutions.Core.SDIPortal.WFSG.Gazetteer.NamesExcludedFromCapitalization" of the portal instance web.config file.

 

To work round this issue we have created Oracle Views that use the INITCAP function to create a new column that has the first letter of every word capitalised and then we configure the WFS-G services to query this column so the LIKE operator will work as the strings match.

 

HTH

 

Colin

Highlighted
Staff
Posts: 27
Registered: ‎12-22-2016

Re: Not able to configure WFS-G with oracle and postgis database

Hi Jan,

 

Yes, i am getting result from the query in database.

 

SELECT NAME FROM GISDATA.STATECAPTITAL WHERE ( ( ( NAME ) LIKE ( 'L%' ) ESCAPE '\' ) );

Colin,

 

yes, First alphabet of data is in upper case in our data which we are searching.

 

Regards,

Jai Ram Gaur

 

Highlighted
Regular Contributor
Posts: 246
Registered: ‎10-26-2015

Re: Not able to configure WFS-G with oracle and postgis database

Jai,

Can you enable DEBUG log4net logging on your Geospatial Portal instance and attempt a search again and send us a copy of the portal log file?

Thanks,

Colin

Highlighted
Staff
Posts: 27
Registered: ‎12-22-2016

Re: Not able to configure WFS-G with oracle and postgis database

Hi Colin,

 

As suggested, i have changed portal log level to DEBUG. It is showing some error in logs.

 

2017-09-01 18:03:49,092 [143] WARN Intergraph.WebSolutions.Core.WebClient.Platform.Search.SearchDispatcherHelper [(null)] - NameSearcher thrown an exception: System.InvalidCastException: Unable to cast object of type 'System.Object[]' to type 'System.Double[]'.
at Intergraph.WebSolutions.Core.SDIPortal.WFSG.MapServices.WfsgNameSearcherStrategy.PrepareSearchResult(Feature feature)
at Intergraph.WebSolutions.Core.SDIPortal.WFS.Common.WfsNameSearcher.<SearchForName>d__3.MoveNext()
at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)
at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
at Intergraph.WebSolutions.Core.WebClient.Platform.Search.SearchDispatcherHelper.<BasicSearch>d__9.MoveNext()
2017-09-01 18:03:49,092 [143] INFO Intergraph.WebSolutions.Core.WebClient.Platform.Search.SearchHandler [(null)] - Received at least 0 results from the search services

I am also attaching complete log file of WFS-G service as well as portal.

 

Regards,

Jai Ram Gaur

 

 

Highlighted
Staff
Posts: 27
Registered: ‎12-22-2016

Re: Not able to configure WFS-G with oracle and postgis database

Hi Colin,

 

Forgot to add data schema in last post:

 

  CREATE TABLE "GISDATA"."STATECAPTITAL" 
   (	"NAME" VARCHAR2(38 BYTE), 
	"STATE" VARCHAR2(27 BYTE), 
	"COUNTRY" VARCHAR2(5 BYTE), 
	"GEOMETRY" "MDSYS"."SDO_GEOMETRY" , 
	"ID2" NUMBER(14,0),
    CONSTRAINT STATECAPTITAL_GMIDX PRIMARY KEY ( ID2 )
   ) 

Regards,

Jai

Highlighted
Staff
Posts: 297
Registered: ‎11-05-2015

Re: Not able to configure WFS-G with oracle and postgis database

Is this table in oracle created using GeoMedia through a Oracle Warehouse connection?

It looks as though you have configured your WFS-G in a way that it expects the geometry being returned to be of type PointGeometry:

            <Position type="PointGeometry">
              <!--
              PointGeometry attributes:
                - fieldName - [mandatory] the field name with point field. The position should be taken from this field.
                -->
              <PointGeometry fieldName="GEOMETRY" />
            </Position>

If the GOMETRY column is not actually a PointGeometry it might throw off the WFS-G serializer and in turn the Portal deserializer.

What if you switch the position type to "AnyGeometry"?

Highlighted
Staff
Posts: 27
Registered: ‎12-22-2016

Re: Not able to configure WFS-G with oracle and postgis database

Hi Team,

 

Has any body tried WFS-G on postgres?

Need help for postgres connection string and connection type

 

<WFSGOrigPipe name="origPipe" firstPipe="true" connectionLocation="apollodb@in-g-jgaur" connectionType="PostGISRW.GDatabase" connectionInfo="gisdata/gisdata@in-g-jgaur:5432/apollodb" serviceTitle="Intergraph OGC WFS-G (Gazetteer) Service" serviceFees="none" serviceAccessConstraints="none" defaultCoordsystem="EPSG:4326" swapCoord="true">

Team thanks,

It's working on oracle now i need to do it same for another client on postgres.

 

Regards,

Jai Ram Gaur

Highlighted
Technical Evangelist
Posts: 733
Registered: ‎11-12-2015

Re: Not able to configure WFS-G with oracle and postgis database

Hello Jai,

 

Below is some information on this topic that should help your inquiry.

 

Here is example connection for PostGIS

 

connectionInfo="host=131.163.20.81 dbname=geoname2 user=xxxx password=xxxx port=5432" connectionLocation="" connectionType="PostGISRW.GDatabase"

 

Connection type will be PostGISRW.GDatabase or PostGIS.GDatabase depending on the PostGIS dataserver in use.

Connection Location as you can see is not used.

For Geographicidentifier this will be the attribute searched/returned from the user of WFS-G in Portal. Position type can be any of the four acceptable values.

 

HTH