Create vrt file in Bentley Map

Hello experts,

We wanted to know if Bentley Map provides any in built tool to create the vrt file. I looked in the Benrley Map documentation, however did not find anything regarding creation of the vrt file. I'm aware that it is just xml file however, what will be the procedure to create the vrt file if we have a csv file that has x,y coordinates.. I found the help for Importing an Excel data source but I could not fully understand it.

So, any help will be appreciated if somebody could help me.

Thanks in advance,

Kiran.

  • Hi Kiran,

    Kindly find the attached steps of creating .vrt file ->

    Importing CSV Files

    To enable the CSV to be importable, you must first create the .vrt file, which can be done in any simple text editor.

    The VRT file is a small piece of xml and looks like this:
    <OGRVRTDataSource>
    <OGRVRTLayer name = "testCoords">
    <SrcDataSource>testCoords.csv</SrcDataSource>
    <GeometryType>wkbPoint</GeometryType>
    <LayerSRS>WGS84</LayerSRS>
    <GeometryField encoding="PointFromColumns" x="longitude" y="latitude"/>
    </OGRVRTLayer>
    </OGRVRTDataSource>

    To create your VRT do the following
    1. Copy /paste the above code into a text editor (such as notepad).

    2. Adjust the following variables in the xml code
    OGRVRTLayer name
    Should be the same as the name in "SrcDataSource" but WITHOUT the ".csv" suffix.
    SrcDataSource
    Should be the exact name of the file, with the .csv extension
    GeometryType
    As shown in the code, it is unknown to the author at this stage if other geometry types are available.
    LayerSRS
    Must be the correct coordinate system reference - NOTE: SO FAR ONLY "WGS84" HAS FOUND TO WORK FOR THIS SO FAR
    GeometryField
    Keep the encoding value as it is ("PointFromColumns"), but adjust the x & y values to the correct column names in your csv file.

    3. Now save the file to the SAME DIRECTORY as yours .csv file, but be sure to set the "files of type" to "all Files, and add the ".vrt" file extension to the end of the file name.

    4. You can now open the VRT file through the Interoperability window

    5. Once you have imported the GIS data, you can use the data browser functionality to browse, search and filter, and locate individual records.

    Kindly let me know if you have any further query related to this procedure.

    Thanks ,
    Anupama
  • I would also like to inform you that at present there is no in built tool in Bentley Map to create .vrt file .

    Thanks
  • Thanks Anupama for your help and quick response. Appreciate your detailed steps.

    Regards,
    Kiran.