Skip to content

Instantly share code, notes, and snippets.

@underchemist
Created April 4, 2020 20:12
Show Gist options
  • Save underchemist/c244994fc93185a9141dca4141269a6d to your computer and use it in GitHub Desktop.
Save underchemist/c244994fc93185a9141dca4141269a6d to your computer and use it in GitHub Desktop.
GDAL translate produces VRT with invalid schema
from osgeo import gdal, osr
driver = gdal.GetDriverByName("GTiff")
src = driver.Create('/vsimem/test.tif', 32, 32, 1)
srs = osr.SpatialReference()
srs.ImportFromEPSG(4326)
src.SetGCPs((gdal.GCP(0, 0, 0, 0, 0),), srs)
dst = gdal.Translate('/vsimem/test.vrt', src)
print(dst.GetMetadata('xml:vrt'))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment