I want to reproject OpenStreetMap roads data from the current projection (WGS 84) to UTM, since I read in another GIS SE Q&A(Getting $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, http://upload.wikimedia.org/wikipedia/commons/e/ed/Utm-zones.jpg

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.

  • 4
    You use a UTM zone when your area of interest fits completely within it or very nearly so. A UTM zone is not appropriate when your area of interest spans several zones like that. The further away from the zone you pick, the more distortion there will be. You actually want a projection designed to cover that area (and I can't suggest one which is why this is a comment and not an answer - we do have some experts who may respond, or I'll try to dig one up later). And yes, once you have an appropriate projection it's a simple matter to calculate the length in that projection to whatever unit.
    – Chris W
    Apr 5, 2015 at 2:24
  • @ChrisW thanks for your response and the explanation. I guess my question is how much does it matter when the country is on the equator (as opposed to a country closer to the poles), but obviously, my knowledge is limited. I suppose I could spatially join the OSM layer with a UTM layer and generate separate streets layers for each UTM zone, stitch the layers back together when I'm done creating the length_km, and then create the roadway-miles-per-district variable at the very end Apr 5, 2015 at 4:53
  • 1
    Being near the equator also matters since it does have a double false value to asign the north value. For features north of the equator its false value is 0 meters. For features south the equator its false value is 10,000,000 meters. In your case, you have both cases, areas to the north and south of the equator making the use of a UTM CRS a little bit problematic Apr 5, 2015 at 14:47
  • 1
    The more zones you are away, the more it matters. I found this page with a graphic example. I'm still not confident in suggesting a CRS, but maybe EPSG:3001. You could also find a dataset that is the UTM grid, Intersect that with your roads, and then start reprojecting the data into each UTM zone only calculating the length for records that have that UTM zone ID, then reprojecting (NOT DEFINING) to the next zone. Be wary of spatial join, especially if roads cross borders - you need intersect to cut them at the border.
    – Chris W
    Apr 6, 2015 at 6:57
  • 1
    Note you don't need to split it to separate layers to do that. Also note you'd Intersect with UTM zones first, then intersect it with district boundaries, and then go zone to zone calculating distance. If you don't do both intersects first, the length you calc won't be for the sections only within a district, at least for any roads crossing a border. In ArcGIS you'd use Summary Statistics to total roads per district, but in QGIS I think you need the GroupStats plugin or something similar.
    – Chris W
    Apr 6, 2015 at 7:02

3 Answers 3


You use a UTM zone when your area of interest fits completely within it or very nearly so. A UTM zone is not appropriate when your area of interest spans several zones such as in your case. A little overlap into a neighboring zone might be ok, but the further away from the zone you pick, the more distortion there will be and the more it matters. I found this page with a graphic example.

You actually want a projection designed to cover that area and minimize the appropriate distortions (shape, area, distance, direction - can't have them all minimized in one projection), as mdsumner suggests. Note that you can always take a standard projection and modify it to best suite your particular area of interest by changing the detailed settings. That does take a level of understanding to know the impact your choices have on distortions and whether or not they are acceptable. And of course the larger the area you look at, the greater the compromise you make in distortions for some areas. This Esri pdf is a good introduction to projections.

You could also get the length calculations you need on a per zone basis if you want to stick with UTM and its level of distortion/error.

  1. First you'd find a dataset that is the UTM grid in polygon form with an attribute identifying the zone.
  2. Intersect that with your roads so that each road gets an attribute defining what zone it is in. This also splits the road at the zone boundary since it's likely that you'll have roads crossing them. With a spatial join you could end up counting the same road twice.
  3. Since you also want totals per district, you'd want to next Intersect your updated roads with the district boundary layer to again split them at boundaries and get an attribute defining their district. Be cautious with intersect - if you have roads that aren't within a district, they will get dropped because intersect only looks at areas of overlap between layers and not just one or the other.
  4. Then you can add a field to hold your length calculation (you do not want to rely on the default shape_length field, since that is system tracked and tied to the projection of the data). Also note you need to do both intersects before calculating length, because your length field won't automatically update with changes. If you only did zones, then intersected with districts, each district piece of the road would have a length value for the whole zone and not just the district unless you recalculated it.
  5. Now start reprojecting (not defining, note the difference) the data into each UTM zone, select only the records with that zone attribute, and field calculate their length into your field. You don't need to split it to separate layers/shapefiles to do that, just make sure you're only working with the correct records for the current projection. Once you've calculated all the lengths you can go back to WGS84, and your length attribute will remain as whatever units it was originally calculated to.
  6. Finally, in ArcGIS you'd use Summary Statistics to total road length per district, but in QGIS you need the GroupStats plugin or something similar. Or you pull the table into another software that lets you do the same district case-based sum.

As an experiment, you can always add another length field, set a different projection that covers more than just a UTM zone, such as EPSG:3001 I mentioned earlier in a comment, field calculate that length, and compare it to your UTM lengths to see what kind of difference it makes.


Don't choose UTM, end of story. Many large countries choose a single sensible projection for some tasks. Victoria, a small state in my country was extremely foresighted in the late 90's and chose a Lambert Conformal Conic projection suitable for state-wide usage when they were undergoing a datum shift (ADG84/66 to GDA94), rather than hobble along with multiple UTM zones, as NSW did (they have three) and Tasmania (we only have the central NSW one). Think of how many zones there are even in Australia . . . .

I consider it a blessing when someone's area of interest traverses UTM zones as you then have the seed of insight to choose against the mindless hegemony.

When you ask "what projection should I use?" you also need to list the many and varied and unpredictable (to us) compromises and uses you have for this choice.

It's easy to answer the question "does it really matter", since ellipsoidal distance calcuations are easy to do. Still, I suspect you should choose a single projection suitable for the entire area just because it makes map creation so much easier.

BTW, the rarely seen Oblique Mercator often is a good choice for elongated areas generally following a great circle (that's what a UTM zone is), and UTM is really a discretized and limited specialization of the more general case. I doubt that the right balance of compromises couldn't be found in a different choice though.


I would suggest the best approach is to find out the primary projection that the national mapping or geomatics agency of the area in question usually uses and use that. I live in canada, covering a lot of UTM Zones, and when not geographic (lat/Long) the provinces generally each use a projection that is appropriate for the size and shape of their region. BC uses Albers Equal Area, Alberta uses 10TM, Saskatchewan uses an extended UTM 13, the whole country is often covered with a Lambert Conformal Conic and so on.

  • 2
    Unfortuntely, Indonesia uses officially a bunch of 16 transverse mercator projections EPSG:23830ff, so this is not really helpful.
    – AndreJ
    Apr 6, 2015 at 14:53
  • @BryanWaller, Indonesia doesn't use a primary projection because it spans 8 UTM zones and the equator runs through it so that there is land mass above and below the equator for all but 2 easternmost UTM zones. What I will need to do is calculate the length separately for each zone, which I was trying to avoid to do, but I think it is for the best to do it this way. Apr 7, 2015 at 13:35

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.