<html><head></head><body><div style="color:#000; background-color:#fff; font-family:verdana, helvetica, sans-serif;font-size:13px"><br><div dir="ltr" id="yui_3_16_0_1_1449683769002_15354"><span class="" id="yui_3_16_0_1_1449683769002_15411">Thank you for the reply Even.<br><br>Based on your equation one can identify the UTM zone. Which in this case for Barcelona is: 31.<br><br>How can I identify the </span><a id="yui_3_16_0_1_1449683769002_15648" class="edited-link-editor" href="http://spatialreference.org/ref/epsg/">EPSG projection</a> based on UTM zone 31?</div><div id="yui_3_16_0_1_1449683769002_15704" dir="ltr">Is it possible to identify it with some formula too?<br><br>Kind regards,<br>Djordje Spasic<br></div><div id="yui_3_16_0_1_1449683769002_15354"><br></div><br> <div id="yui_3_16_0_1_1449683769002_15340" style="font-family: verdana, helvetica, sans-serif; font-size: 13px;"> <div id="yui_3_16_0_1_1449683769002_15339" style="font-family: HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif; font-size: 16px;"> <div id="yui_3_16_0_1_1449683769002_15352" dir="ltr"> <hr id="yui_3_16_0_1_1449683769002_15706" size="1"> <font id="yui_3_16_0_1_1449683769002_15351" size="2" face="Arial"> <b id="yui_3_16_0_1_1449683769002_15717"><span id="yui_3_16_0_1_1449683769002_15716" style="font-weight:bold;">From:</span></b> Even Rouault <even.rouault@spatialys.com><br> <b><span style="font-weight: bold;">To:</span></b> gdal-dev@lists.osgeo.org; Djordje Spasic <issworld2000@yahoo.com> <br> <b><span style="font-weight: bold;">Sent:</span></b> Wednesday, December 9, 2015 7:43 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_1449683769002_15338" class="y_msg_container"><br>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 downloaded<br clear="none">> .asc elevation file need to be projected from WGS84 datum (EPSG 4326) to<br clear="none">> Universal Transverse Mercator. Here is an example of how this looks like<br clear="none">> in python GDAL for Barcelona Spain downloaded elevation model: gdalwarp<br clear="none">> -s_srs EPSG:4326 -t_srs EPSG:32631 -r cubic 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 few<br clear="none">> articles online, which suggest picking the right EPSG projection based on<br clear="none">> UTM zone to which the downloaded elevation model belong<br clear="none">> to:<a id="yui_3_16_0_1_1449683769002_15348" 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 id="yui_3_16_0_1_1449683769002_15350" shape="rect" href="http://stackoverflow.com/questions/9186496/determining-utm-zone-to-convert-from-longitude-latitude" target="_blank">http://stackoverflow.com/questions/9186496/determining-utm-zone-to-convert-from-longitude-latitude</a><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 AUTO:42001 to do that automatically:<br clear="none"><a id="yui_3_16_0_1_1449683769002_15485" shape="rect" href="http://cite.opengeospatial.org/OGCTestData/wms/1.1.1/spec/wms1.1.1.html#auto_projections.42001" target="_blank">http://cite.opengeospatial.org/OGCTestData/wms/1.1.1/spec/wms1.1.1.html#auto_projections.42001</a><div id="yui_3_16_0_1_1449683769002_15349" class="qtdSeparateBR"><br><br></div><div class="yqt0350317270" id="yqtfd28811"><br clear="none"><br clear="none">> <br clear="none">> Thank you for the reply.<br clear="none">> <br clear="none">> Kind regards,<br clear="none">> Djordje Spasic</div><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><br><br></div> </div> </div></div></body></html>