Feature request #4236
Write CRS to .aux.xml file when adding raster with no embedded CRS information
|Assigned to:||-||% Done:||
|Target version:||Future Release - Nice to have|
|Platform version:||Pull Request or Patch supplied:||No|
- .prj or .qpj files are not supported for raster formats
- Some raster formats (e.g. jpeg, bitmap) cannot include coordinate or projection information. These formats are typically used with world files to provide the coordinate information, in which case QGIS prompts for the CRS when the layer is added.
- as well as a world file, some raster files georeferenced by ArcGIS include projection information in a PAM (.aux.xml) file. QGIS supports this information (QGIS does not prompt for CRS if it is present).
It would be good if QGIS could create .aux.xml files containing CRS information, probably after prompting for CRS when a raster layer is added.
N.B. I guess maybe this functionality would require improvements to Gdal.
Updated by Alister Hood over 5 years ago
Just for information, here is an example .aux.xml which defines CRS:
<PAMDataset> <Metadata domain="xml:ESRI" format="xml"> <GeodataXform xsi:type="typens:IdentityXform" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:typens="http://www.esri.com/schemas/ArcGIS/9.2"> <SpatialReference xsi:type="typens:ProjectedCoordinateSystem"> <WKT>PROJCS["GD_1949_New_Zealand_Map_Grid",GEOGCS["GCS_New_Zealand_1949",DATUM["D_New_Zealand_1949",SPHEROID["International_1924",6378388.0,297.0]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["New_Zealand_Map_Grid"],PARAMETER["False_Easting",2510000.0],PARAMETER["False_Northing",6023150.0],PARAMETER["Central_Meridian",173.0],PARAMETER["Latitude_Of_Origin",-41.0],UNIT["Meter",1.0]]</WKT> <XOrigin>-149973.520044524</XOrigin> <YOrigin>-339656.819984179</YOrigin> <XYScale>1052125299.09217</XYScale> <ZOrigin>0</ZOrigin> <ZScale>8192</ZScale> <MOrigin>-100000</MOrigin> <MScale>10000</MScale> <XYTolerance>0.001</XYTolerance> <ZTolerance>2</ZTolerance> <MTolerance>2</MTolerance> <HighPrecision>true</HighPrecision> </SpatialReference> </GeodataXform> </Metadata> </PAMDataset>
Updated by Giovanni Manghi about 5 years ago
- Target version changed from Version 1.7.4 to Version 2.0.0
Updated by Pirmin Kalberer over 4 years ago
- Target version changed from Version 2.0.0 to Future Release - Nice to have
Updated by Miroslav Umlauf over 2 years ago
It actually would be nice to have. And it shouldn't be that hard. When I am creating JPGs from TIF with -co WORDFILE=YES it actually creates *.wld file plus .aux.xml with:
<PAMDataset> <SRS>PROJCS["WGS 84 / Pseudo-Mercator",...]</SRS> </PAMDataset>
JPGs created this way are opened by QGIS straight (QGIS does not prompt for CRS).
Also available in: Atom