- Extended Properties (xProps MDL)


We are very pleased to provide the OpenCities Map user community the attached Bentley MDL application that seamlessly extends feature properties to include MicroStation element information such as:  text strings, cell names, cell scales, XY coordinate positions, and latitude/longitude positions.    

This MDL is available for both the CONNECT and V8i generation of OpenCities Map products.

The extended properties are exposed in the Element Information dialog, as well as any dialog you find OpenCities Map XFM properties.  This includes the Data Browser, Interoperability dialog, and several of the Map Manager functions including feature labels, and the search dialog.

Each zip file at the end of this article contains:

Contents

Introduction

The following article discusses the usage and implementation of xprops.ma, a custom OpenCities Map MDL application that seamlessly extends feature properties to include MicroStation element information such as: text strings, cell names, cell scales, XY coordinate positions, and latitude/longitude positions.  

The extended properties are exposed in the Element Information dialog, as well as any dialog you find OpenCities Map XFM properties. This includes the Data Browser, Interoperability dialog, and several of the Map Manager functions including feature labels, and the search dialog.

The following graphic illustrates the Element Information dialog without xprops loaded (left) and the same element with xprops loaded (right).

Installation and Configuration

The xprops application is an MDL program provided with this article. Extract and place copies of the DLL and MA files in either the ...\Map\mdlapps\ or …\MicroStation\mdlapps\ folder.

If desired the configuration variable MS_GEOINITCMD can be defined to automatically load the MDL when an OpenCities Map session is started. This can be done in the Bentley Geospatial Administrator by adding a new entry in the Workspace Macros node:

 If you prefer, you can manually start the application using the keyin

mdl load xprops

To unload the application, use the keyin

mdl unload xprops

This keyin may need to be run twice to fully unload the application from your design session.

Once loaded, the following keyins are available:

KeyinDescription
XPROPS VERSIONDisplays application build time.
XPROPS ON|OFFEnables or disables extended properties for all feature classes.
XPROPS OFF=MyFeatureClassName

Disables extended properties for specific feature class.

For example, to turn off the extended properties for a feature class called Lights, use the keyin

XPROPS OFF=Lights

XPROPS ON=MyFeatureClassName

Enables extended properties for specific feature class.

For example, to turn on the extended properties for a feature class called Lights, use the keyin

XPROPS ON=Lights

Geographic Coordinates

A strength of this application is its ability to recognize the attached Geographic Coordinate System (GCS) and provide you with the latitude and longitude coordinates of your features. The geographic extended properties are described as:

Property NameDescription
_LatitudeThe latitude of the point or vertex expressed in decimals.
_LatitudeStringThe latitude expressed in either decimal degrees or degrees/minutes/seconds.
_LongitudeThe longitude of the point or vertex expressed in decimals.
_LongitudeStringThe longitude expressed in either decimal degrees or degrees/minutes/seconds.

For searching based on geographic locations, use the _Latitude and/or _Longitude properties.

For feature labels and PBA text values, use the string variation which includes the degree symbol.

To control how the string variation is displayed, adjust the design file angle readout to either DD.DDD or DD MM SS. You can find this by navigating to File > Settings > File > Design File Settings > Angle Readout > Format . Changing the angle format is immediate and reflected when the view is updated or dialog is reopened.

 

Deleting the coordinate system from the DGN File will remove the latitude and longitude extended properties that are made available for use in OpenCities Map.

As well, changing the coordinate system from one to another, may require the design file to be closed and reopened in order to display the new geographic coordinates.

Feature Types

The extended properties will vary for each of the feature types: polygon, line and point. 

The following element types are supported by xProps:

Polygon Features: Shape, Closed B-Spline, Complex Shape, Ellipse

Linear Features: Arc, B-spline Curve, Complex Chain, Curve, Line String

Point: Cell, Text

Polygons will show the XY(Z) coordinates of all vertices, and the geographic coordinates of the first vertex.

 

(Polygon Collections are not supported)

The extended properties for Point Cell features includes the cell name, scale, angle in addition to the origin XY(Z) and geographic coordinates.

 

For Point Text features, the text string is returned as well as the origin coordinates. In the graphic below, there is no coordinate system defined in the file. As a result, the latitude/longitude extended properties are not available for display or use.

 

For linear features that consist of a single line, you’ll find the XY(Z) and geographic coordinates for the start and end points as well as the line direction expressed in degrees.

For line strings, the coordinates for all vertices are returned, and the direction is based on the first segment.

Usage

Once loaded, xprops seamlessly extends business properties for all OpenCities Map session data and does this without changing the element or XFM feature instances. In addition, since the extended properties are only available when xprops is running, nothing is written to the design file.

The following examples illustrates just some of the usage of xprops in a typical OpenCities Map project.

Analyze XFM Feature

Review a feature's extended properties with the Analyze XFM Feature tool. The properties are easily recognizable by their underscore prefix. Note that the content ordering of the Analyze Result dialog is controlled by default.xslt.

Data Browser

When using the Data Browser, the extended properties will appear to the right of the XFM properties and are read-only.  

Once loaded, you can use any of the Data Browser tools to refine the display of the rows.

For example:

NOTE: If you do not see the Extended Properties in the Data Browser it could be that the data is from a Query to a Spatial Database, such as ESRI File Geodatabase, SQL Server, or PostGIS.  To see the extended properties in the Data Browser, save the DGN File as a .dgn and the XFM and Extended Properties will be available.

Map Interoperability

Create a Where Clause when exporting features to another GIS format such as ESRI Shapefiles.

Property Based Annotation (PBA)

Knowing that the extended properties can be used anywhere you would also use XFM properties, incorporate them into your schema for generating Property Based Annotation expressions.  

Labeling

The extended properties are available in the Map Manager Labeling dialog as well. In this example, the name of the cell and size is being labeled. Note the use of [XFM.Round([property)].2)] to round up the scale value.

 

Searching

Searching on the extended properties is no different than searching on XFM properties.   When searching on longitude or geographic values, use _Latitude or _Longitude.   This eliminates the need to enter a degree symbol when searching on _LatitudeString and _LongitudeString.

Thematic Resymbolization

When it comes to resymbolizing your map based on properties, the xprop application provides a number of advantages. For example, you can now resymbolize point cell features based the cell name as well as the geographic location.   The ability to create search criteria with both XFM and extended properties allows an infinite number of Map Manager resymbolizing strategies.

Disclaimer

This application is supplied as-is and does not come with Support. Bentley Systems Inc., and the author of this programs assume no liability for damages direct, indirect, or consequential, which may result from the use of this program. Use this application at your own risk.

Downloads

A PDF of this article is available for downloading: 


Download: Choose the appropriate xProps zip file based on your version of OpenCities Map

OpenCities Map CONNECT Edition x64Bentley Map V8i edition x86
communities.bentley.com/.../xprops_5F00_x64.zipcommunities.bentley.com/.../xprops_5F00_x86.zip