2

My starting file of interest is an ASC file with the following gdalinfo

Driver: AAIGrid/Arc/Info ASCII Grid 
Files: sd_1_3_110805.asc 
Size is 11880, 9720 
Coordinate System is `' 
Origin = (-117.900000000000010,33.399999999999991) 
Pixel Size = (0.000092592592593,-0.000092592592593) 
Corner Coordinates: 
Upper Left (-117.9000000, 33.4000000) 
Lower Left (-117.9000000, 32.5000000) 
Upper Right (-116.8000000, 33.4000000) 
Lower Right (-116.8000000, 32.5000000) 
Center (-117.3500000, 32.9500000) 
Band 1 Block=11880x1 Type=Float32, ColorInterp=Undefined 
NoData Value=-9999 

To translate to a tiff I have tried:

gdal_translate sd_1_3_110805.asc lj.tif

Subsequently I would like to change the projection to UTM flat to ultimately create a 3d model of flat vs geocentric terrain.

Unless I have specified using a geocentric model to osgdem (VirtualPlanetBuilder) to build the 3d terrain model, my model always comes out mirror image (north is south etc...). So I desire to use a flat terrain model... what parameters should I be using to get to a geotiff with the correct projection to start with?

1 Answer 1

2

gdal_translate can project your output to UTM as part of the conversion. Try this:

gdal_translate -a_srs <UTM projection> sd_1_2_110805.asc lj.tif

Replace <UTM projection> with any of the usual GDAL/OGR forms, complete WKT, PROJ.4, EPSG:n or a file containing the WKT (see gdal_translate help page). I prefer using EPSG codes since I often get the GDAL/OGR forms wrong. For example, if you need to reproject to WGS 84 / UTM zone 17N use EPSG:32617:

gdal_translate -a_srs EPSG:32617 sd_1_2_110805.asc lj.tif
2
  • I believe I have the right output now... I am still having a problem with creating my 3D model using the osgdem in virtualplanetbuilder, but I wanted to start with the right stuff, as it is still coming out 180 degrees out (north is south, etc)... but thank you for getting me started in the right direction, Jaime
    – user2612
    Apr 11, 2011 at 14:26
  • I'm glad to help.
    – Jaime Soto
    Apr 15, 2011 at 19:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.