<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=us-ascii"><meta name=Generator content="Microsoft Word 14 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:"Lucida Sans Typewriter";
        panose-1:2 11 5 9 3 5 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
        {mso-style-priority:34;
        margin-top:0in;
        margin-right:0in;
        margin-bottom:0in;
        margin-left:.5in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri","sans-serif";}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
/* List Definitions */
@list l0
        {mso-list-id:142703423;
        mso-list-type:hybrid;
        mso-list-template-ids:116809252 67698705 67698713 67698715 67698703 67698713 67698715 67698703 67698713 67698715;}
@list l0:level1
        {mso-level-text:"%1\)";
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l0:level2
        {mso-level-number-format:alpha-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l0:level3
        {mso-level-number-format:roman-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:right;
        text-indent:-9.0pt;}
@list l0:level4
        {mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l0:level5
        {mso-level-number-format:alpha-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l0:level6
        {mso-level-number-format:roman-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:right;
        text-indent:-9.0pt;}
@list l0:level7
        {mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l0:level8
        {mso-level-number-format:alpha-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l0:level9
        {mso-level-number-format:roman-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:right;
        text-indent:-9.0pt;}
ol
        {margin-bottom:0in;}
ul
        {margin-bottom:0in;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=EN-US link=blue vlink=purple><div class=WordSection1><p class=MsoNormal>Hi,<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>I have a JP2 image whose extent is supposed to be from (0E deg , 0N deg) to (10E deg, 10N deg) but gdalinfo (from FWTools 2.4.7) is reporting extents that are off by 0.5 pixel north and west. The GML identifies the origin of the image as (0E deg, 10N deg). My understanding is that GDAL automatically adjusts to account for pixel center vs. pixel corner format differences and always reports pixel corners. What I’m not sure of is whether GML thinks the origin is centered on the top left pixel or at the top left corner of the top left pixel.<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Can someone tell me whether I need to submit a bug against:<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoListParagraph style='text-indent:-.25in;mso-list:l0 level1 lfo1'><![if !supportLists]><span style='mso-list:Ignore'>1)<span style='font:7.0pt "Times New Roman"'> </span></span><![endif]>GDAL<o:p></o:p></p><p class=MsoListParagraph style='text-indent:-.25in;mso-list:l0 level1 lfo1'><![if !supportLists]><span style='mso-list:Ignore'>2)<span style='font:7.0pt "Times New Roman"'> </span></span><![endif]>JP2 writer<o:p></o:p></p><p class=MsoListParagraph style='text-indent:-.25in;mso-list:l0 level1 lfo1'><![if !supportLists]><span style='mso-list:Ignore'>3)<span style='font:7.0pt "Times New Roman"'> </span></span><![endif]>Me<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Thanks,<o:p></o:p></p><p class=MsoNormal>Scott<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Lucida Sans Typewriter"'>Driver: JP2ECW/ERMapper JPEG2000<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Lucida Sans Typewriter"'>Files: e:\TestData\junk.jp2<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Lucida Sans Typewriter"'>Size is 256, 256<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Lucida Sans Typewriter"'>Coordinate System is:<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Lucida Sans Typewriter"'>GEOGCS["WGS 84",<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Lucida Sans Typewriter"'> DATUM["WGS_1984",<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Lucida Sans Typewriter"'> SPHEROID["WGS 84",6378137,298.257223563,<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Lucida Sans Typewriter"'> AUTHORITY["EPSG","7030"]],<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Lucida Sans Typewriter"'> AUTHORITY["EPSG","6326"]],<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Lucida Sans Typewriter"'> PRIMEM["Greenwich",0,<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Lucida Sans Typewriter"'> AUTHORITY["EPSG","8901"]],<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Lucida Sans Typewriter"'> UNIT["degree",0.01745329251994328,<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Lucida Sans Typewriter"'> AUTHORITY["EPSG","9122"]],<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Lucida Sans Typewriter"'> AUTHORITY["EPSG","4326"],<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Lucida Sans Typewriter"'> AXIS["Latitude",NORTH],<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Lucida Sans Typewriter"'> AXIS["Longitude",EAST]]<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Lucida Sans Typewriter"'>GeoTransform =<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Lucida Sans Typewriter"'> 10.01953125, 0, -0.0390625<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Lucida Sans Typewriter"'> -0.01953125, 0.0390625, 0<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Lucida Sans Typewriter"'>Corner Coordinates:<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Lucida Sans Typewriter"'>Upper Left ( 10.0195313, -0.0195313) ( 10d 1'10.31"E, 0d 1'10.31"S)<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Lucida Sans Typewriter"'>Lower Left ( 0.0195313, -0.0195313) ( 0d 1'10.31"E, 0d 1'10.31"S)<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Lucida Sans Typewriter"'>Upper Right ( 10.0195313, 9.9804688) ( 10d 1'10.31"E, 9d58'49.69"N)<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Lucida Sans Typewriter"'>Lower Right ( 0.0195313, 9.9804688) ( 0d 1'10.31"E, 9d58'49.69"N)<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Lucida Sans Typewriter"'>Center ( 5.0195313, 4.9804688) ( 5d 1'10.31"E, 4d58'49.69"N)<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Lucida Sans Typewriter"'>Band 1 Block=256x1 Type=Byte, ColorInterp=Red<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Lucida Sans Typewriter"'> Overviews: arbitrary<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Lucida Sans Typewriter"'>Band 2 Block=256x1 Type=Byte, ColorInterp=Green<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Lucida Sans Typewriter"'> Overviews: arbitrary<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Lucida Sans Typewriter"'>Band 3 Block=256x1 Type=Byte, ColorInterp=Blue<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Lucida Sans Typewriter"'> Overviews: arbitrary<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Lucida Sans Typewriter"'>Band 4 Block=256x1 Type=Byte, ColorInterp=Undefined<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Lucida Sans Typewriter"'> Overviews: arbitrary<o:p></o:p></span></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>The GML embedded in the file is<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Lucida Sans Typewriter"'><gml:FeatureCollection<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Lucida Sans Typewriter"'> xmlns:gml="http://www.opengis.net/gml"<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Lucida Sans Typewriter"'> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Lucida Sans Typewriter"'> xsi:schemaLocation="http://www.opengis.net/gml http://www.math.ubc.ca/~burggraf/gml/gml4jp2.xsd"><o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Lucida Sans Typewriter"'> <gml:boundedBy><o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Lucida Sans Typewriter"'> <gml:Null>withheld</gml:Null><o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Lucida Sans Typewriter"'> </gml:boundedBy><o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Lucida Sans Typewriter"'> <gml:featureMember><o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Lucida Sans Typewriter"'> <gml:RectifiedGridCoverage dimension="2" gml:id="RGC0001"><o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Lucida Sans Typewriter"'> <gml:rectifiedGridDomain><o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Lucida Sans Typewriter"'> <gml:RectifiedGrid dimension="2"><o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Lucida Sans Typewriter"'> <gml:limits><o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Lucida Sans Typewriter"'> <gml:GridEnvelope><o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Lucida Sans Typewriter"'> <gml:low>0 0</gml:low><o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Lucida Sans Typewriter"'> <gml:high>255 255</gml:high><o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Lucida Sans Typewriter"'> </gml:GridEnvelope><o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Lucida Sans Typewriter"'> </gml:limits><o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Lucida Sans Typewriter"'> <gml:axisName>x</gml:axisName><o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Lucida Sans Typewriter"'> <gml:axisName>y</gml:axisName><o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Lucida Sans Typewriter"'> <gml:origin><o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Lucida Sans Typewriter"'> <gml:Point gml:id="P0001" srsName="urn:ogc:def:crs:EPSG::4326"><o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Lucida Sans Typewriter"'> <gml:pos>0.0000000000000 10.0000000000000</gml:pos><o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Lucida Sans Typewriter"'> </gml:Point><o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Lucida Sans Typewriter"'> </gml:origin><o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Lucida Sans Typewriter"'> <gml:offsetVector srsName="urn:ogc:def:crs:EPSG::4326">0.0390625000000 -0.0000000000000</gml:offsetVector><o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Lucida Sans Typewriter"'> <gml:offsetVector srsName="urn:ogc:def:crs:EPSG::4326">-0.0000000000000 -0.0390625000000</gml:offsetVector><o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Lucida Sans Typewriter"'> </gml:RectifiedGrid><o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Lucida Sans Typewriter"'> </gml:rectifiedGridDomain><o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Lucida Sans Typewriter"'> </gml:RectifiedGridCoverage><o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Lucida Sans Typewriter"'> </gml:featureMember><o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Lucida Sans Typewriter"'></gml:FeatureCollection><o:p></o:p></span></p><p class=MsoNormal><o:p> </o:p></p></div></body></html>