Download - Bentley Communities - Citygml - Help Document...Bentley Map Enterprise (SELECTseries 2). Macros from the Project Manager When the macros have been used at least once, they are automatically

Transcript
Page 1: Bentley Communities - Citygml - Help Document...Bentley Map Enterprise (SELECTseries 2). Macros from the Project Manager When the macros have been used at least once, they are automatically

CityGML XFM Application Template

Help Document

Bentley Map V8i (SELECTseries 3)

Page 2: Bentley Communities - Citygml - Help Document...Bentley Map Enterprise (SELECTseries 2). Macros from the Project Manager When the macros have been used at least once, they are automatically

ii

Copyright © 2013 Bentley Systems, Incorporated Table of Contents

CityGML XFM Application Template, Help Document

Table of Contents

Introduction to CityGML ________________________________________________ 1

CityGML XFM Application Template _______________________________________ 2

Requirements ________________________________________________________________________ 2

Finding Documentation _________________________________________________________________ 2

To open a CityGML Workspace ___________________________________________________________ 3

Using the Command Manager ___________________________________________________________ 4

Importing/Exporting CityGML with FME ____________________________________________________ 5

Using Macros _________________________________________________________ 6

Macros from the Command Manager ______________________________________________________ 6

Macros from the Project Manager ________________________________________________________ 6

“Promote_from_2D_Shape” Macro _______________________________________ 8

To run the “Promote_from_2D_Shape” Macro _______________________________________________ 8

“Promote_from_3D_Solid” Macro _______________________________________ 12

To run the “Promote_from_3D_Solid” Macro _______________________________________________ 12

Page 3: Bentley Communities - Citygml - Help Document...Bentley Map Enterprise (SELECTseries 2). Macros from the Project Manager When the macros have been used at least once, they are automatically

1

Copyright © 2013 Bentley Systems, Incorporated Introduction to CityGML

CityGML XFM Application Template, Help Document

Introduction to CityGML

CityGML is a standard that is getting more and more popularity for 3D urban models. Here is how it is

described on the CityGML official website:

“CityGML is a common information model for the representation of 3D urban objects. It defines the

classes and relations for the most relevant topographic objects in cities and regional models with

respect to their geometrical, topological, semantical and appearance properties. Included are

generalization hierarchies between thematic classes, aggregations, relations between objects, and

spatial properties. This thematic information go beyond graphic exchange formats and allow to

employ virtual 3D city models for sophisticated analysis tasks in different application domains like

simulations, urban data mining, facility management, and thematic inquiries.

CityGML is realized as an open data model and XML-based format for the storage and exchange of

virtual 3D city models. It is implemented as an application schema for the Geography Markup

Language 3 (GML3), the extendible international standard for spatial data exchange issued by the

Open Geospatial Consortium (OGC) and the ISO TC211. CityGML is intended to become an open

standard and therefore can be used free of charge.”

More information and resources can be found on the CityGML official website:

http://www.citygml.org/

The OGC official website also contains information on this standard:

http://www.opengeospatial.org/standards/citygml

Page 4: Bentley Communities - Citygml - Help Document...Bentley Map Enterprise (SELECTseries 2). Macros from the Project Manager When the macros have been used at least once, they are automatically

2

Copyright © 2013 Bentley Systems, Incorporated CityGML XFM Application Template

CityGML XFM Application Template, Help Document

CityGML XFM Application Template

The CityGML XFM application template was designed to let Bentley Map users quickly get up and running to

start creating intelligent 3D objects (features) compliant to the OGC CityGML standard.

Requirements

The minimum and maximum installation requirements for this application template are as follows:

Prerequisite Product Bentley Map PowerView, Bentley Map, Bentley Map Enterprise

Version 08.11.09.xxx

Language English

Finding Documentation

The present document provides information on how to use the CityGML XFM application template.

You can also refer to the Bentley Map product documentation:

http://docs.bentley.com/en/Map/MicroStationMaphelp0.html

Page 5: Bentley Communities - Citygml - Help Document...Bentley Map Enterprise (SELECTseries 2). Macros from the Project Manager When the macros have been used at least once, they are automatically

3

Copyright © 2013 Bentley Systems, Incorporated CityGML XFM Application Template

CityGML XFM Application Template, Help Document

To open a CityGML Workspace

To open a CityGML workspace:

1. Start Bentley Map.

2. In the “File Open” dialog, select the appropriate user for the CityGML application template as shown

below.

3. Open a DGN file or create a new one.

You are now ready to start using Bentley Map to create CityGML compliant data.

Page 6: Bentley Communities - Citygml - Help Document...Bentley Map Enterprise (SELECTseries 2). Macros from the Project Manager When the macros have been used at least once, they are automatically

4

Copyright © 2013 Bentley Systems, Incorporated CityGML XFM Application Template

CityGML XFM Application Template, Help Document

Using the Command Manager

The Command Manager contains methods to easily create CityGML features. You can either create new

