Bentley Communities
Bentley Communities
  • Site
  • User
  • Site
  • Search
  • User
OpenCities Map
  • Product Communities
  • Geospatial
  • OpenCities Map
  • Cancel
OpenCities Map
OpenCities Map Wiki - VRT file parameters to import Points, Lines, and Polygons
    • Sign In
    • -OpenCities Map Wiki
      • -OpenCities Map
        • - End of Support for Bentley Map V8i (SELECTseries) products
        • +Release Information
        • +Installation Information
        • +Getting Started
        • +Administration
        • +General Topics
        • +Geospatial Administrator
        • +Feature Definitions and Inference Rules
        • -Interoperability
          • - Add properties to MicroStation elements without a Map project
          • - Add properties to Shapefiles using Map
          • - Apply symbology when importing Esri Shapefiles
          • - Assign attributes when importing Shapefiles
          • - Connect to ESRI File Geodatabase
          • - Convert numerical properties upon import from Shapefile
          • - Create a join between Microsoft Excel and Esri Shapefile data
          • - Create Join to Shapefile 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 OpenCities Map Design File data in a MicroStation session
          • - Queries are not undoable
          • - Selecting specific feature properties when importing Shapefiles
          • - Using SharePoint for Cloud storage
          • - VRT file parameters to import Points, Lines, and Polygons
          • - VRT files to import ODBC and CSV data sources
          • Configuring DGN2DB for Access ODBC
        • +Spatial Databases
        • +Spatial Analysis
        • +3D Geospatial
        • +Geographic Coordinate Systems
        • +Troubleshooting
        • +Freeware - Utilities - Applications - Programs
        • +Advanced Map Finishing
      • OpenCities Map Ultimate for Finland CONNECT Edition x64 (SES)
      • OpenCities Map Ultimate for Finland CONNECT Edition - Suomi
      • Bentley Descartes
      • +Other Geospatial Products

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

    - VRT file parameters to import Points, Lines, and Polygons

    VRT files are used to import a CSV file containing point, line or polygon data.  Information regarding the VRT file format and parameters can be found at the following:

    https://gdal.org/drivers/raster/vrt.html

    The attached zip file to this article includes a sample set of CSV files and a related VRT file which makes use of WKT geometry field encoding for point, lines and polygons.

    NOTES: 

    1.  The OGRVRTLayer name must be the same as the CSV file name. 

    2.  The relativeToVRT="1" is optional.

    <OGRVRTDataSource>
    	<OGRVRTLayer name="Linestrings">
    		<SrcDataSource relativeToVRT="1">linestrings.csv</SrcDataSource>
    		<GeometryType>wkbLineString</GeometryType>
    		<LayerSRS>WGS84</LayerSRS>
    		<GeometryField encoding="WKT" field="WKT"/>
    	</OGRVRTLayer>
    	<OGRVRTLayer name="Polygons">
    		<SrcDataSource relativeToVRT="1">polygons.csv</SrcDataSource>
    		<GeometryType>wkbPolygon</GeometryType>
    		<LayerSRS>WGS84</LayerSRS>
    		<GeometryField encoding="WKT" field="WKT"/>
    	</OGRVRTLayer>
    	<OGRVRTLayer name="Points">
    		<SrcDataSource relativeToVRT="1">points.csv</SrcDataSource>
    		<GeometryType>wkbPoint</GeometryType>
    		<LayerSRS>WGS84</LayerSRS>
    		<GeometryField encoding="PointFromColumns" x="X" y="Y"/>
    	</OGRVRTLayer>
    </OGRVRTDataSource>
    
    

    Opening the VRT file in as an Import in the Interoperability dialog allows you to specify the Spatial Criteria, Feature Parameters, Import Parameters, and Feature Symbology.  

    When imported, the resulting graphics are native features with business, geometric, and WKT properties.

    If the WKT properties are not desired, disable them in the Import node using the Show Properties > Ungrouped opton.

    The following file is provided for your learning and was used for the images in this article:

    Geometries.zip

    • CSV
    • Interoperability
    • VRT
    • Share
    • History
    • More
    • Cancel
    • Dan Weston Created by Bentley Colleague Dan Weston
    • When: Wed, Mar 16 2016 11:25 AM
    • Inga Morozoff Last revision by Bentley Colleague Inga Morozoff
    • When: Fri, Feb 21 2020 12:58 PM
    • Revisions: 8
    • 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

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