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.
For the import, a metafile is created (a file with the extension VRT and the Open Source GDAL format, see https://gdal.org/en/stable/drivers/vector/vrt.html).
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>
The graphics are imported into the open design file and are automatically converted to OpenCities 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.