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
Occasional Contributor
Posts: 11
Registered: ‎10-05-2018
Accepted Solution

Gazetteer example

Hello,

Where can I find a Gazetteer example (database+webconfig)?

I want to create a search in Publisher as easy to use as the search from Consumer Portal and I don't find any example for Gazetteer database (I nead at least 1 feature class) and webconfig.

Thank you!

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

Re: Gazetteer example

Hi MiVoinea,

 

Please see attached sample web.config for WebMap's WFS-G. It uses USSampleData.mdb from a standard location.

 

Regards,

Jan

Jan Neumann
Post Sales Engineer Web Applications
Hexagon Geospatial

Highlighted
Occasional Contributor
Posts: 11
Registered: ‎10-05-2018

Re: Gazetteer example

Many thanks Jan, I will try this.

Mircea

Highlighted
Occasional Contributor
Posts: 11
Registered: ‎10-05-2018

Re: Gazetteer example

Jan, I succesfully generated and use a Gazetteer sample based on your webconfig.

I have 2 questions:

  1. Where is Gazetteer Service specification? It's mentioned in webconfig ,,For more information, see SI_LocationInstance attributes in Gazetteer Service specification."
  2. Can I search for a county and center to geometry (bounding box), instead of centerpoint?

Thanks,

Mircea

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

Re: Gazetteer example

Hi Mircea,

 

  1. That is a reference to OGC standard specification. You can download it (PDF) from here:
    https://portal.opengeospatial.org/files/?artifact_id=7175
    OR see best practices document:
    http://portal.opengeospatial.org/files/?artifact_id=15529
  2. The SI_LocationInstance provides only of position which is used for locating the results on the map. There's also geographicExtent element, but it's used for description of the located results.
    Anyway, you can predefine a default zoom level when using the Live Search (from the top toolbar):
    https://hexagongeospatial.fluidtopics.net/reader/Ri9h_prdpLccXjehuNAyVQ/zMzPwSwU8P1PGLxThQ43vQ

Jan

Jan Neumann
Post Sales Engineer Web Applications
Hexagon Geospatial

Highlighted
Occasional Contributor
Posts: 11
Registered: ‎10-05-2018

Re: Gazetteer example

Thanks again.

Another question:

I adapted webconfig for a MS SQL Database for two tables, postal numbers and streets.

All works ok except for street search; it didn't use wildcards (only accepts full values). For postal numbers if i search for "2" returns all postal numbers that starts withs "2" (2, 24, etc) but not 2A, 12 (that are in database).

My sintax is:

 

 <Feature table="V_ARTERE_INTEGRARE" id="ID" alias="Artere">

<GeographicIdentifier fieldName="NUME_ARTERA_CONCATENAT" />
<GeographicExtent type="geographicDescriptionField" fieldName="LOCALITATE" />

<Position type="AnyGeometry">
<AnyGeometry fieldName="Geometry" />
</Position>

<LocationType>
<Name type="Constant">
<Constant name="Artera" />
</Name>
<Id type="Constant">
<Constant name="ID" />
</Id>

..............

<Feature table="V_ADRESE_ACTUAL" id="ID" alias="Adrese">
<GeographicIdentifier fieldName="NR_POSTAL" />
<GeographicExtent type="geographicDescriptionField" fieldName="ADRESA" />
<Administrator roleCodeValue="owner" roleCodeList="www.example.com" organizationName="Sample Organization" />
<Position type="PointGeometry">
<PointGeometry fieldName="Geometry" />
</Position>
..............
<LocationType>
<Name type="DbField">
<Field name="NUME_ARTERA" />
</Name>
<Id type="Constant">
<Constant name="id" />
</Id>

 

...........

<DatabaseSpecialCharacters wildcardCharacter="%" singleCharMatchCharacter="_" escapeCharacter="\" useEscapeClause="true"/>

 

V_ADRESE_ACTUAL and V_ARTERE_INTEGRARE are db views with Geomedia medatada; all fields are text except ID (number) and NUME_ARTERA_CONCATENAT which is memo.

 

What is wrong?

Also, where can I change "Type" label to "Description" both from Live search and in Search Geographic name?

Thank you!

 

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

Re: Gazetteer example

The settings incl. DatabaseSpecialCharacters seem correct.

  • What is the table definition?
  • Please enable DEBUG log level in web.config (log4net section) and re-try the search. Then look for log entry similar to:
    Getting database recordset feature='Counties' sqlfilter=' ( ( ( NUME_ARTERA_CONCATENAT) LIKE ( '2%' ) ESCAPE '\' ) ) '
    • Try to run same SELECT query directly in the database and see what it returns.

Jan

 

Jan Neumann
Post Sales Engineer Web Applications
Hexagon Geospatial

Highlighted
Occasional Contributor
Posts: 11
Registered: ‎10-05-2018

Re: Gazetteer example

Very strange.

In log I have:

WFSGOriginatingPipe.FilterCapabilities.LiteralOperator [(null)] - Literal serialized to: 'Andrei%'

...............

Getting database recordset feature='V_ARTERE_INTEGRARE' sqlfilter=' ( ( ( NUME_ARTERA_CONCATENAT ) LIKE ( 'Andrei%' ) ESCAPE '\' ) ) '.

 

Of course, in SQL sintax

select * from V_ARTERE_INTEGRARE where ( ( ( NUME_ARTERA_CONCATENAT ) LIKE ( 'Andrei%' ) ESCAPE '\' ) ) 

returns nothing.

 

Correct sintax is

Getting database recordset feature='V_ARTERE_INTEGRARE' sqlfilter=' ( ( ( NUME_ARTERA_CONCATENAT ) LIKE ( '%Andrei%' ) ESCAPE '\' ) ) ', so it misses % character before string.

 

Mircea

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

Re: Gazetteer example

Try to search the name with asterisk symbol before the term - *Andrei

Jan Neumann
Post Sales Engineer Web Applications
Hexagon Geospatial

Highlighted
Occasional Contributor
Posts: 11
Registered: ‎10-05-2018

Re: Gazetteer example

[ Edited ]

Yes, that worked.

 

In log:

Getting database recordset feature='V_ARTERE_INTEGRARE' sqlfilter=' ( ( ( NUME_ARTERA_CONCATENAT ) LIKE ( '%andrei%' ) ESCAPE '\' ) ) '