<div style>Hello gdal-dev group,<br><br>I have a question that I'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 ` ' - 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 ` ' - 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:'courier new',monospace"><b>Command_line> gdalwarp </b></font><font color="#222222" face="'courier new', 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:'courier new',monospace">Creating output file that is 10000P x 10000L.</div><div style="font-family:'courier new',monospace">
Processing input file 457000_7200000.tif.</div><div style="font-family:'courier new',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:'courier new',monospace">Command_line> </b><font face="'courier new', 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="'courier new', monospace">Driver: GTiff/GeoTIFF</font></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif"><font face="'courier new', monospace"><b>Files: 457000_7200000Test.tif</b></font></div>
<div style="color:rgb(34,34,34);font-family:arial,sans-serif"><font face="'courier new', monospace">Size is 10000, 10000</font></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif"><font face="'courier new', monospace" color="#ff0000">Coordinate System is:</font></div>
<div style="color:rgb(34,34,34);font-family:arial,sans-serif"><font face="'courier new', monospace" color="#ff0000">PROJCS["WGS 84 / UTM zone 56S",</font></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif">
<font face="'courier new', monospace" color="#ff0000"> GEOGCS["WGS 84",</font></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif"><font face="'courier new', monospace" color="#ff0000"> DATUM["WGS_1984",</font></div>
<div style="color:rgb(34,34,34);font-family:arial,sans-serif"><font face="'courier new', monospace" color="#ff0000"> SPHEROID["WGS 84",6378137,298.257223563,</font></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif">
<font face="'courier new', monospace" color="#ff0000"> AUTHORITY["EPSG","7030"]],</font></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif"><font face="'courier new', monospace" color="#ff0000"> AUTHORITY["EPSG","6326"]],</font></div>
<div style="color:rgb(34,34,34);font-family:arial,sans-serif"><font face="'courier new', monospace" color="#ff0000"> PRIMEM["Greenwich",0],</font></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif">
<font face="'courier new', monospace" color="#ff0000"> UNIT["degree",0.0174532925199433],</font></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif"><font face="'courier new', monospace" color="#ff0000"> AUTHORITY["EPSG","4326"]],</font></div>
<div style="color:rgb(34,34,34);font-family:arial,sans-serif"><font face="'courier new', monospace" color="#ff0000"> PROJECTION["Transverse_Mercator"],</font></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif">
<font face="'courier new', monospace" color="#ff0000"> PARAMETER["latitude_of_origin",0],</font></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif"><font face="'courier new', monospace" color="#ff0000"> PARAMETER["central_meridian",153],</font></div>
<div style="color:rgb(34,34,34);font-family:arial,sans-serif"><font face="'courier new', monospace" color="#ff0000"> PARAMETER["scale_factor",0.9996],</font></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif">
<font face="'courier new', monospace" color="#ff0000"> PARAMETER["false_easting",500000],</font></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif"><font face="'courier new', monospace" color="#ff0000"> PARAMETER["false_northing",10000000],</font></div>
<div style="color:rgb(34,34,34);font-family:arial,sans-serif"><font face="'courier new', monospace" color="#ff0000"> UNIT["metre",1,</font></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif">
<font face="'courier new', monospace" color="#ff0000"> AUTHORITY["EPSG","9001"]],</font></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif"><font face="'courier new', monospace" color="#ff0000"> AUTHORITY["EPSG","32756"]]</font></div>
<div style="color:rgb(34,34,34);font-family:arial,sans-serif"><font face="'courier new', monospace">Origin = (457000.000000000000000,7200000.000000000000000)</font></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif">
<font face="'courier new', monospace">Pixel Size = (0.100000000000000,-0.100000000000000)</font></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif"><font face="'courier new', monospace">Metadata:</font></div>
<div style="color:rgb(34,34,34);font-family:arial,sans-serif"><font face="'courier new', monospace"> AREA_OR_POINT=Area</font></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif"><font face="'courier new', monospace">Image Structure Metadata:</font></div>
<div style="color:rgb(34,34,34);font-family:arial,sans-serif"><font face="'courier new', monospace"> INTERLEAVE=PIXEL</font></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif"><font face="'courier new', monospace">Corner Coordinates:</font></div>
<div style="color:rgb(34,34,34);font-family:arial,sans-serif"><font face="'courier new', monospace">Upper Left ( 457000.000, 7200000.000) (152d34'22.01"E, 25d18'57.36"S)</font></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif">
<font face="'courier new', monospace">Lower Left ( 457000.000, 7199000.000) (152d34'21.89"E, 25d19'29.87"S)</font></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif"><font face="'courier new', monospace">Upper Right ( 458000.000, 7200000.000) (152d34'57.77"E, 25d18'57.47"S)</font></div>
<div style="color:rgb(34,34,34);font-family:arial,sans-serif"><font face="'courier new', monospace">Lower Right ( 458000.000, 7199000.000) (152d34'57.66"E, 25d19'29.98"S)</font></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif">
<font face="'courier new', monospace">Center ( 457500.000, 7199500.000) (152d34'39.84"E, 25d19'13.67"S)</font></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif"><font face="'courier new', 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="'courier new', 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="'courier new', 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:'courier new',monospace"><br>
Command_line></b><b style="color:rgb(0,0,102)"><font face="arial, sans-serif"> </font></b><span style="font-family:'courier new',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="'courier new', monospace">Input file size is 10000, 10000</font></div><div style="font-family:arial,sans-serif"><font face="'courier new', 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:'courier new',monospace">Command_line></b><b style="color:rgb(0,0,102)"><font face="arial, sans-serif"> </font></b><span style="font-family:'courier new',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:'courier new',monospace"><br>Command_line> </b><font face="'courier new', monospace">gdalinfo 457000_7200000Test.jp2</font></div>
<div style="color:rgb(34,34,34);font-family:arial,sans-serif"><font face="'courier new', 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="'courier new', monospace">Files: 457000_7200000Test.jp2</font></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif"><font face="'courier new', monospace">Size is 10000, 10000</font></div>
<div style="color:rgb(34,34,34);font-family:arial,sans-serif"><font face="'courier new', monospace">Coordinate System is `'</font></div><div class="im" style="color:rgb(80,0,80);font-family:arial,sans-serif">
<div>
<font face="'courier new', monospace">Image Structure Metadata:</font></div><div><font face="'courier new', monospace"> INTERLEAVE=PIXEL</font></div><div><font face="'courier new', monospace">Corner Coordinates:</font></div>
</div><div style="color:rgb(34,34,34);font-family:arial,sans-serif"><font face="'courier new', monospace">Upper Left ( 0.0, 0.0)</font></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif"><font face="'courier new', monospace">Lower Left ( 0.0,10000.0)</font></div>
<div style="color:rgb(34,34,34);font-family:arial,sans-serif"><font face="'courier new', monospace">Upper Right (10000.0, 0.0)</font></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif"><font face="'courier new', monospace">Lower Right (10000.0,10000.0)</font></div>
<div style="color:rgb(34,34,34);font-family:arial,sans-serif"><font face="'courier new', monospace">Center ( 5000.0, 5000.0)</font></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif"><font face="'courier new', 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="'courier new', 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="'courier new', 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>