3

In Quantum GIS, I already imported an excel or dbf table. Now I need to tell Quantum GIS which columns are Latitude and Longitude. How do I do that?

I know there is Add Delimited Text Layer which allows that, but it seems Unreasonable to me to convert XLS or DBF file to text file before importing! There must be some direct way of telling QGIS that these parameters of the imported attribute table are actualy x y data.

Brad Nesom
  • 17,412
  • 2
  • 42
  • 68
Tomas
  • 1,252
  • 3
  • 17
  • 40
  • 1
    If you are using 1.8 try the xy tools plugin (check all the rquirements). It opens xls files. By the way, is not that difficult also saving an xls file as a csv comma delimited. In either case you have to define in the first line the database structure. – Gerardo Jimenez Jun 25 '13 at 00:22
  • Check this also http://gis.stackexchange.com/questions/31314/how-to-install-python-libs-for-xytools-to-read-excel-files – Gerardo Jimenez Jun 25 '13 at 00:30
  • Well, does this mean that there is no way how to take coordinates directly from the attribute table in QGIS? Very clumsy! – Tomas Jun 28 '13 at 08:14
  • On the contrary, there are two different ways. You can save your excel as a csv and use de "add delimited text layer"plugin. The second one is install the "XY tools" plugin (you can follow the instructions in the thread mentioned above). Both methods work fine. So there is no clumsiness in Qgis... – Gerardo Jimenez Jun 28 '13 at 12:46
  • @GerardoJimenez, I said "directly". You have already imported data to QGIS but to use them, according to these suggested solutions you must save them as xls/csv and import them again. Already imported data! This is really clumsy, isn't it? In no way it is direct and easy. I would expect that I could say to QGIS: "use these two columns of the attribute table as coordinates". – Tomas Jun 28 '13 at 12:50
  • Once your file is either a csv or a xls you can load the coordinates directly. I am user of other GIS applications and they behave the same way. In ArcMap , for instance, in order to add points from a dbf, xls or csv you have to use tools/ad xy data.The logic is the same in qgis – Gerardo Jimenez Jun 28 '13 at 16:07
  • May be the confusion is if the XY coordinates could have attributes, not just the coordinates. If that is the case your file can have as many attributes as you want. look at this also http://gis.stackexchange.com/questions/41962/how-to-import-coordinate-data-from-excel-into-qgis/41964#41964 – Gerardo Jimenez Jun 28 '13 at 16:12

1 Answers1

5

QGIS 3.0 has made it quite easy.

Use Create points layer from table tool (under Processing Toolbox | Vector creation).

enter image description here

Just assign X and Y fields and set appropriate Target CRS to reproject.

Kazuhito
  • 30,746
  • 5
  • 69
  • 149