3

I'm trying to import a small delimited (tab separated) text into QGIS. The coordinates are in UTM format.

printscreen

Sample data:

id  N   E
PT-001  7237229 146872
PT-002  7237230 146897

The first column contains labels, the other columns (E and N) contain coordinates (numeric integers). I've specified the UTM zone in the Geometric CRS (EPSG:31983), so it seems I don't need it inside the file (there's not even an input field for it).

I'm getting an error message:

Layer is not valid: The layer file:///home/....csv?type=csv&delimiter=%5Ct&maxFields=10000&detectTypes=yes&xField=E&yField=N&crs=EPSG:31983&spatialIndex=no&subsetIndex=no&watchFile=no is not a valid layer and can not be added to the map. Reason:

The fact that it gives no reason is just a pain. What is possibly happening?

9
  • 2
    Add the headers and one line of CSV data as well. You can use fake values, the structure is what is important.
    – user30184
    Mar 20 at 14:38
  • @user30184 Added it.
    – Rodrigo
    Mar 20 at 14:44
  • I tried to import your sample data with the same settings and got no issue (QGIS 3.10) ... just copied and pasted (but replaced spaces by tabs)
    – Snaileater
    Mar 20 at 15:56
  • @snaileater Strangely, this site is replacing my tabs with spaces, but they're tabs on my original file.
    – Rodrigo
    Mar 20 at 16:06
  • Works for me with your settings and with the sample data that I copied while in edit mode.
    – user30184
    Mar 20 at 16:39
0

Your Sample Data has mixed spaces and tabs. Stick with one or the other and it'll work.

3
  • No, it only has tabs.
    – Rodrigo
    Mar 20 at 15:28
  • 2
    @Pointdump : how can u say ?
    – Snaileater
    Mar 20 at 15:44
  • Rendering the text on the browser is changing some characters. Having a look in edit mode shows that single tab is really used as a separator.
    – user30184
    Mar 20 at 16:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.