diff --git a/resources/context_help/QgsDelimitedTextSourceSelect-en_US b/resources/context_help/QgsDelimitedTextSourceSelect-en_US index 08d7759fb68..045d05b333e 100644 --- a/resources/context_help/QgsDelimitedTextSourceSelect-en_US +++ b/resources/context_help/QgsDelimitedTextSourceSelect-en_US @@ -159,10 +159,10 @@ is invalid if it does not have capture groups. As an example this can be used a unintuitive) means of loading data with fixed width fields. For example the expression
-^(.{5})(.{10})(.{20})(.{20}).* +^(.{5})(.{10})(.{20})(.{20})
will extract four fields of widths 5, 10, 20, and 20 characters from each line. -Lines less than 45 characters long will be discarded. +Lines less than 55 characters long will be discarded.
@@ -210,10 +210,10 @@ are interpreted.-X;Y;ELEV
--300120;7689960;13
--654360;7562040;52
-1640;7512840;3
+X;Y;ELEV +-300120;7689960;13 +-654360;7562040;52 +1640;7512840;3
This file:
-id|wkt
-1|POINT(172.0702250 -43.6031036)
-2|POINT(172.0702250 -43.6031036)
-3|POINT(172.1543206 -43.5731302)
-4|POINT(171.9282585 -43.5493308)
-5|POINT(171.8827359 -43.5875983)
+id|wkt +1|POINT(172.0702250 -43.6031036) +2|POINT(172.0702250 -43.6031036) +3|POINT(172.1543206 -43.5731302) +4|POINT(171.9282585 -43.5493308) +5|POINT(171.8827359 -43.5875983)
This file:
-from PyQt4.QtCore import QUrl, QString
-from qgis.core import QgsVectorLayer, QgsMapLayerRegistry
-
-# Define the data source
-filename="test.csv"
-uri=QUrl.fromLocalFile(filename)
-uri.addQueryItem("type","csv")
-uri.addQueryItem("delimiter","|")
-uri.addQueryItem("wktField","wkt")
-# ... other delimited text parameters
-layer=QgsVectorLayer(QString(uri.toEncoded()),"Test CSV layer","delimitedtext")
-# Add the layer to the map
-if layer.isValid():
- QgsMapLayerRegistry.instance().addMapLayer( layer )
+from PyQt4.QtCore import QUrl, QString +from qgis.core import QgsVectorLayer, QgsMapLayerRegistry + +# Define the data source +filename="test.csv" +uri=QUrl.fromLocalFile(filename) +uri.addQueryItem("type","csv") +uri.addQueryItem("delimiter","|") +uri.addQueryItem("wktField","wkt") +# ... other delimited text parameters +layer=QgsVectorLayer(QString(uri.toEncoded()),"Test CSV layer","delimitedtext") +# Add the layer to the map +if layer.isValid(): + QgsMapLayerRegistry.instance().addMapLayer( layer )
This could be used to load the second example file above.
The configuration of the delimited text layer is defined by adding query items to the uri.