Measuring distances when crossing UTM zones?

I like to calculate distance between two UTM coordinates which are in different zones. Could any one point me how I can do this.

I found that we can map these coordinates in to a new projection for solving the problem. Could any one let me know which is the best map projection where cartesian coordinate related calculations are applicable like UTM.

If some points me to extended UTM zones and how it helps, that will also be very helpful.

Which UTM zone to use for a large country?

I want to reproject OpenStreetMap roads data from the current projection (WGS 84) to UTM, since I read in another GIS.SE discussion (How to get $length in meters in QGIS?) that WGS 84 cannot be used to measure length in m or km. My end goal is to calculate the total roadway kilometres within each district, so that I can enter that variable into my regression model. The country in question is Indonesia, and as you can see from the map below, it covers UTM zones 46-54.

UTM zones map from Wikimedia

Image source: Wikimedia,

Does it really matter which one I choose? Can I choose the one that’s roughly in the middle and call it good (that would be zone 50) or should I pick the zone that is more densely populated with roads (Jakarta/Java, zone 48)?

I am only barely functionally literate in GIS. The only formal training I had was a 3-day course back in 2008. Really, the only reason I need the roadway kms variable was because one of my thesis committee members wanted me to account for it in my model…

And to confirm, once I have reprojected to the UTM CRS, I can use my GIS software’s built-in length tool to directly calculate the length in metres (or divide by 1000 for km), right?

I am using QGIS.

Georeferencing raster imagery using UTM eastings and northings

enter image description hereI have a scanned cadastral map in raster form and UTM co-ordinates in northings and eastings for that area. Is there any way that I can directly georeference my map using E/N values without converting them? I tried doing it directly through the Georeferencing toolbar in ArcMap but RMS was too high.

How to change GK-coordinates to UTM with the field calculator in QGIS?

i have a qgis project in ETRS89 (UTM) with some vectorshapes. i already transformes them from GK into UTM. but now the attribute table still show me the GK-coordinates. HOW can i change it? with the field calculator?!

Please help me :)

Erroneous location when converting from a GCS_WGS_1984 to UTM

I have a shapefile map of Belgium divided by cantons that I want to re-project in order to have units in meters and to be able to calculate distances. I know how to do it with ArcGIS Projection tool, but the result always gets wrong map location.

I will detail my steps. First of all, my original map had unknown projection and coordinate system. However, it is pretty clear that it is in GCS_WGS_1984, with decimal degrees, since the Left/Top/Right/Bottom limits are precisely equal to the real ones of Belgium, when a map of this country is projected that way. So far, so good. I defined the GCS_WGS_1984 projection with DD units in ArcGIS, using the Define Projection tool.

The problem is in the next step. I then want to convert from that to another projection. One from which I can have units in meters. I tried a bunch of UTM options, using the Project tool after finding out that Belgium is around UTM 31N. However, no matter which UTM projection I choose, the location of the country after re-projected becomes wrong.

For instance, re-projecting from thw GCS_WGS_1984 to WGS_1984_UTM_Zone_31N gives me the following extent limits: Left:468861,233828 m; Top:5707355,258593 m; Right:742547,667605 m; Bottom:5485665,513781 m. That’s very off the target.

Could anyone point me what am I doing wrong or what is missing?

PS: Another detail is the following. I tried opening the original map among other country maps with the GCS_WGS_1984 projection in decimal degrees. All countries are positioned correctly. Then, I do the same operation described above to convert some countries besides Belgium to check what happens. All of them get located wrong – what means, my problem doest not seem to be in my Belgium files, but rather in me doing something wrong.

Convert shapefile to LonLat (R)

Just a small disclaimer: I don’t have any background in cartography, hence I might have missed the answer to my question in search just because I didn’t even know the keywords to look for.

So, I am using R to plot statistical data on maps. It was all fine and understandable when all of the materials came in same units of measurments (lon/lat in form of decimal degrees or degrees/minutes/seconds which have obvious and easy conversion).

So what I have encountered – doing routine fortify(shapeMap) to plot data with ggplot2 yields dataframe with values:

    long    lat order   hole    piece   group   id
1   563656.6    373826.0    1   FALSE   1   0.1 0
2   563864.6    373664.3    2   FALSE   1   0.1 0
3   564272.9    373895.4    3   FALSE   1   0.1 0
4   564491.6    373805.5    4   FALSE   1   0.1 0
5   565151.1    372709.0    5   FALSE   1   0.1 0
6   565328.3    372347.0    6   FALSE   1   0.1 0


As far as I understand that this is UTM coordinate system. And hence the question – is there an easy way to convert these coordinates to decimal degrees? I have dug through quite a few materials and online convertors but I can’t really seem to get the expected result.

Just for reference – shapefile coordinates above should be somewhere in Latvia. And Latvia is split among 3 UTM grid cells: 34V; 35V and 35U (if that is relevant at all).

Update: I have found out that coordinates are in LKS92 system. Hence now there is a clear objective. Convert LKS92 to WGS84. Guess now it is up to figuring out spTransform() function from rgdal package. Unfortunately it is not an obvious function with “from” and “to” arguments. Or at least at first glance.

Update2: Reference for those that will encounter the same problem:

  1. You have to be sure what coordinate system you want to conver from/into. In my case I found out it was LKS92.

  2. Find specific parameters for the coordinate system on In my case parameters look like “+proj=tmerc +lat_0=0 +lon_0=24 +k=0.9996 +x_0=500000 +y_0=-6000000 +ellps=GRS80 +units=m +no_defs”. Not that these are parameters for coordinate system FROM which I want to convert. If this is not WGS84 then you will want another parameter string for target coordinate system.

  3. R package proj4 has function project(). An example of LKS92 -> WGS84 conversion:

