Changes between Initial Version and Version 1 of FAQ/aplunknownmapprojection

Dec 4, 2014 12:32:20 PM (5 years ago)

Added page with assign_projection script documentation


  • FAQ/aplunknownmapprojection

    v1 v1  
     1=== Q: I get the error "Unknown map projection: You will have to fill in the projection name and datum in the map info in the .hdr file yourself." when defining a projection using Proj4, what should I do? ===
     4This error is produced when using a projection defined using a Proj4 string that is not OSGB36 NG or UTM and APL doesn't know how to add it to the header file correctly.
     6We've written a script which will add the projection information from a Proj4 string or WKT file ( which is available on GitHub ([]).
     8If you copy the script to the same directory as your mapped files, open a command window and navigate to that directory you should be able to assign the correct projection to all your files using:
     10python --proj4 "+proj=tmerc +lat_0=39.66825833333333 +lon_0=-8.133108333333334 +k=1 +x_0=0 +y_0=0 +ellps=GRS80 +units=m +no_defs" *mapped*.bil
     13or if you have a WKT file you can use:
     15python --wkt ogcwkt.wkt *mapped*.bil
     18Note the use of wild characters '*' to assign the projection to multiple files at once.
     20The tool requires GDAL to run, under Windows if you have QGIS or GRASS installed through OSGeo4W you need to run the tool from the OSGeo4W shell. Another option for installing the GDAL Python bindings is to install [ miniconda] and get GDAL through this using:
     23conda install gdal
     26If you're running OS X, GDAL is also available through conda. For Linux it is available through the package manager.