I'm working with 2 different layers. First one is a csv file with 3 fields. Name, longitude and latitude. Second is a text file with the field name.

I want to assign the longitude and latitude fields to the second layer when the name coincides, anyone knows how to do it?

  • 1
    This sounds like an excel-task to me, not like one for QGIS. – Erik Apr 24 '19 at 14:49
  1. Add the CSV to QGIS as a Delimited Text layer, using the latitude column as the X coordinate and the longitude column as the Y coordinate.

    • For more details about adding a delimited text table, see this tutorial.
  2. Add the text file as a delimited text layer without geometry.

  3. Open the layer properties for the CSV > Joins. Join the text table to the CSV, using the name fields as the common field.

    • For more details on performing a table join in QGIS, see this tutorial.

Or, as Erik suggested, you can combine the tables in Excel.

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.