Geoscience Reference
In-Depth Information
line_id;Line_xy
1;LINESTRING(189957 234427, 128433 190130, 132124 174133, 166578
234427)
2;LINESTRING(89957 34427, 90123 36232, 95000 37344, 96132 39800)
We then need to create the XML file that will act as the OGR VRT driver. The
following example includes the minimum tags that are required to create the driver,
which are OGRVRTDataSource, SrcDataSource, OGRVRTLayer .We
also specify a layername, which is “gps_paths”.
<OGRVRTDataSource>
<OGRVRTLayer name="gps_paths">
<SrcDataSource Separator="SEMICOLON">gps_paths.csv</
SrcDataSource>
<GeometryType>wkbMultiLineString</GeometryType>
<LayerSRS>EPSG:29900</LayerSRS>
<GeometryField encoding="WKT"field="Lines"/>
</OGRVRTLayer>
<!-- FINAL XML TAG -->
</OGRVRTDataSource>
It is important to note that the name specified in the OGRVRTLayer tag needs
to be the same as the input file name (without the file extension). Although the
GeometryType and LayerSRS are not mandatory, it is good practice to include.
We can quickly check that the VRT has been created correctly using ogrinfo
virtual.vrt .
INFO: Open of 'virtual.vrt'
using driver 'VRT' successful.
Layer name: gps_paths
Geometry: Multi Line String
Feature Count: 2
Extent: (89957.000000, 34427.000000) - (189957.000000,
234427.000000)
Layer SRS WKT:
PROJCS["TM65 / Irish National Grid (deprecated)",
GEOGCS["TM65",
DATUM["TM65",
SPHEROID["Airy Modified
1849",6377340.189,299.3249646,
AUTHORITY["EPSG","7002"]],
TOWGS
84[482.5,-130.6,564.6,-1.042,-0.214,-0.631,8.15],
AUTHORITY["EPSG","6299"]],
PRIMEM["Greenwich",0,
AUTHORITY["EPSG","8901"]],
UNIT["degree",0.0174532925199433,
AUTHORITY["EPSG","9122"]],
AUTHORITY["EPSG","4299"]],
PROJECTION["Transverse_Mercator"],
PARAMETER["latitude_of_origin",53.5],
 
 
Search WWH ::




Custom Search