Differences between revisions 12 and 13
Revision 12 as of 2020-05-11 15:35:02
Size: 1927
Editor: JohnWeirich
Comment:
Revision 13 as of 2020-05-11 15:35:16
Size: 1939
Editor: JohnWeirich
Comment:
Deletions are marked like this. Additions are marked like this.
Line 20: Line 20:
 * The -a_ullr is giving the bounds of the DTM in meters. The math is "Upperleft X = (Q*2+1) * GSD (in meters) / 2 * -1" and "UpperLeft Y = (Q*2+1) * GSD / 2". So if the GSD is 20 m with a Q of 425, the math is (425*2+1) * 20 / 2 * -1 = -8510  * The -a_ullr is giving the bounds of the DTM in meters. The math is "Upperleft X = (Q*2+1) * GSD (in meters) / 2 * -1" and "UpperLeft Y = (Q*2+1) * GSD (in meters) / 2". So if the GSD is 20 m with a Q of 425, the math is (425*2+1) * 20 / 2 * -1 = -8510

Instructions to convert a MAP file to other formats

Convert to FITS

  • Use the AltWG toolset to get the proper format

Maplet2FITS --configFile fitsConfig_orex_spc.ini RAD201.MAP RAD201-fullv1.fits
  • An example ini file can be found here fitsConfig_spc.ini.

  • Notes from Ray Espiritu on 5 May 2020 about the ini file "It may look familiar as it has the same format as the nft config files you send me for generating MLNs. Format is KEYWORD#value. Notice that “//” denotes comment lines. This does not allow you to add custom keywords; the keyword has to exactly match a keyword that is normally populated in the fits header."
  • There will still be some header information you will want to change. For this use ChangeFitsHeader, also part of the AltWG distribution toolset.

  • More notes from Ray Espiritu on 5 May 2020 for "This tool allows you to add,delete, or modify keywords in the header. Run “ChangeFitsHeader –examples” to see examples for each operation (add, delete, modify, change). There is a limitation inherent in the fits format in that the new fits header cannot have a size difference of more than 2880 bytes from the old fits header. You shouldn’t encounter that if you are adding or deleting a handful of keywords."

Convert to GeoTIFF

  • First, convert to FITS format (and update headers as necessary).
  • Use GDAL to convert from FITS to GeoTIFF

gdal_translate -a_srs RAD201-v5.prj -a_ullr -8510 8510 8510 -8510 RAD201-fullv1.fits RAD201-fullv1.tif
  • An example of the prj file can be found here, and can be viewed with a text editor such as "vi". RAD201-v5.prj

  • The -a_ullr is giving the bounds of the DTM in meters. The math is "Upperleft X = (Q*2+1) * GSD (in meters) / 2 * -1" and "UpperLeft Y = (Q*2+1) * GSD (in meters) / 2". So if the GSD is 20 m with a Q of 425, the math is (425*2+1) * 20 / 2 * -1 = -8510

Convert MAP (last edited 2021-04-29 10:06:52 by JohnWeirich)