Bentley Communities
Bentley Communities
  • Site
  • User
  • Site
  • Search
  • User
  • Welcome
  • Products
  • Support
  • About
  • More
  • Cancel
Bentley Map | OpenCities Map
  • Product Communities
  • Geospatial
  • Bentley Map | OpenCities Map
  • More
  • Cancel
Bentley Map | OpenCities Map
Bentley Map | OpenCities Map Wiki - Import Oracle data using VRT
    • Sign in
    • -Bentley Map | OpenCities Map Wiki
      • -OpenCities Map
        • Working from home with OpenCities Map
        • +Release Information
        • +Installation Information
        • +Getting Started
        • +Administration
        • +General Topics
        • +Geospatial Administrator
        • -Interoperability
          • - Add properties to MicroStation elements without a Map project
          • - Add properties to SHP files using Map
          • - Apply symbology when importing Esri Shapefiles
          • - Assign attributes when importing Shapefiles
          • - Connect to ESRI File Geodatabase
          • - Convert numerical properties upon import from SHP
          • - Create a join between Microsoft Excel and Esri Shapefile data
          • - Create join to SHP file to update properties
          • - Export arcs and stroking tolerance
          • - Export textures to CityGML
          • - Export thematic symbology to MicroStation
          • - Export to Esri Shapefile format
          • - Export to Google Earth, polygon issues
          • - Export to Shapefile makes two Shapefiles
          • - Exporting a DGN to shapefile with properties
          • - File Geodatabase and Custom Coordinate Systems
          • - File Geodatabase reports unknown spatial reference
          • - Import coordinate and property information from an XLS or CSV file
          • - Import INSPIRE GML using FME (Video)
          • - Import multiple folders of Shapefiles by using GDI key-ins
          • - Import Oracle data using VRT
          • - Import requirements for geospatial file formats
          • - Import text strings from point SHP properties
          • - Importing 3D shapefiles with elevation
          • - Interoperability key-ins
          • - Key-in to execute import for an IMPX file
          • - Limitations of Esri File Geodatabase support
          • - MXD files
          • - Protecting Bentley Map design file data in a MicroStation session
          • - Queries are not undoable
          • - Selecting specific feature properties when importing Shapefiles
          • - VRT file parameters to import Points, Lines, and Polygons
          • - VRT files to import ODBC and CSV data sources
        • +Spatial Databases
        • +Spatial Analysis
        • +3D Geospatial
        • +Geographic Coordinate Systems
        • +Troubleshooting
        • +Freeware - Utilities - Applications - Programs
        • +Advanced Map Finishing
        • +Bentley Cadastre
      • Bentley Descartes
      • +Other Geospatial Products
      • +Bentley Map Mobile
      • +Bentley Map Mobile Publisher

     
     Questions about this article, topic, or product? Click here. 

    - Import Oracle data using VRT

    Bentley Map has been able to import a variety of data using the VRT capabilities from its GDAL commands. One of the little-known types that can be imported is the Oracle Object-Relational format, the precursor to Oracle Spatial. This note will illustrate how to accomplish importing a table of Object-relational data that contains X, Y columns using the OCI (Oracle Call Interface) option into Bentley Map and create a feature layer in the DGN file.

    In this example, we show how to setup to import data from an Oracle database using a Point feature table. The XY values will be used as the spatial reference to import the feature into Bentley Map. The import process will retain all of the other properties that are defined for that feature.

    The screen shot below shows the data as it exists in the Oracle database. We will be importing all of these Monument features into Bentley Map. 

     

     

    What is the VRT file?

    The VRT (Virtual Datasource) file describes the datasource so that it can be easily imported into Bentley Map. It is an XML format file that describes the format of the source data. See the appendix for more details on VRT capabilities.

    A sample VRT file is shown below. Each line of the file defines a different aspect of the source data.


     

    If we look at these lines separately, the breakdown is as follows:

    <OGRVRTLayer name=”Monument”> = Name of Feature (to be imported).

    <SrcDataSource>OCI:bentley/bentley@TSGorcl11G:MONUMENTS</SrcDataSource> = Source for feature. The connection string should be added to this line in the format username/password@databasename.

    <SrcLayer>MONUMENTS</SrcLayer> = Oracle Table name that we are connecting to. This is required when the Oracle database is not Spatial.

    <GeometryType>wkbPoint</GeometryType> = The Type of Feature to be imported.

    <LayerSRS>WGS84<LayerSRS> = Spatial Reference.

    <GeometryField encoding=”PointFromColumns” x=”X” y=”Y”/> = The column names containing the X and Y values.

     

    Note: other examples of the VRT file can be found in the Bentley Map Help file.

      

    Once the VRT file has been created, the Bentley Map Interoperability tool will be used to import this file. In Bentley Map, select File > Map Interoperability to open the dialog.

    On the Imports tab of the Interoperability dialog, right-click on the Imports directory and select New Import. A new import Import will be displayed. Right-click on Import1 and select Add File…. On the Open File dialog,  set the File Type drop down to All Files. Browse to the location of the VRT file that was created and open it.

    The feature name defined in the VRT ('Monuments’ in this example) will be listed in the Imports dialog . The data can be imported via a right-click on the feature name.

      

     

    After the import is complete, you will see your features in Bentley Map. The screen shot below shows the results of the sample data that was imported. You can see the features in the view and the feature properties are displayed using both the Data Browser and Analyze tools.


     

     

    Appendix

    GDAL Translator - http://www.gdal.org/

    GDAL Virtual Format - http://www.gdal.org/drv_vrt.html

    GDAL & Oracle Spatial - http://www.gdal.org/drv_oci.html

    Oracle Call Interface - http://www.oracle.com/technetwork/database/features/oci/index-090945.html

    • Oracle
    • import
    • VRT
    • oci
    • gdal
    • Share
    • History
    • More
    • Cancel
    • Kathy Wiggins Created by Bentley Colleague Kathy Wiggins
    • When: Thu, Apr 16 2015 11:15 AM
    • Inga Morozoff Last revision by Bentley Colleague Inga Morozoff
    • When: Tue, Jun 19 2018 4:04 PM
    • Revisions: 6
    • Comments: 0
    Recommended
    Related
    Communities
    • Home
    • Getting Started
    • Community Central
    • Products
    • Support
    • Secure File Upload
    • Feedback
    Support and Services
    • Home
    • Product Support
    • Downloads
    • Subscription Services Portal
    Training and Learning
    • Home
    • About Bentley Institute
    • My Learning History
    • Reference Books
    Social Media
    •    LinkedIn
    •    Facebook
    •    Twitter
    •    YouTube
    •    RSS Feed
    •    Email

    © 2021 Bentley Systems, Incorporated  |  Contact Us  |  Privacy |  Terms of Use  |  Cookies