Skip to main content
code language to allow coloring + tag
Source Link
JGH
  • 43.3k
  • 3
  • 46
  • 93

I have a problem to add a *.tab file as delimitedtext layer in QGIS 3.

uri = ("file:///{}?"
               "&delimiter={}"
               "&xField={}"
               "&yField={}"
               "&crs={}"
               "&decimal").format(tab_text,
                                        "\t",
                                        "Rechtswert",
                                        "Hochwert",
                                        "EPSG:31468",",")
vlayer = QgsVectorLayer(uri, "layer", "delimitedtext")
uri = ("file:///{}?"
               "&delimiter={}"
               "&xField={}"
               "&yField={}"
               "&crs={}"
               "&decimal").format(tab_text,
                                        "\t",
                                        "Rechtswert",
                                        "Hochwert",
                                        "EPSG:31468",",")
vlayer = QgsVectorLayer(uri, "layer", "delimitedtext")

If I test the layer with ".isValid".isValid I get a False. Did I have to name more variables?

I have a problem to add a *.tab file as delimitedtext layer in QGIS 3.

uri = ("file:///{}?"
               "&delimiter={}"
               "&xField={}"
               "&yField={}"
               "&crs={}"
               "&decimal").format(tab_text,
                                        "\t",
                                        "Rechtswert",
                                        "Hochwert",
                                        "EPSG:31468",",")
vlayer = QgsVectorLayer(uri, "layer", "delimitedtext")

If I test the layer with ".isValid" I get a False. Did I have to name more variables?

I have a problem to add a *.tab file as delimitedtext layer in QGIS 3.

uri = ("file:///{}?"
               "&delimiter={}"
               "&xField={}"
               "&yField={}"
               "&crs={}"
               "&decimal").format(tab_text,
                                        "\t",
                                        "Rechtswert",
                                        "Hochwert",
                                        "EPSG:31468",",")
vlayer = QgsVectorLayer(uri, "layer", "delimitedtext")

If I test the layer with .isValid I get a False. Did I have to name more variables?

Source Link

How to add delimitedtext Layer via Python in QGIS 3?

I have a problem to add a *.tab file as delimitedtext layer in QGIS 3.

uri = ("file:///{}?"
               "&delimiter={}"
               "&xField={}"
               "&yField={}"
               "&crs={}"
               "&decimal").format(tab_text,
                                        "\t",
                                        "Rechtswert",
                                        "Hochwert",
                                        "EPSG:31468",",")
vlayer = QgsVectorLayer(uri, "layer", "delimitedtext")

If I test the layer with ".isValid" I get a False. Did I have to name more variables?