5

With QGIS it´s easy to load non-spatial CSV Data (and use it for joins).

enter image description here

This works fine as long the CSV resides on the local file system as this answer suggests. Is there some way to import a CSV from an online resource like https://example.com/myfile.csv without first downloading it? (Maybe by use of some plugin or Python snippet?)

2
  • Not sure about an existing plugin in Q but you may write your own referencing this q/a: stackoverflow.com/questions/35371043/…
    – artwork21
    Mar 26, 2019 at 12:36
  • nice thanks! so what is missing then is how to create a non-spatial layer with the return. will ask google.
    – Anatol
    Mar 26, 2019 at 12:40

1 Answer 1

3

Yes, you can do that in QGIS.

QGIS is able to open remote resources using GDAL Virtual File Systems /vsicurl/

Add layer

Use Add Vector Layer, and write the remote URL of the CSV file with the prefix /vsicurl/. The complete filename should be something like: /vsicurl/http://localhost/~jgr/sinaletica.csv

Using your example, it should be: /vsicurl/https://example.com/myfile.csv

add remote file using vsicurl

Convert table to layer

If you just need the table for joins, you don't need this additional step.

If the table has some kind of X and Y columns, you can convert the table to a layer with geometries.

Use Create points layer from table to create a layer from the table.

use create points layer from table algorithm

4
  • You don't need the vsicurl (tested in QGIS 3). Just the full url in the file tab or the HTTP(s) protocol tab.
    – user2856
    Mar 27, 2019 at 1:36
  • @jgrocha wow, thanks a lot – this sounds really useful. My csv does not have any spatial information (x+y) but should only be joined with an existing attribute table I will try if this works with adding a textfile as layer without geometries as well.
    – Anatol
    Mar 28, 2019 at 6:10
  • @jgrocha nice the first suggested way works for csv without coordintaes. great thanks!
    – Anatol
    Mar 28, 2019 at 9:56
  • @jgrocha Loading a csv from remote by use of vsicurl works nicely but fails if it´s a dbf. By chance any idea how to get this working?
    – Anatol
    Apr 3, 2019 at 8:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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