I'm pretty new to gdal and got a presumably easy question for experienced gdal users. My problem: I have a raster ascii file of which I don't know the projection or epsg code. However, I want this raster to be projected in epsg 32663 (WGS84).

The information I get from gdalinfo contains the coordinate origin and the corner coordinates:

enter image description here

I tried directly assigning a projection with gdal_translate, but ofc it didn't work as I don't know what else (and where) I have to provide additional information (by it didn't work I mean the spatial position is entirely wrong when comparing with a correctly projected raster in epsg 32663).

I also tried gdal_translate with providing gsp's (my corner coordinates; don't know if this is even legitimate), or gdalwarp - no success.

  • What is the region or country of that data ? – WKT Apr 6 '16 at 13:52
  • Assigning projection with -a_srs for sure works but the problem seems to be that your .asc file is not made to EPSG:32663. Where did you get the DHM10_Meter.asc file? Can you find the metadata for it from the web? Do you know a contact person or e-mail address? – user30184 Apr 6 '16 at 14:00
  • I know where it is from (eastern part of Austria/Central Europe), but there are a couple of epsg codes that may be possible - and I was hoping to get this information based on the gdalinfo output allone. Based on the link I provided, would it be possible to figure out which one may be the correct one? – GeoEki Apr 6 '16 at 14:10
  • Welcome to gis.stackexchange! Please edit the title of your question to include enough information for future visitors to be able to find this thread when looking for the same problem. – underdark Apr 6 '16 at 17:07
  • If the data's western edge is east of Linz and extends into Czech Republic, and far western Slovakia and NW Hungary, it looks like MGI Austria GK East (EPSG:31256). – mkennedy Apr 6 '16 at 18:30

http://www.bev.gv.at/portal/page?_pageid=713,1572954&_dad=portal&_schema=PORTAL notes that the Austrian DEM is in MGI Lambert projection.

https://www.data.gv.at/katalog/dataset/b5de6975-417b-4320-afdb-eb2a9e2a1dbf provdies the data in a 3 GB large Geotif file. This should be correctly georeferenced to EPSG:31287, and is free of charge.

Some regional surveying authorities also offer smaller subsets of the data:


http://data.steiermark.at/cms/beitrag/11822084/97108894/?AppInt_OGD_ID=63 (in 3 CRS)


If you want to stick to your dataset, and know the corner coordinates in degrees:

Put them in a text file, load them into QGIS as delimited text as WGS84, do the same with the projected values, and test all possible CRS of Austria for the second layer until both layers fit.


Alternatively, just take the projected values from gdalinfo, and display them on an Openstreetmap background. Try the CRS valid for Austria, and see if the points cover the expected part of the country.

Or compare the displayed DHM file against SRTM or other low-level height data. You should see if the valleys align.

EPSG:31256 (as suggested by mkennedy) seems to be a good choice after all.

| improve this answer | |
  • Yeah, I just did this...easy solution here. I was just curious if it's even possible to get an idea what projection my raster might be related to with the info provided from gdalinfo alone (that is coordinate origin and the corner coordinates). The 10m DEM from Lower Austria is available under a CC licence and contains projection infos...reprojecting this was easy then, thanks! – GeoEki Apr 7 '16 at 11:43
  • You need some kind of reference. See my extended answer. – AndreJ Apr 7 '16 at 14:59

Your grid currently lacks projection information. Hence the line

Coordinate System is ''

in the output. With proper projection information, the output would start (for example) like:

