A point vector layer was added to QGIS, after exporting the layer to .xlsx the coordinates in wkt format were attached to the table.

In QGis I added additional columns x and y, to assign a coordinates in DMS format to each geometry. I filled that columns with tool 'Field Calculator', with the formula:

to_dms(x(transform($geometry,'EPSG:3765','EPSG:4326')), 'x', 3)
to_dms(y(transform($geometry,'EPSG:3765','EPSG:4326')), 'y', 3)

and that part works fine.

But I get the coordinates in format:


Is it possible in QGIS to get coordinates in the format:


enter image description here


I have solution but now I have in my format N (north) and E (east) but I expect N and W, does anyone have an idea why this is so?

enter image description here

  • 4
    In my personal opinion the person who authorized the last two notation styles should be forced to georeference scanned 1970s planning documents for the rest of their life. That being said - since this is a matter to text manipulation, you should be able to achieve this.
    – Erik
    Commented Jul 22, 2021 at 14:16
  • @Erik I absolutely agree, I think it is completely vague and unnecessary with the other options
    – ncica
    Commented Jul 22, 2021 at 14:43
  • 1
    Is the transformation from EPSG:3765 to EPSG:4326 correct? West values are outside the bounds of EPSG:3765 anyway, aren't they? But that shouldn't matter, I think.
    – Kasluk24
    Commented Jul 22, 2021 at 15:37
  • @Kasluk24 Thank you, I didn't think about it, that was the point , EPSG:3765 has axis : AXIS["Easting",EAST], AXIS["Northing",NORTH].
    – ncica
    Commented Jul 23, 2021 at 10:27

1 Answer 1

  1. To get DMS format e.g. 403121N in QGIS we can use 'Field Calculator' with formula for e.g.

  2. In the format of DMS labels E and N or N and W, depend on the coordinate system we use. It is necessary to check the axes for the coordinate system we use (this can be checked at e.g. https://epsg.io/3765)

  • 1
    official registry is epsg.org, WKT url would be epsg.org/crs/wkt/id/3765
    – nmtoken
    Commented Jul 23, 2021 at 11:06
  • 1
    @nmtoken maybe a better option is eg epsg.io/3765
    – ncica
    Commented Jul 23, 2021 at 11:10
  • Sure, it's just a matter of opinion. epsg.io is third party, and can be out of date, so if you want definitive answers then use the official registry, the URL of epsg.io is neater though. I gave the WKT link on the registry, but query interface gives a nice web page that allows you to drill down through all the components which I quite like
    – nmtoken
    Commented Jul 23, 2021 at 13:05

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.