I am quite new to GIS software. I use QGIS. I have a question that might be trivial. I would like to derive the coordinates (Y and X) for an area. Just to make an example: I have two regions A and B. From the shapefile I know which are their coordinates. However, I would need the coordinates for the unique region A+B. Could you please give me some hints on how to do that?

  • 2
    What do you mean by "coordinates for an area"? An area does not have coordinates, a point does. – ArMoraer Apr 20 '16 at 16:24
  • Yes you are right. I mean lon and lat for the points determining the region (A+B). It seems to me that field calculator should be used, but I am a bit lost with it. – Dario Apr 20 '16 at 16:43
  • What do you mean by region A+B? Depending on what you mean that, you could do something like a merge or intersection, then extract the coordinates of the vertices. Just make sure that the geoprocessing step that you use is consistent with what you mean by A+B. – Ezra Boyd Apr 20 '16 at 22:40
  • Thanks for your reply. What I mean is the following. Example: In the original shape file I have information about the coordinates to plot Spain an Portugal. I need to plot them as a single area. Therefore, I need the coordinates to plot spain+Portugal as they were only one country. So if I understood correctly, you suggest to merge them and to extract the coordinates of the vertices. This should work for my case. I presume that I can merge them highlighting those two countries on the map. But then how can I extract the coordinates of the vertices? – Dario Apr 21 '16 at 1:14

From the precisions you provided in the comments, I understand that what you want is actually a polygon merging followed by some kind of vertices coordinates export. This is actually quite simple:

  1. Merging: Select your layer then click on the pen icon to toggle edition mode. Select your two polygons, then go to Edit > Merge Selected Features. This will replace your two polygons with their geometric union (so if you want to keep your old polygons, make a copy of the layer first). This will work well if there are no gaps or overlap between your polygons.

  2. Coordinates export: there are (at least) 2 options. You can right click on the layer, then "Save As..."; in the "Format" field, choose CSV. In "Layer options", "Geometry" field, choose "AS_WKT". Alternatively, you can install and use the MMQGIS plugin (see this answer for reference).

  • Union still has the border in the middle. Dissolve using Dissolve all creates one polygon covering all elements. – AndreJ Apr 21 '16 at 5:38
  • @AndreJ: you're absolutely right: I confused union with the merge tool. I'll correct the answer. – ArMoraer Apr 21 '16 at 5:46

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.