[gdal-dev] how to pick the correct projection

Djordje Spasic issworld2000 at yahoo.com
Thu Dec 10 09:02:33 PST 2015

Thank you for the reply Mark.

But I am not sure I understand you.
I am trying to pick the right projection in case when a raster spans into two UTM zones. Like in the following image:
Even Rouault helped me in picking the right projection in case of raster spanning through a single UTM zone:

UTMzone =  (floor((longitude + 180)/6) % 60) + 1
projection = 32600 + UTMZone,  if raster center's longitude > 0projection = 32700 + UTMZone,  if raster center's longitude < 0

However, I am confused which projection to choose when raster spans through two UTM zones. I intend to download rasters which have the following length x width: 50x50 km, 100x100km, 200x200km, 400x400km.


      From: Mark Johnson <mj10777 at googlemail.com>
 To: gdal-dev at lists.osgeo.org 
 Sent: Thursday, December 10, 2015 3:49 AM
 Subject: [gdal-dev] how to pick the correct projection
It seem that EPSG has reserved the numbers- 32600-32799 for basic WGS 84 / UTM zones
For these basic WGS 84 / UTM zone *- Northern Hemisphere: add 32600 to the Zone Number- Southern Hemisphere: add 32700 to the Zone Number

On a Spatialite Database, the following Query will list the basic UTM-Zones
SELECT srid,  auth_name,  auth_srid,  ref_sys_name,  proj4text,  srtextFROM  spatial_ref_sysWHERE( -- Northern Hemisphere (proj4text = '+proj=utm +zone='||(srid-32600)||' +datum=WGS84 +units=m +no_defs') OR  -- Southern Hemisphere (proj4text = '+proj=utm +zone='||(srid-32700)||' +south +datum=WGS84 +units=m +no_defs'))ORDER BY proj4text;-- 120 results

---There are other Projections that also use UTM (non-basic)- to list these:
SELECT srid,  auth_name,  auth_srid,  ref_sys_name,  proj4text,  srtextFROM  spatial_ref_sysWHERE( -- Other Projections that use UTM  (srid NOT BETWEEN 32600 AND 32799) AND (  (proj4text LIKE '+proj=utm +zone%') ))ORDER BY proj4text;-- 947 results
Mark Johnson

Once again, thank you for the help Even.

What happens if the source raster spreads across two UTM zones? Which one should I pick then? Here is an example (the blue rectangle is the raster region):

I intend to download rasters with the following size: 50x50km, 100x100km, 200x200, and 400x400km in length x width.

Djordje Spasic

gdal-dev mailing list
gdal-dev at lists.osgeo.org

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20151210/1d1a4b0a/attachment.html>

More information about the gdal-dev mailing list