Have you ever tried to import your survey points into InfraWorks 360 using a simple CSV tabular format like an Excel spreadsheet?
Admittedly, without knowledge of FDO, GDAL, and OGR, this can seem like a daunting workflow at first. But once you get the hang of it, it's a pretty quick and painless operation. Not to mention-- once you try this out once or twice, your eyes will be opened to the magic of using a variety of different data providers to bring your data into InfraWorks 360.
For this example, I will use publicly available survey points for the Boston Seaport area (sourced from the Massachusetts DOT) that I have copy-pasted into a CSV, and import those survey points into InfraWorks 360 as points of interest, using an OGR:VRT generic data provider connection.
Ok, so here's how to bring your survey points into InfraWorks 360 from a CSV format spreadsheet:
1) Create or open your spreadsheet in CSV format.
2) Configure your columns and label headers to properly indicate which columns represent your lat/long, x/y, or northing/easting coordinates, and any other metadata you want to include. The "CoordX" or "Point(X)" column header can be used to specify a column with longitude or easting values, "CoordY" or "Point(Y)" for a column with latitude or northing values, and "WKT" for geometries encoded in well known text (WKT).
You can see in the image below that I have 22 rows representing 21 survey points in the Boston Seaport area. I downloaded this publicly-available data from the Massachusetts Department of Transportation's online GIS site. My Easting values are defined in the COORD(X) column, and my northing are defined in the COORD(Y) column. I also added the web URL for the geodetic data sheet for each point, in a header that I named MassDOTDatasheet. Save your survey point data to CSV. I named this spreadsheet bostonpoints.csv.
Note: It's important that you know the coordinate system used to georeference your source data. Looking over the data sheet for these points, I can see that this survey data is using NAD-27 in US feet.
3) Use a text editor to create an XML control file known as an OGR Virtual Format, a.k.a. OGR:VRT file. A VRT file is essentially a driver that transforms features read from other drivers based on criteria specified in your XML control file. In this case, the VRT file you create is telling InfraWorks 360's built-in FDO service how to connect GDAL to OGR. You can read about mandatory and optional fields to include in your VRT files, here: http://www.gdal.org/drv_vrt.html.
!Important: the VRT file must have the same file name (“bostonpoints” in this example) as the CSV, but use the .VRT file extension. This is what that looks like:
Here's how to write your own VRT file:
line 1: <OGRVRTDataSource>
line 2: <OGRVRTLayer name="bostonpoints"> //replace 'bostonpoints' with the name of your CSV file. This indicates that bostonpoints is the source data to reproject as a spatial data layer in InfraWorks 360. //
line 3: <SrcDataSource relativeToVRT="1">bostonpoints.csv</SrcDataSource> //replace 'bostonpoints.csv' with the name and file extension of your CSV file. "1" indicates that the source datasource should be interpreted as relative to the virtual file//
line 4: <GeometryType>wkbPoint</GeometryType> //This field is used to determine how IW360 should interpret the geometry data. “wkb” represents that I have X/Y data but no elevation. If I had Z data, I would instead use “wkb25D”//
line 5: <LayerSRS>EPSG:26786</LayerSRS> //Here I specify an EPSG code (26786) that corresponds to the coordinate system used in the source data (NAD-27 Massachusetts Mainland). All I did to find the proper EPSG code was go to http://spatialreference.org/ref/ and search for Masschusetts.
line 6: <GeometryField encoding="PointFromColumns" x="COORD(X)" y="COORD(Y)"/> //Here I specify which columns represent my X/Y coordinates (i.e. Northing/Easting). If I instead had column headers in my CSV named 'latitude' and 'longitude', I could write this line as: <GeometryField encoding="PointFromColumns" x="longitude" y="latitude"/>
line 8: </OGRVRTDataSource>
4) Next, I imported the VRT file into InfraWorks 360 through the Add Database Data Source functionality. I chose Generic as the connection source, and OGR:VRT as the provider. I then clicked “Choose File” and selected my VRT file, (which must be stored in the same folder as the CSV file of the same name), and clicked OK.
5) Next, I checkmarked my data source and clicked OK in the Choose Data Sources dialog that appears.
6) Now, right-click on the Data Source and click Configure.
7) In the Configuration dialog, I specified the Type as Points of Interest (POI), then choose a blue marker style for my imported POIs in the Rule Style field.
8) Now, I go to the Geolocation tab and click the globe icon to choose the Coordinate System that matches the coordinate system from my source data (NAD 27 for Mainland Massachusetts in US Ft.). In theory, InfraWorks 360 should automatically configure this using the EPSG code from your VRT file, but make sure to double check this is correct! As you can see below, I ended up manually picking “MA” from the CS library.
Note: In theory, InfraWorks 360 should have used the EPSG code from my VRT file to automatically select the correct coordinate system here. However, IW360 instead chose HARN/NE.MA as my coordinate system – which was incorrect. I looked up the code for NAD 27 US Ft in Massachussets using the built-in Coordinate System library, and the correct Coordinate System code here is actually “MA".
9) I then went to the Table tab and chose my MassDOT column for my 'tag' field. This way, the link for each point will populated to the feature's attributes in InfraWorks 360.
10) Click Close & Refresh. I can now see all my imported points of interest in my model.