<div style>Hello gdal-dev group,<br><br>I have a question that I&#39;m wondering if you can answer.  I have GDAL 1.9 SVN on my machine, and I am having issues getting the projection coordinate system (PROJCS) inside the JP2 headers <b style="font-style:italic">without </b>the accompanying XML/GML sidecar (i.e. when sidecar is removed, running GDALINFO on the JP2 shows ` &#39;  - blank coordinate system).</div>

<div style><br>I have been experimenting with GDALWARP and have managed to get the PROJCS in the GeoTiff headers (for TIFF files that previously also showed ` &#39; - blank projection coord. system)  using the target reference system arguement -t_srs  .. BUT.. have not managed to get this info to show in the JP2 headers without an accompanying XML/GML sidecar file <br>

<br><i>i.e. when running GDAL_TRANSLATE </i><i>and using the -a_srs argument (assign SRS (spatial reference system) to output) to create a JP2 from</i><i> one of these GeoTiffs (using OPENJpeg2000 raster driver) - the PROJCS does not show in the JP2 file header, if the XML/GML file is removed - upon running GDALINFO on this JP2 file </i></div>

<div style><i><br></i></div><div style><i>..command-lines, follow.. (below):</i></div><div style><br></div><div style><div><font color="#000066" style="color:rgb(34,34,34);font-family:&#39;courier new&#39;,monospace"><b>Command_line&gt;  gdalwarp </b></font><font color="#222222" face="&#39;courier new&#39;, monospace">-of GTiff -t_srs EPSG:32756 457000_7200000.tif 457000_7200000Test.tif</font><br>

<div><div style="color:rgb(34,34,34);font-family:arial,sans-serif"><div style="font-family:&#39;courier new&#39;,monospace">Creating output file that is 10000P x 10000L.</div><div style="font-family:&#39;courier new&#39;,monospace">

Processing input file 457000_7200000.tif.</div><div style="font-family:&#39;courier new&#39;,monospace">0...10...20...30...40...50...60...70...80...90...100 - done.<br><br></div><b style="color:rgb(0,0,102);font-family:&#39;courier new&#39;,monospace">Command_line&gt;  </b><font face="&#39;courier new&#39;, monospace"><font color="#000066"><b>gdalinfo</b> </font>457000_7200000Test.tif</font></div>

<div style="color:rgb(34,34,34);font-family:arial,sans-serif"><font face="&#39;courier new&#39;, monospace">Driver: GTiff/GeoTIFF</font></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif"><font face="&#39;courier new&#39;, monospace"><b>Files: 457000_7200000Test.tif</b></font></div>

<div style="color:rgb(34,34,34);font-family:arial,sans-serif"><font face="&#39;courier new&#39;, monospace">Size is 10000, 10000</font></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif"><font face="&#39;courier new&#39;, monospace" color="#ff0000">Coordinate System is:</font></div>

<div style="color:rgb(34,34,34);font-family:arial,sans-serif"><font face="&#39;courier new&#39;, monospace" color="#ff0000">PROJCS[&quot;WGS 84 / UTM zone 56S&quot;,</font></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif">

<font face="&#39;courier new&#39;, monospace" color="#ff0000">    GEOGCS[&quot;WGS 84&quot;,</font></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif"><font face="&#39;courier new&#39;, monospace" color="#ff0000">        DATUM[&quot;WGS_1984&quot;,</font></div>

<div style="color:rgb(34,34,34);font-family:arial,sans-serif"><font face="&#39;courier new&#39;, monospace" color="#ff0000">            SPHEROID[&quot;WGS 84&quot;,6378137,298.257223563,</font></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif">

<font face="&#39;courier new&#39;, monospace" color="#ff0000">                AUTHORITY[&quot;EPSG&quot;,&quot;7030&quot;]],</font></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif"><font face="&#39;courier new&#39;, monospace" color="#ff0000">            AUTHORITY[&quot;EPSG&quot;,&quot;6326&quot;]],</font></div>

<div style="color:rgb(34,34,34);font-family:arial,sans-serif"><font face="&#39;courier new&#39;, monospace" color="#ff0000">        PRIMEM[&quot;Greenwich&quot;,0],</font></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif">

<font face="&#39;courier new&#39;, monospace" color="#ff0000">        UNIT[&quot;degree&quot;,0.0174532925199433],</font></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif"><font face="&#39;courier new&#39;, monospace" color="#ff0000">        AUTHORITY[&quot;EPSG&quot;,&quot;4326&quot;]],</font></div>

<div style="color:rgb(34,34,34);font-family:arial,sans-serif"><font face="&#39;courier new&#39;, monospace" color="#ff0000">    PROJECTION[&quot;Transverse_Mercator&quot;],</font></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif">

<font face="&#39;courier new&#39;, monospace" color="#ff0000">    PARAMETER[&quot;latitude_of_origin&quot;,0],</font></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif"><font face="&#39;courier new&#39;, monospace" color="#ff0000">    PARAMETER[&quot;central_meridian&quot;,153],</font></div>

<div style="color:rgb(34,34,34);font-family:arial,sans-serif"><font face="&#39;courier new&#39;, monospace" color="#ff0000">    PARAMETER[&quot;scale_factor&quot;,0.9996],</font></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif">

<font face="&#39;courier new&#39;, monospace" color="#ff0000">    PARAMETER[&quot;false_easting&quot;,500000],</font></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif"><font face="&#39;courier new&#39;, monospace" color="#ff0000">    PARAMETER[&quot;false_northing&quot;,10000000],</font></div>

<div style="color:rgb(34,34,34);font-family:arial,sans-serif"><font face="&#39;courier new&#39;, monospace" color="#ff0000">    UNIT[&quot;metre&quot;,1,</font></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif">

<font face="&#39;courier new&#39;, monospace" color="#ff0000">        AUTHORITY[&quot;EPSG&quot;,&quot;9001&quot;]],</font></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif"><font face="&#39;courier new&#39;, monospace" color="#ff0000">    AUTHORITY[&quot;EPSG&quot;,&quot;32756&quot;]]</font></div>

<div style="color:rgb(34,34,34);font-family:arial,sans-serif"><font face="&#39;courier new&#39;, monospace">Origin = (457000.000000000000000,7200000.000000000000000)</font></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif">

<font face="&#39;courier new&#39;, monospace">Pixel Size = (0.100000000000000,-0.100000000000000)</font></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif"><font face="&#39;courier new&#39;, monospace">Metadata:</font></div>

<div style="color:rgb(34,34,34);font-family:arial,sans-serif"><font face="&#39;courier new&#39;, monospace">  AREA_OR_POINT=Area</font></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif"><font face="&#39;courier new&#39;, monospace">Image Structure Metadata:</font></div>

<div style="color:rgb(34,34,34);font-family:arial,sans-serif"><font face="&#39;courier new&#39;, monospace">  INTERLEAVE=PIXEL</font></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif"><font face="&#39;courier new&#39;, monospace">Corner Coordinates:</font></div>

<div style="color:rgb(34,34,34);font-family:arial,sans-serif"><font face="&#39;courier new&#39;, monospace">Upper Left  (  457000.000, 7200000.000) (152d34&#39;22.01&quot;E, 25d18&#39;57.36&quot;S)</font></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif">

<font face="&#39;courier new&#39;, monospace">Lower Left  (  457000.000, 7199000.000) (152d34&#39;21.89&quot;E, 25d19&#39;29.87&quot;S)</font></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif"><font face="&#39;courier new&#39;, monospace">Upper Right (  458000.000, 7200000.000) (152d34&#39;57.77&quot;E, 25d18&#39;57.47&quot;S)</font></div>

<div style="color:rgb(34,34,34);font-family:arial,sans-serif"><font face="&#39;courier new&#39;, monospace">Lower Right (  458000.000, 7199000.000) (152d34&#39;57.66&quot;E, 25d19&#39;29.98&quot;S)</font></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif">

<font face="&#39;courier new&#39;, monospace">Center      (  457500.000, 7199500.000) (152d34&#39;39.84&quot;E, 25d19&#39;13.67&quot;S)</font></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif"><font face="&#39;courier new&#39;, monospace">Band 1 Block=10000x1 Type=Byte, ColorInterp=Red</font></div>

<div style="color:rgb(34,34,34);font-family:arial,sans-serif"><font face="&#39;courier new&#39;, monospace">Band 2 Block=10000x1 Type=Byte, ColorInterp=Green</font></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif">

<font face="&#39;courier new&#39;, monospace">Band 3 Block=10000x1 Type=Byte, ColorInterp=Blue</font></div></div><div style="color:rgb(34,34,34)"><b style="color:rgb(0,0,102);font-family:&#39;courier new&#39;,monospace"><br>

Command_line&gt;</b><b style="color:rgb(0,0,102)"><font face="arial, sans-serif">    </font></b><span style="font-family:&#39;courier new&#39;,monospace">gdal_translate -of JP2OpenJPEG -a_srs EPSG:32756 457000_7200000Test.tif 457000_7200000Test.jp2</span>
</div><div style="color:rgb(34,34,34)"><div style="font-family:arial,sans-serif"><font face="&#39;courier new&#39;, monospace">Input file size is 10000, 10000</font></div><div style="font-family:arial,sans-serif"><font face="&#39;courier new&#39;, monospace">0...10...20...30...40...50...60...70...80...90...100 - done.<br>

<br></font></div><b style="color:rgb(0,0,102);font-family:&#39;courier new&#39;,monospace">Command_line&gt;</b><b style="color:rgb(0,0,102)"><font face="arial, sans-serif">    </font></b><span style="font-family:&#39;courier new&#39;,monospace">del 457000_7200000Test.*.*.xml</span><font face="arial, sans-serif"> </font></div>

<div style="color:rgb(34,34,34);font-family:arial,sans-serif"><b style="color:rgb(0,0,102);font-family:&#39;courier new&#39;,monospace"><br>Command_line&gt;  </b><font face="&#39;courier new&#39;, monospace">gdalinfo 457000_7200000Test.jp2</font></div>

<div style="color:rgb(34,34,34);font-family:arial,sans-serif"><font face="&#39;courier new&#39;, monospace">Driver: JP2OpenJPEG/JPEG-2000 driver based on OpenJPEG library</font></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif">

<font face="&#39;courier new&#39;, monospace">Files: 457000_7200000Test.jp2</font></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif"><font face="&#39;courier new&#39;, monospace">Size is 10000, 10000</font></div>

<div style="color:rgb(34,34,34);font-family:arial,sans-serif"><font face="&#39;courier new&#39;, monospace">Coordinate System is `&#39;</font></div><div class="im" style="color:rgb(80,0,80);font-family:arial,sans-serif">
<div>
<font face="&#39;courier new&#39;, monospace">Image Structure Metadata:</font></div><div><font face="&#39;courier new&#39;, monospace">  INTERLEAVE=PIXEL</font></div><div><font face="&#39;courier new&#39;, monospace">Corner Coordinates:</font></div>

</div><div style="color:rgb(34,34,34);font-family:arial,sans-serif"><font face="&#39;courier new&#39;, monospace">Upper Left  (    0.0,    0.0)</font></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif"><font face="&#39;courier new&#39;, monospace">Lower Left  (    0.0,10000.0)</font></div>

<div style="color:rgb(34,34,34);font-family:arial,sans-serif"><font face="&#39;courier new&#39;, monospace">Upper Right (10000.0,    0.0)</font></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif"><font face="&#39;courier new&#39;, monospace">Lower Right (10000.0,10000.0)</font></div>

<div style="color:rgb(34,34,34);font-family:arial,sans-serif"><font face="&#39;courier new&#39;, monospace">Center      ( 5000.0, 5000.0)</font></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif"><font face="&#39;courier new&#39;, monospace">Band 1 Block=1024x1024 Type=Byte, ColorInterp=Red</font></div>

<div style="color:rgb(34,34,34);font-family:arial,sans-serif"><font face="&#39;courier new&#39;, monospace">Band 2 Block=1024x1024 Type=Byte, ColorInterp=Green</font></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif">

<font face="&#39;courier new&#39;, monospace">Band 3 Block=1024x1024 Type=Byte, ColorInterp=Blue<br></font></div></div></div><div><br></div><div><br></div>Best Regards,<br>--------------------<br>Ahmed Asker<div>Google Earth Builder Administrator, ROAMES (<span style="font-family:Arial,sans-serif;font-size:13px;background-color:rgb(239,239,239)">Remote | Observation | Automated | Modelling | Economic | Simulation ©)</span></div>


<div>Ergon Energy<br>Mobile:    <a href="tel:0402%20058%20325" value="+61402058325" target="_blank">0402 058 325</a><br>Phone:    <a href="tel:%2807%29%203228%208124" value="+61732288124" target="_blank">(07) 3228 8124</a></div>

<div>Email:     <a href="mailto:ahmed.asker@roames.com.au" target="_blank">ahmed.asker@roames.com.au</a></div><div>Web:       <a href="http://www.roames.com.au" target="_blank">http://www.roames.com.au</a><br>
<img src="https://www.google.com/a/roames.com.au/images/logo.gif?alpha=1"><br></div><br>