Quantcast
Channel: OpenCities Map Wiki
Viewing all articles
Browse latest Browse all 1284

- Import coordinate and property information from an XLS or CSV file

$
0
0
Current Revision posted to Bentley Map | OpenCities Map Wiki by Kees van Prooijen [ Bentley] on 3/13/2019 10:02:15 AM

Create a design file and attach a geographic coordinate system. This ensures that the imported graphics will be drawn in the correct space.

In this example the Excel file contains location and property information for wells:

ID, BOOK, OPERATOR, STATUS, X_SURF, L_SURF, ELEVATION, TD, FIELD, LEASENAME, LEASENUM and COMPDATE.

Save the Excel file to the CSV format. In this example, the file is named Wells.csv.

Create a new text file named "Well Import.vrt" and copy/paste the following lines of text:

<OGRVRTDataSource><OGRVRTLayer name="well"><SrcDataSource>well.csv</SrcDataSource><SrcLayer>Well</SrcLayer><GeometryType>wkbPoint</GeometryType><LayerSRS>wgs84</LayerSRS><GeometryField encoding="PointFromColumns" x="x_surf" y="y_surf"/></OGRVRTLayer></OGRVRTDataSource>

In Bentley Map, choose File > Import > GIS Data Types and select the VRT file created above.

Adjust the Feature Parameters, Feature Symbology and Cell Symbology as desired.

When done, right click and choose Import.

The graphics are imported into the open design file and are automatically converted to Bentley Map features with properties.

 

Additional Information:

The following VRT templates can be used to create custom VRT files based on linestrings, polygons and points.

Edit the layer name, data source, and x/y columns as needed.

Linestrings:

<OGRVRTDataSource><OGRVRTLayer name="Linestrings"><SrcDataSource relativeToVRT="1">linestrings.csv</SrcDataSource><GeometryType> wkbLineString</GeometryType><LayerSRS> WGS84</LayerSRS><GeometryField encoding="WKT" field="WKT"/></OGRVRTLayer></OGRVRTDataSource>

 

Polygons:

<OGRVRTDataSource><OGRVRTLayer name="Polygons"><SrcDataSource relativeToVRT="1">polygons.csv</SrcDataSource><GeometryType> wkbPolygon</GeometryType><LayerSRS> WGS84</LayerSRS><GeometryField encoding="WKT" field="WKT"/></OGRVRTLayer></OGRVRTDataSource>

 

Points:

<OGRVRTDataSource><OGRVRTLayer name="Points"><SrcDataSource relativeToVRT="1">points.csv</SrcDataSource><GeometryType> wkbPoint</GeometryType><LayerSRS> WGS84</LayerSRS><GeometryField encoding="PointFromColumns" x="X" y="Y"/></OGRVRTLayer></OGRVRTDataSource>

Note: The element <LayerSRS> is not required. With this information the features are transformed to the local geographic coordinate system during import.

A sample dataset for practice is attached for your reference.

communities.bentley.com/.../VRTPoints.zip

Tags: Excel, import, CSV, Interoperability, VRT, Bentley Map, Points

Viewing all articles
Browse latest Browse all 1284

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>