Feature request #4236

Write CRS to .aux.xml file when adding raster with no embedded CRS information

Added by Alister Hood over 5 years ago. Updated over 2 years ago.

Status:Open Start Date:08/29/2011
Priority:Normal Due date:
Assigned to:- % Done:

0%

Category:Rasters
Target version:Future Release - Nice to have
Platform:All Resolution:
Platform version: Pull Request or Patch supplied:No
Status info: Tag:

Description

- .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.

History

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[&quot;GD_1949_New_Zealand_Map_Grid&quot;,GEOGCS[&quot;GCS_New_Zealand_1949&quot;,DATUM[&quot;D_New_Zealand_1949&quot;,SPHEROID[&quot;International_1924&quot;,6378388.0,297.0]],PRIMEM[&quot;Greenwich&quot;,0.0],UNIT[&quot;Degree&quot;,0.0174532925199433]],PROJECTION[&quot;New_Zealand_Map_Grid&quot;],PARAMETER[&quot;False_Easting&quot;,2510000.0],PARAMETER[&quot;False_Northing&quot;,6023150.0],PARAMETER[&quot;Central_Meridian&quot;,173.0],PARAMETER[&quot;Latitude_Of_Origin&quot;,-41.0],UNIT[&quot;Meter&quot;,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 over 5 years ago

  • Target version set to Version 1.7.4

Updated by Giovanni Manghi almost 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