Coordinate System is:
PROJCS["UTM Zone 4, Northern Hemisphere",

It is important to understand the difference between assigning a projection and reprojecting. Using the a_srs switch of gdal_translate will assign a projection where it is wrong or missing (as it is here). gdalwarp will reproject from one system to another. So gdal_translate is the tool you want to use here. You will only use gdalwarp after determining the existing projection, if you want it in a different one.

With vector data it is sometimes easier to eyeball a map and figure out what projection it is using, but this is pretty difficult to do with raster data. You have two options for determining the projection. The first is to contact the original source of your data to find out what it is. The second option is to try assigning likely candidates, and see if your data align with other known data (another raster or vector layer with known coordinate reference system). Since you have a list of about 20 candidates in Austria (link, entire list duplicated below), this is at least feasible. Obviously, you have already determined that it is not EPSG:32633. This is not surprising, as EPSG:32633 corresponds to UTM zone 33N. Since UTM North zones have their vertical origin at the equator, your raster lower extent of 249995 would be ~250 km from the equator.

Because false eastings and false northings are used in order to avoid having negative coordinates, the negative minimum X value of your grid (-144178) leads me to believe that the correct projection from the list you linked to is one of the ones with a false easting of 0, giving 9 possibilities. If you knew whether this data were in the West, Central, or East of Austria, you could whittle the list further from 9 to 3 possibilities.

You can either (a) use gdal_translate first, then use gdalwarp, or (b) specify the missing CRS (as will as your desired output CRS) as part of gdalwarp. For example, if you determine that the existing projection is Austria Gauss-Kruger West EPSG:31254, you would do one of the following:

Assign projection, then reproject

gdal_translate -a_srs:31254 DHM_10meter.asc temp_file.asc
gdalwarp -t_srs EPSG:32633 temp_file.asc output_name.asc

Reproject while specifying missing CRS

gdalwarp s_srs EPSG:31254 -t_srs EPSG:32633 DHM_10meter.asc output_name.asc

Let us know how it goes.

Table of possible projections

    EPSG code   Projection name Base GeogCRS    Map Projection  Longitude Orig  Latitude Orig   Prime Meridian  false easting   false northing  Projection Method
    3416    ETRS89 / Austria Lambert    ETRS89  Austria Lambert 13d 20m 47d 30m Greenwich   400000  400000  Lambert Conic Conformal (2SP)
    31251   MGI (Ferro) / Austria GK West Zone  MGI (Ferro) Austria Gauss-Kruger West Zone  28d 0d  Ferro   0   -5000000    Transverse Mercator
    31252   MGI (Ferro) / Austria GK Central Zone   MGI (Ferro) Austria Gauss-Kruger Central Zone   31d 0d  Ferro   0   -5000000    Transverse Mercator
    31253   MGI (Ferro) / Austria GK East Zone  MGI (Ferro) Austria Gauss-Kruger East Zone  34d 0d  Ferro   0   -5000000    Transverse Mercator
    31254   MGI / Austria GK West   MGI Austria Gauss-Kruger West   10d 20m 0d  Greenwich   0   -5000000    Transverse Mercator
    31255   MGI / Austria GK Central    MGI Austria Gauss-Kruger Central    13d 20m 0d  Greenwich   0   -5000000    Transverse Mercator
    31256   MGI / Austria GK East   MGI Austria Gauss-Kruger East   16d 20m 0d  Greenwich   0   -5000000    Transverse Mercator
    31257   MGI / Austria GK M28    MGI Austria Gauss-Kruger M28    10d 20m 0d  Greenwich   150000  -5000000    Transverse Mercator
    31258   MGI / Austria GK M31    MGI Austria Gauss-Kruger M31    13d 20m 0d  Greenwich   450000  -5000000    Transverse Mercator
    31259   MGI / Austria GK M34    MGI Austria Gauss-Kruger M34    16d 20m 0d  Greenwich   750000  -5000000    Transverse Mercator
    31281   MGI (Ferro) / Austria West Zone MGI (Ferro) Austria West Zone   28d 0d  Ferro   0   0   Transverse Mercator
    31282   MGI (Ferro) / Austria Central Zone  MGI (Ferro) Austria Central Zone    31d 0d  Ferro   0   0   Transverse Mercator
    31283   MGI (Ferro) / Austria East Zone MGI (Ferro) Austria East Zone   34d 0d  Ferro   0   0   Transverse Mercator
    31284   MGI / Austria M28   MGI Austria M28 10d 20m 0d  Greenwich   150000  0   Transverse Mercator
    31285   MGI / Austria M31   MGI Austria M31 13d 20m 0d  Greenwich   450000  0   Transverse Mercator
    31286   MGI / Austria M34   MGI Austria M34 16d 20m 0d  Greenwich   750000  0   Transverse Mercator
    31287   MGI / Austria Lambert   MGI Austria Lambert 13d 20m 47d 30m Greenwich   400000  400000  Lambert Conic Conformal (2SP)
    31288   MGI (Ferro) / M28   MGI (Ferro) Austria zone M28    28d 0d  Ferro   150000  0   Transverse Mercator
    31289   MGI (Ferro) / M31   MGI (Ferro) Austria zone M31    31d 0d  Ferro   450000  0   Transverse Mercator
    31290   MGI (Ferro) / M34   MGI (Ferro) Austria zone M34    34d 0d  Ferro   750000  0   Transverse Mercator
| improve this answer | |
  • Wow, that's a lot of usefull information - I put this in my bookmarks, thank you! For now, I stick to the solution of @AndreJ and just redownloaded a 10m DEM that is available under a CC licence for free that includes the projection infos already. I was just curious if it's even possible to get an idea what projection it might be with the info provided from gdalinfo alone (that is coordinate origin and the corner coordinates). Whenever I decide to go sub 10m and use our original dataset (1m), I will come back to your solution..which will be a pain in the kitten for such a large area :) Thanks! – GeoEki Apr 7 '16 at 11:38
  • You can leave out the Ferro ones, since Austria has adapted the Greenwich meridian a long time ago. – AndreJ Apr 7 '16 at 14:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.