2004-04-19 05:17:24 +00:00

71 lines
3.7 KiB
HTML

<html>
<body>
<h1>Delmited Text Plugin</h1>
The Delimited Text plugin allows you to load a delimited text file
as a layer in QGIS.
<h2>Requirements</h2>
To view a delimited text file as layer, the text file must contain:
<ol>
<li>A delimited header row of field names. This must be the
first line in the text file</li>
<li>The header row must contain an X and Y field. These fields
can have any name.</li>
<li>The x and y coordinates must be specified as a number. The
coordinate system is not important</li>
<h3>Example of a valid text file</h3>
<pre>
name|latdec|longdec|cell|
196 mile creek|61.89806|-150.0775|tyonek d-1 ne|
197 1/2 mile creek|61.89472|-150.09972|tyonek d-1 ne|
a b mountain|59.52889|-135.28333|skagway c-1 sw|
apw dam number 2|60.53|-145.75167|cordova c-5 sw|
apw reservoir|60.53167|-145.75333|cordova c-5 sw|
apw reservoir|60.53|-145.75167|cordova c-5 sw|
aaron creek|56.37861|-131.96556|bradfield canal b-6|
aaron island|58.43778|-134.81944|juneau b-3 ne|
aats bay|55.905|-134.24639|craig d-7|
</pre>
Some items of note about the text file are:
<ol>
<li> The example text file uses | as delimter. Any character can be used to
delimit the fields.</li>
<li>The first row is the header row. It contains the fields name, latdec, longdec, and cell</li>
<li>No quotes (") are used to delimit text fields</li>
<li>The x coordinates are contained in the <i>longdec</i> field</li>
<li>The y coordinates are contained in the <i>latdec</i> field</li>
</ol>
<h2>Using the Plugin</h2>
To use the plugin you must have QGIS running and use the Plugin Manager to load the plugin:
<ol>
<li>Start QGIS</li>
<li>Open the Plugin Manager by choosing the <i>Tools|Plugin Manager</i> menu. The
Plugin Manager displays a list of available plugins. Plugins that are already loaded have
a checkmark to the left of their name. Click on the checkbox to the left of the <i>Add Delimited Text
Layer</i> plugin and click Ok to load it.<br><br>
<img src="plugin_manager.png" alt="Plugin Manager">
</li>
<li>A new toolbar icon is now present:
<img src="toolbar_icon.png" align="absmiddle" alt="Delimited Text toolbar icon"></li>
<li>Click on the icon to open the Delimited Text dialog:
<br><br>
<img src="dialog.png" alt="Add delimited text layer dialog"><br><br>
</li>
<li>First select the file to import by clicking on the ellipsis button: <img src="ellipsis.png" align="absmiddle"><br></li>
<li>Select the desired text file from the file dialog</li>
<li>Once the file is selected, the plugin attempts to parse the file using the last used delimiter, in this case |<br><br>
<img src="file_selected.png"><br><br></li>
<li>In this case the delimiter | is not correct for the file. The file is actually tab delimited. Note that the X and Y field drop down boxes do not contain valid field names.</li>
<li>To properly parse the file, change the delimiter to tab using \t (this is a regular expression for the tab character). After changing the delimiter, click <i>Parse</i></li>
<li>The drop down boxes now contain the fields properly parsed:<br><br>
<img src="file_selected2.png"><br><br></li>
<li>Choose the X and Y fields from the drop down boxes and enter a Layer name<br><br>
<img src="file_selected3.png"><br><br></li>
<li>Click <i>Add Layer</i></li>
<li>The layer is added to the map:<br><br> <img src="layer_added.png"></li>
</ol>
</body>
</html>