features with “Place” methods, or create features from existing elements with “Promote” methods. To do so,

double-click on the tool and follow the instructions.

If you need more information on how to use the standard Command Manager tools , refer to

the Bentley Map product documentation:

http://docs.bentley.com/en/Map/MicroStationMaphelp15.html

Page 7: Bentley Communities - Citygml - Help Document...Bentley Map Enterprise (SELECTseries 2). Macros from the Project Manager When the macros have been used at least once, they are automatically

5

Copyright © 2013 Bentley Systems, Incorporated CityGML XFM Application Template

CityGML XFM Application Template, Help Document

Importing/Exporting CityGML with FME

The FME plug-in allows you to import or export CityGML data directly from Bentley Map. To do so, use the

tools available in the “File” menu.

For more information on how to use the FME plug-in, refer to the Bentley Map product documentation:

http://docs.bentley.com/en/Map/MicroStationMaphelp76.html

Note: While importing or exporting CityGML data, ensure to select only features and properties that are

defined in the CityGML format. For example, it is possible to import into a DGN file features that are

not defined in the CityGML format. However, trying to export these features into CityGML will result

in schema mapping conflicts. To solve such conflicts, uncheck the problematic features in the FME

dialog so that they will not be exported.

Page 8: Bentley Communities - Citygml - Help Document...Bentley Map Enterprise (SELECTseries 2). Macros from the Project Manager When the macros have been used at least once, they are automatically

6

Copyright © 2013 Bentley Systems, Incorporated Using Macros

CityGML XFM Application Template, Help Document

Using Macros

Macros from the Command Manager

Two MVBA macros have been created to make it even easier to work with the CityGML application template.

One of them can promote 3D solids to XFM Building features. The other one takes 2D shapes, extrudes them

and then promotes the resulting solids to XFM Building features. The following sections of the present

document provide the detailed procedures of how to use the macros. The macros can be used as any other

tool in the Command Manager.

Note: These two macros are only available if you use Bentley Map (SELECTseries 2) for MicroStation or

Bentley Map Enterprise (SELECTseries 2).

Macros from the Project Manager

When the macros have been used at least once, they are automatically loaded in the VBA Project Manager.

Use the VBA Project Manager to run macros, or to start the Visual Basic Editor for adapting the macros to

your specific needs. Note that you can get the location of the macros on your computer from the VBA Project

Manager. It is recommended to make a copy of the macro before changing it.

Page 9: Bentley Communities - Citygml - Help Document...Bentley Map Enterprise (SELECTseries 2). Macros from the Project Manager When the macros have been used at least once, they are automatically

7

Copyright © 2013 Bentley Systems, Incorporated Using Macros

CityGML XFM Application Template, Help Document

To access the VBA Project Manager, use the “Utilities” menu.

For more information on how to work with macros, refer to the MicroStation product documentation:

http://docs.bentley.com/en/MicroStation/ustnhelp1652.html#nowhere

Page 10: Bentley Communities - Citygml - Help Document...Bentley Map Enterprise (SELECTseries 2). Macros from the Project Manager When the macros have been used at least once, they are automatically

8

Copyright © 2013 Bentley Systems, Incorporated “Promote_from_2D_Shape” Macro

CityGML XFM Application Template, Help Document

“Promote_from_2D_Shape” Macro

Use this macro to easily create 3D XFM buildings from 2D footprints. If these footprints are 2D XFM features,

the macro will use values from a property specified by the user to vertically extrude the selected shapes. It

will then promote these new solids to XFM Building instances and initialize the “gml_ID” and

“citygml_level_of_detail” properties. A random unique value is created for the ID, while the level of detail is

set to 1.

To run the “Promote_from_2D_Shape” Macro

1. In the “Promote from 2D Shape Macro” dialog, choose a Selection mode.

2. Select each 2D shape to process, or place a fence around the feature(s) to process.

3. In the “Promote from 2D Shape Macro” dialog, click the “Process” button.

The “Choose Feature and Extrusion Property” dialog displays.

Note: To be valid, 2D shapes must be XFM features. If no valid features are found in the selection

set or in the fence, an error message will display after clicking the “Process” button. This

message invites you to try another selection.

4. In the “Choose Feature and Extrusion Property” dialog, select a valid feature.

If there are several features in the selection set or in the fence, only one of them must be selected.

As the feature is selected, the property field is initialized with the feature’s properties.

Page 11: Bentley Communities - Citygml - Help Document...Bentley Map Enterprise (SELECTseries 2). Macros from the Project Manager When the macros have been used at least once, they are automatically

9

Copyright © 2013 Bentley Systems, Incorporated “Promote_from_2D_Shape” Macro

CityGML XFM Application Template, Help Document

Note: If many features need to be processed, using a fence presents an advantage, since it is not

deleted during the process. This way, the macro can be used several times, with the same

fence, to promote multiple features.

5. Choose which property contains the building heights that are required for the extrusion.

Note: Any property of any type can be chosen. However, values which are not numbers will be

