<html><head></head><body><div style="color:#000; background-color:#fff; font-family:verdana, helvetica, sans-serif;font-size:13px">Once again, thank you for the help Even.<br class="" id="yui_3_16_0_1_1449763382892_11432"><br class="" id="yui_3_16_0_1_1449763382892_11434"><div id="yui_3_16_0_1_1449763382892_11467">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):</div><div id="yui_3_16_0_1_1449763382892_11466"><br></div><div id="yui_3_16_0_1_1449763382892_11507" dir="ltr"><a id="yui_3_16_0_1_1449763382892_11505" href="https://www.dropbox.com/s/hbn4yqx3ool7j98/raster_two_UTMzones.jpg?dl=0">https://www.dropbox.com/s/hbn4yqx3ool7j98/raster_two_UTMzones.jpg?dl=0</a><div id="yui_3_16_0_1_1449763382892_11505"><br></div></div><br class="" id="yui_3_16_0_1_1449763382892_11442">I intend to download rasters with the following size: 50x50km, 100x100km, 200x200, and 400x400km in length x width.<br class="" id="yui_3_16_0_1_1449763382892_11444"><br class="" id="yui_3_16_0_1_1449763382892_11446">Regards,<br class="" id="yui_3_16_0_1_1449763382892_11448"><div id="yui_3_16_0_1_1449763382892_11550" dir="ltr">Djordje Spasic</div><div id="yui_3_16_0_1_1449763382892_11552" dir="ltr"><br></div><span></span><br> <div id="yui_3_16_0_1_1449763382892_11265" style="font-family: verdana, helvetica, sans-serif; font-size: 13px;"> <div id="yui_3_16_0_1_1449763382892_11264" style="font-family: HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif; font-size: 16px;"> <div id="yui_3_16_0_1_1449763382892_11263" dir="ltr"> <font id="yui_3_16_0_1_1449763382892_11262" size="2" face="Arial"> <hr size="1"> <b><span style="font-weight:bold;">From:</span></b> Even Rouault <even.rouault@spatialys.com><br> <b><span style="font-weight: bold;">To:</span></b> Djordje Spasic <issworld2000@yahoo.com> <br><b><span style="font-weight: bold;">Cc:</span></b> "gdal-dev@lists.osgeo.org" <gdal-dev@lists.osgeo.org><br> <b><span style="font-weight: bold;">Sent:</span></b> Wednesday, December 9, 2015 9:54 PM<br> <b><span style="font-weight: bold;">Subject:</span></b> Re: [gdal-dev] how to pick the correct projection<br> </font> </div> <div id="yui_3_16_0_1_1449763382892_11284" class="y_msg_container"><br>Le mercredi 09 décembre 2015 20:55:53, Djordje Spasic a écrit :<br clear="none">> Thank you for the reply Even.<br clear="none">> <br clear="none">> Based on your equation one can identify the UTM zone. Which in this case<br clear="none">> for Barcelona is: 31.<br clear="none">> <br clear="none">> How can I identify the EPSG projection based on UTM zone 31?Is it possible<br clear="none">> to identify it with some formula too?<br clear="none"><br clear="none">Add 32600 to the UTM zone for the northern hemisphere, or 32700 for the <br clear="none">southern hemisphere.<div id="yui_3_16_0_1_1449763382892_11419" class="qtdSeparateBR"><br><br></div><div class="yqt6450239460" id="yqtfd32845"><br clear="none"><br clear="none">> <br clear="none">> Kind regards,<br clear="none">> Djordje Spasic<br clear="none">> <br clear="none">> <br clear="none">> From: Even Rouault <<a shape="rect" ymailto="mailto:even.rouault@spatialys.com" href="mailto:even.rouault@spatialys.com">even.rouault@spatialys.com</a>><br clear="none">> To: <a shape="rect" ymailto="mailto:gdal-dev@lists.osgeo.org" href="mailto:gdal-dev@lists.osgeo.org">gdal-dev@lists.osgeo.org</a>; Djordje Spasic <<a shape="rect" ymailto="mailto:issworld2000@yahoo.com" href="mailto:issworld2000@yahoo.com">issworld2000@yahoo.com</a>><br clear="none">> Sent: Wednesday, December 9, 2015 7:43 PM<br clear="none">> Subject: Re: [gdal-dev] how to pick the correct projection<br clear="none">> <br clear="none">> Le mercredi 09 décembre 2015 19:23:16, Djordje Spasic a écrit :<br clear="none">> > Hi,<br clear="none">> > <br clear="none">> > I am downloading an open source .asc elevation files from<br clear="none">> > opentopography.org. I attached one of them in this email. Once<br clear="none">> > downloaded .asc elevation file need to be projected from WGS84 datum<br clear="none">> > (EPSG 4326) to Universal Transverse Mercator. Here is an example of how<br clear="none">> > this looks like in python GDAL for Barcelona Spain downloaded elevation<br clear="none">> > model: gdalwarp -s_srs EPSG:4326 -t_srs EPSG:32631 -r cubic<br clear="none">> > BarcelonaWGS84.asc<br clear="none">> > projectedToUTM.tif So in this case the EPSG:32631 has been used as a<br clear="none">> > projection (it hasn't been picked by me), it was googled.<br clear="none">> > <br clear="none">> > But how do I know which projection to pick, depending on the location for<br clear="none">> > which the elevation data is downloaded? I googled a bit, and there are<br clear="none">> > few articles online, which suggest picking the right EPSG projection<br clear="none">> > based on UTM zone to which the downloaded elevation model belong<br clear="none">> > to:<a shape="rect" href="https://en.wikipedia.org/wiki/Universal_Transverse_Mercator_coordinate" target="_blank">https://en.wikipedia.org/wiki/Universal_Transverse_Mercator_coordinate</a><br clear="none">> > _ system#/media/File:Utm-zones.jpg<br clear="none">> > <br clear="none">> > But I am not sure I understand how to choose the EPSG projection based on<br clear="none">> > UTM zone.<br clear="none">> > <br clear="none">> > How can this be done?<br clear="none">> <br clear="none">> Formula given in<br clear="none">> <a shape="rect" href="http://stackoverflow.com/questions/9186496/determining-utm-zone-to-convert-" target="_blank">http://stackoverflow.com/questions/9186496/determining-utm-zone-to-convert-</a><br clear="none">> from-longitude-latitude<br clear="none">> <br clear="none">> long2UTM <- function(long) {<br clear="none">> (floor((long + 180)/6) %% 60) + 1<br clear="none">> }<br clear="none">> <br clear="none">> Take the longitude of the central point of the source raster as input<br clear="none">> <br clear="none">> Just thinking it could be interesting to have gdalwarp accept -t_srs<br clear="none">> AUTO:42001 to do that automatically:<br clear="none">> <a shape="rect" href="http://cite.opengeospatial.org/OGCTestData/wms/1.1.1/spec/wms1.1.1.html#au" target="_blank">http://cite.opengeospatial.org/OGCTestData/wms/1.1.1/spec/wms1.1.1.html#au</a><br clear="none">> to_projections.42001<br clear="none">> <br clear="none">> > Thank you for the reply.<br clear="none">> > <br clear="none">> > Kind regards,<br clear="none">> > Djordje Spasic<br clear="none"><br clear="none">-- <br clear="none">Spatialys - Geospatial professional services<br clear="none"><a shape="rect" href="http://www.spatialys.com/" target="_blank">http://www.spatialys.com</a></div><br><br></div> </div> </div></div></body></html>