Quantcast
Channel: OpenCities Map Wiki
Viewing all articles
Browse latest Browse all 1284

- Key-ins to created queries incorporating a simple WHERE

$
0
0
Current Revision posted to Bentley Map | OpenCities Map Wiki by Inga Morozoff on 11/18/2019 6:39:27 PM

As an administrator for Bentley Map, you might prefer to create pre-defined connection parameters that can be used with the GDI CONNECT and GDI QUERY keyins. Doing so will enable you to place a library of keyins on a menu bar, custom tool box or function keys. This will streamline production workflows and eliminate errors from incorrectly defined search criteria.

Since GDI keyins do not provide the ability to specify a WHERE clause, the following content describes a workaround that may be of interest if simple search criteria are needed.

In this example, I have a named connection Nash where the property symbologies are defined in the Bentley Geospatial Administrator.

The Parcels feature has a Where Clause defined as (HEATING_FUEL = Electric)

This connection can be saved to an XML file by using Save As XML in the Connection Tools icon bar. While the content of the file is XML, the extension is ORAX.

Once the ORAX files are created, you can use them with the GDI CONNECT keyin:

 GDI CONNECT FILE=FileName USER=UserName PASSWORD=Password.

 

Note: The ORAX file stores the Oracle OpenParameters which includes the User, Host, Service and Port but not the Password.

GDI CONNECT FILE=C:\Data\Nash\ParcelsElectric.orax PASSWORD=nash

 

To query the just the parcels with the Where Clause, the following keyin can be executed:

GDI QUERY FEATURE=Parcels VIEW 1

 

To eliminate a datapoint to accept the processing, append the POINT AB keyin.

GDI QUERY FEATURE=Parcels VIEW 1;POINT AB

Note: Care should be taken to ensure that the Apply Where Clause is enabled:

Alternate methods of setting up queries with search parameters might include:

  • Set up and query views in the database rather than using searches in Bentley Map.
  • Create a COM server that encapsulates some of the functionality available in the Bentley Map Interoperability API which is delivered as managed .NET assemblies. After encapsulating the Interoperability functionalities in a simple COM server, create a VBA application that uses the COM server to perform various Oracle Spatial Interoperability functions including the use of Where critera for searching and querying.
  • Lastly,  the use Live DGN might be helpful.  Live DGN contains the connection parameters to the features defined in the connection. When the DGN file is opened, a password will be requested and the connection made. At that point all of the requested features will be queried into the DGN. Note that his is for Oracle Spatial only.

For more information regarding the GDI family of commands, please refer to:

Spatial Database Keyins

Tags: Spatial, Querying, GDI

Viewing all articles
Browse latest Browse all 1284

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>