TransWikia.com

gdal_merge with python for PDS4 does not generate xml

Geographic Information Systems Asked by Shen on August 1, 2020

When I use gdal_merge to merge two LOLA PDS3 DEMs* into a PDS4 DEM, I do not get a PDS4 xml file. It creates the img file just fine but it does not create the xml file. I am using Python 3.7.6 in Windows with the gdal tool installed from osgeo4w. I have also attempted to installed from QGIS. This is what I typed in the command line:

python gdal_merge.py -of PDS4 -o merged.img SLDEM2015_256_0N_60N_240_360_FLOAT.LBL SLDEM2015_256_60S_0S_240_360_FLOAT.LBL

and the output is:

0...10...20...30...40...50...60...70...80...90...100 - done.
ERROR 1: Cannot find pds4_template.xml and TEMPLATE creation option not specified

I know that I will need an xml file to open this merged DEM; I have tried opening the img file directly but without metadata it doesn’t work. Is there a way to resolve this issue so gdal_merge.py can generate the xml file automatically?

*Data files and associated PDS3 metadata I am using are downloadable here:
http://imbrium.mit.edu/EXTRAS/SLDEM2015/TILES/FLOAT_IMG

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP