<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">% vim: set textwidth=78 autoindent:

\subsection{Delimited Text Plugin}\label{label_dltext}    

% when the revision of a section has been finalized, 
% comment out the following line:
%\updatedisclaimer

The Delimited Text plugin allows you to load a delimited text file as a layer in QGIS. 

\minisec{Requirements}

To view a delimited text file as layer, the text file must contain:

\begin{enumerate}      
\item A delimited header row of field names. This must be the first line in the text file.
\item The header row must contain an X and Y field. These fields can have any name.
\item The x and y coordinates must be specified as a number. The coordinate system is not important.
\end{enumerate}

As an example of a valid text file we import the elevation point data file 
\filename{elevp.csv} coming with the QGIS sample dataset (See Section~\ref{label_sampledata}):

\begin{verbatim} 
X;Y;ELEV
-300120;7689960;13
-654360;7562040;52
1640;7512840;3
[...]
\end{verbatim}

Some items of note about the text file are:

\begin{enumerate}
\item The example text file uses \mbox{$;$} as delimiter. Any character can be used to delimit the fields.
\item The first row is the header row. It contains the fields X, Y and ELEV.
\item No quotes ({\tt{}"{}}) are used to delimit text fields.
\item The x coordinates are contained in the {\em X} field.
\item The y coordinates are contained in the {\em Y} field.
\end{enumerate}

\minisec{Using the Plugin}
To use the plugin you must have QGIS running and use the Plugin Manager to load the plugin:

Start QGIS, then open the Plugin Manager by choosing \mainmenuopt{Plugins} &gt; \dropmenuopttwo{mActionShowPluginManager}{Plugin Manager...}
\index{plugins!manager}
The Plugin Manager displays a list of available plugins.
Those that are already loaded have a check mark to the left of their name.
Click on the checkbox to the left of the \checkbox{Add Delimited Text Layer} plugin and click \button{OK} to load it as described in Section \ref{sec:managing_plugins}.

Click the new toolbar icon \toolbtntwo{delimited_text}{Add Delimited Text Layer} to open the Delimited Text dialog as shown in Figure
\ref{fig:delim_text_plugin_dialog}.

\begin{figure}[ht]
   \begin{center}
   \caption{Delimited Text Dialog \nixcaption}\label{fig:delim_text_plugin_dialog}\smallskip
   \includegraphics[clip=true, width=14cm]{delimited_text_dialog}
   \end{center}  
\end{figure}

First select the file \filename{qgis\_sample\_data/csv/elevp.csv} to import by clicking 
on the \button{Browse} button. Once the file is selected, the plugin attempts to parse the file 
using the last used delimiter, in this case \mbox{$;$}. To properly parse the file, it 
is important to select the correct delimiter. To change the delimiter to tab use 
\mbox{$\backslash$}t (this is a regular expression for the tab character).
After changing the delimiter, click \button{Parse}.

Choose the X and Y fields from the drop down boxes and enter a Layer name \filename{elevp} 
as shown in Figure \ref{fig:delim_text_plugin_dialog}. To add the layer to the map, click 
\button{Add Layer}. The delimited text file now behaves as any other map layer in QGIS.
</pre></body></html>