0

I need to create, in a map layout, an Attribute Table item containing the Map Sheet vertices values in different coordinate reference systems, controlled by the atlas (Coverage Layer = Map sheet), as shown in the images. Any advice to solve this problem? enter image description here enter image description here enter image description here

I tried using vector-> geometry tools-> add geometry attributes but only area and perimeter values were added to the table, so I am considering using the vector-> geometry tools-> extract vertices first and then using the add geometry tool. I do not know if this is the right way to do this and I do not know how to get/add the converted coordinates (UTM and/or geographic) for all map sheets (the red rectangles) according to the other CRS.

2
  • Add the coordinate values to the attribute table. Then set up an attribute table in the print composer. What have you tried so far, and where are you stuck? If you narrow your question a bit, you may get some help.
    – csk
    Commented Nov 6, 2018 at 20:50
  • I tried using vector-> geometry tools-> add geometry attributes but only area and perimeter values were added to the table, so I am considering using the vector-> geometry tools-> extract vertices first and then using the add geometry tool. I do not know if this is the right way to do this and I do not know how to get/add the converted coordinates (UTM and/or geographic) for all map sheets (the red rectangles) according to the other CRS
    – Andrew-63
    Commented Nov 7, 2018 at 0:37

1 Answer 1

2

Extract the vertices of your grid to a point layer with the extract vertices tool.

Remove duplicate points with the Delete duplicate geometries tool.

Use the Field Calculator and Expression Builder to add the desired coordinates to the point layer as attributes.

To get the X and Y coordinates in the same CRS as the layer, use the expressions: $x and $y.

To get the X coordinate of in ED50 / UTM 32 (EPSG:23032), use this expression: x(transform($geometry, 'EPSG:4326', 'EPSG:23032'))

I assumed the point layer is in WGS84. If not, change 'EPSG:4326' to the CRS of the layer.

Repeat for X and Y coordinates of all desired CRS's.

Add an attribute table for the point layer to your print layout. In item properties for the attribute table item, select "show only features intersecting atlas feature."

Format and arrange the attribute table to your specifications. To get it to exactly match the example, you may need to add multiple attribute tables, and incorporate other print layout items such as shapes and text boxes.

4
  • Thanks a lot for Your detailed explanation! Will the output be in the DMS format (for geographic CRS conversion) or will it have to be converted later? How to?
    – Andrew-63
    Commented Nov 8, 2018 at 8:25
  • Output of lat/long coordinates will be in decimal degrees. See gis.stackexchange.com/q/214136/81764 for an example of how to convert to degrees-minutes-seconds format.
    – csk
    Commented Nov 8, 2018 at 16:53
  • Thanks, I had seen those expressions to convert from decimal degrees to the DMS format but I did not understand how to apply them. After converting the coordinate values using the expressions you suggested previously creating the respective fields in the attribute table (ie ED50_lat; ED50_lon) in decimal degrees, I would have to apply conversion expressions which appear to be dependent on $x, $y : how can I apply them to, for example, (ED50_lon: ED50_lat)?
    – Andrew-63
    Commented Nov 8, 2018 at 19:42
  • Please post a new question. Be sure to include the link to those expressions, and explain what you've tried and where you're getting stuck applying their equations to your data.
    – csk
    Commented Nov 8, 2018 at 19:48

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.