treated as “0”. Strings are converted into numbers, but if the conversion fails, they are

treated as “0” too. With strings, be careful with the decimal symbol (“,” or “.”).

By default, the property is considered to designate the building height. However, it is possible to

choose a property upon the number of floors of the buildings. In this case, turn on the “Number of

floors” option. This will enable the next part of the dialog and allow you to define the floor height.

6. (Optional) – Choose the floor height.

The floor height is a value that is multiplied to the extrusion height value when this latest is a number

of floors. If the floor height varies from one building to another, you can choose the feature’s

property in which these values are stored. On the other hand, you can enter a constant value that

will be used for every building.

Page 12: Bentley Communities - Citygml - Help Document...Bentley Map Enterprise (SELECTseries 2). Macros from the Project Manager When the macros have been used at least once, they are automatically

10

Copyright © 2013 Bentley Systems, Incorporated “Promote_from_2D_Shape” Macro

CityGML XFM Application Template, Help Document

Note: Invalid values for the floor height property are treated exactly the same way as for the

extrusion height property.

7. (Optional) – Select the “Manually merge several features into buildings” option to merge several

solids together during the process.

By default, each feature instance is a distinct building and each selected shape is individually

promoted to a building. By turning on this option, the macro’s process will be interrupted to allow

you to manually merge solids together before being promoted. Unfortunately, the macro cannot do

the merge automatically since it does not know which solid has to be merged with which other solids.

8. In the “Choose Feature and Extrusion Property” dialog, click “OK”.

The “Unite Solids Step” dialog will open.

Page 13: Bentley Communities - Citygml - Help Document...Bentley Map Enterprise (SELECTseries 2). Macros from the Project Manager When the macros have been used at least once, they are automatically

11

Copyright © 2013 Bentley Systems, Incorporated “Promote_from_2D_Shape” Macro

CityGML XFM Application Template, Help Document

9. Put the “Unite Solids Step” dialog aside and proceed to merge solids together by using the “Unite

Solids” tool in the “Solids Modeling” taskbar.

For more information on how to use this tool, refer to the MicroStation product documentation:

http://docs.bentley.com/en/MicroStation/ustnhelp1045.html#F29792

Note: Only solids on the specified level will be promoted in the later part of the process. Any work

on other levels will not affect the macro. Also note that closing the “Unite Solids Step” dialog

with the “X” button will interrupt the process and cancel anything that has been done.

10. When you are done with the “Solids Modeling” tool, click “Continue” in the “Unite Solids Step” dialog

to finish the process.

Page 14: Bentley Communities - Citygml - Help Document...Bentley Map Enterprise (SELECTseries 2). Macros from the Project Manager When the macros have been used at least once, they are automatically

12

Copyright © 2013 Bentley Systems, Incorporated “Promote_from_3D_Solid” Macro

CityGML XFM Application Template, Help Document

“Promote_from_3D_Solid” Macro

Use this macro to easily create 3D XFM Buildings from 3D solids. These buildings are assigned a random

unique ID and their “citygml_level_of_detail” property is set to 1.

If the selected solids are of LoD1 type, they can simply be promoted to XFM Buildings. If they are of LoD2

type, it is possible with this macro to create LoD1 buildings from their footprints. The original solids are then

promoted to XFM Wall, Ground and Roof features. These features receive a random unique ID, their parent’s

ID (ID of the LoD1 building) and their “citygml_level_of_detail” property is set to 2.

To run the “Promote_from_3D_Solid” Macro

1. In the “Promote from 3D Solid Macro” dialog, choose a selection mode.

2. Select each 3D solid to process, or place a fence around them.

Note: Valid entry element types for this macro are solid, smartSolid or mesh. Elements with a non

planar face are invalid since only planar shapes can be promoted to XFM features.

Page 15: Bentley Communities - Citygml - Help Document...Bentley Map Enterprise (SELECTseries 2). Macros from the Project Manager When the macros have been used at least once, they are automatically

13

Copyright © 2013 Bentley Systems, Incorporated “Promote_from_3D_Solid” Macro

CityGML XFM Application Template, Help Document

3. In the “Feature creation mode” section, specify which feature type to create.

a. Turn on the “Create only LoD1 features” option to promote the selected solids to XFM

Buildings as they are.

A random unique ID is entered in the “gml_ID” property and the “citygml_level_of_detail”

property is set to 1 for each new building instance.

b. Turn on the “Create LoD1 and LoD2 features” option to create simpler solids based on the

original solids’ footprints and heights. These new solids are then promoted to XFM Buildings

the same way as for the “Create only LoD1 features” option.

The second part of the process is to determine the orientation of the shapes constituting the

original solids. Depending on their orientation, shapes are promoted to XFM roof, wall or

ground features.

Note: In order to correctly distinguish each feature, the condition stated at the bottom of

the dialog must be respected.

4. In the “Promote from 3D Solid Macro” dialog, click the “Process” button to start the process.