2

Here's what I have done so far:

  • In QGIS 2.10.1 Pisa on Windows 10, I have a set of polygons overlaid onto Google Maps using the OpenLayers plugin in QGIS.
  • Using print composer, I have created an atlas which enables me to show and export each polygon along with the underlying map to a single .jpg or .pdf

Here's what I'm having trouble with:

  • In print composer, it is possible to see the coordinates of the map extents for each of the atlas items. These are shown in the item properties area for the map I have added to the composition.
  • I would like to be able to export the coordinates of the map extents, by either including them in a label on the composition itself, or as a standalone dump.

I do not seem to be able to do this using the available expressions.

2 Answers 2

2

Answering my own question here. The following steps in QGIS 2.10.1 Pisa on Windows 10 helped me answer the question:

  • Let's say your polygons are in a vector layer called "foo.shp" and you've loaded them into your QGIS project. We're trying to find out the "extents" of each polygon, which are the coordinates of the corners of a squares/rectangles exactly big enough to fit each polygon in.

  • To obtain these extents for each polygon in foo.shp select "Polygon from Layer Extent" from the menu called Vector -> Research Tools. In the resulting dialogue, choose foo.shp as the input layer and check the boxes labelled "Calculate Extent for each feature separately" and (if you want to see the outcome) "Add result to canvas".

  • Then choose an output layer: you'll need to create a shapefile in /path-to-my/project/ to save the output in. Let's call it "bar.shp".

  • Once you've done this, select OK to run the operation. You will then have a new vector layer called "bar" which displays the data on the extents of the your original polygons.

  • To see this data for "bar" open the layer's Attribute Table. The full coordinates of the polygons can be exported from there.

1

Not sure if I am understanding your question correctly, but could this posting be of help?

1
  • Hi @bubbalouie and thanks for the suggestion - not quite the right route, though. The function to add a grid to a map in print composer is useful but it doesn't give me the precise extents of the map canvas itself.
    – chiyogami
    Commented Sep 10, 2015 at 19:38

Your Answer

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

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