xy <- cbind(c(508148.442), c(319423.294))
project(xy, "+proj=tmerc +lat_0=0 +lon_0=24 +k=0.9996 +x_0=500000 +y_0=-6000000 +ellps=GRS80 +units=m +no_defs", inverse = T)

[,1] [,2]
[1,] 24.1342 57.01823

Note the inverse=T which means convert to WGS84. Making inverse = F suggests that input coordinates are in WGS84 format.

Another small update:

To convert whole shapefile you would still need rgdal package:

proj4string(shapeMap) <- CRS("+proj=tmerc +lat_0=0 +lon_0=24 +k=0.9996 +x_0=500000 +y_0=-6000000 +ellps=GRS80 +units=m +no_defs")
shapeMap <- spTransform(shapeMap, CRS("+proj=longlat"))

First line defines the CRS of shapefile, second line tells what CRS to transform into.

convert points to same utm zone

I have lat/long and when I convert to UTM, my points are in zones 35 and 36.
is it possible to “transform” or “project” (I am not sure which word is used to do this operation) the UTM coordinates from zone 36 to zone 35 ?

Edit: Just to clarify
I have those two coordinates.

point 1: is in 35L 460880.04 E 8327740.29 S
point 2: is in 36L 201956.55 E 8375498.52 S

is there any way to say: point 2 is in 35L xxxxxxx E yyyyyy S ?

enter image description here

Combining UTM zones into one solid map

I have an area, example 4000m x 4000m. So, 4x4km. The origin can be placed anywhere, maybe in center, maybe on the top-left, nevermind.

Now, I want to fill this area with some stuff from OSM. I read a lot about UTM, zones, etc. UTM quadrant is divided into 6×10 100km squares, this squares are divided into 10×10 10x10km squares, this squares are divided to 10×10 1x1km squares and so on.

Getting back to my 4kmx4km square. How do I convert coordinates to place objects in my square and the position responds to reality?

To make it harder, let’s say that I want to put on the square objects from squares from different UTM quadrants from different zones, for example: most southern-east 1×1 from 34V, most southern-west from 35V, most northern-west from 35U and most northern-east from 35U.

Additional question: Is it possible to create one continuous maps (builded from smaller pieces), which covers the region composed of several UTM zones (for example, from 29W to 34S).

How to translate UTM coordinates properly?

Ok, I implement Albers, Lambert and Equidistant projections for some tests. Input args: a = 6378206.4 m, e = 0.00676866, e2 = 0.0822719 Standard parallels: 55.0, 49.0 Origin: 52.205746, 22.514281

And results:

Albers : x = -489.71509; y = -2291.5

Lambert : x = -489.15250; y = -1653.5

Equidistant: x = -489.71533; y = -2289.5

I checked the algorithms and are ok, the results agree with the sample data. What is the reason that the result of the Lambert projection stands out from the rest? Does this mean that Lambert is better to applied to larger areas than the other two?

How to resample a DEM from GCS to UTM with respect to reprojection bounds parameter?

When reprojecting a DEM (e.g., SRTM-derived 1-arc DEM) using PCI Geomatica for example, to constrain pixel size and maintain a square pixel you can either change the image extent or the number of pixels, or both.
What are the implications of changing either parameters with respect to preserving the DEM accuracy?

PostGis: Geometry from UTM text

I have plain data in a postgresql table which looks like this:

║ id ║ index ║   easting   ║   northing   ║ utm_zone ║ utm_zone_letter ║
║  1 ║   1   ║ 233410.0000 ║ 1024701.0000 ║       38 ║ N               ║
║  1 ║   2   ║ 213310.0000 ║ 1167201.0000 ║       36 ║ N               ║
║  2 ║   1   ║ 213310.0000 ║ 1167201.0000 ║       31 ║ B               ║
║  2 ║   2   ║ 213310.0000 ║ 1167201.0000 ║       31 ║ B               ║

Note: Coordinates are not real, but typed by hand

As you can see these are UTM coordinates but stored in plain db type fields.
I want to convert those last 4 columns to one of Geometry type for PostGis.
To something like this:

║ id ║       Geometry       ║
║  1 ║ 02347237427342342347 ║
║  2 ║ 27584872345646325863 ║

I used query similar to this:

--creates polygon with wrong SRID :( 
SELECT, ST_Polygon(z.geom, 3395) geom FROM ( 
    --adds first point of line at the end to close it (requeird by ST_Polygon)
    SELECT id, ST_AddPoint(g.geom, ST_StartPoint(g.geom)) geom FROM (
        -- groups points by ID and creates open line geometry from each group
        SELECT id, ST_MakeLine(t.strPoints) geom FROM (
            --creates POINT(x,y) text from coordinates
                g.index idx, 
                'POINT(' || g.easting || ' ' || g.northing || ')' strPoints
            FROM data g
            ORDER BY g.index
        ) t
        GROUP BY
        HAVING count(t.strPoints) > 2
    ) g

) z
where ST_IsValid(z.geom)

But this does not use utm_zone and utm_zone_letter and points and lines are created without SRID value. Creating polygon from such values and specifing some SRID gives bad results. At same time because points and lines do not have SRID set I cannot use utmzone(geometry) DB function because it requires geometry to have SRID.

I looked at ST_Transform, ST_FromText and other functions but could not find one where I can specify UTM zone number and letter to create Geometry type value.
Creating point without specifying SRID gives me bad results – points fall on penguins in Antarctica which is wrong.

Can you tell me how to convert that data to correct Geometry values with correct SRID specified?

Question and Answer is proudly powered by WordPress.
Theme "The Fundamentals of Graphic Design" by Arjuna
Icons by FamFamFam