<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META NAME="Generator" CONTENT="MS Exchange Server version 6.5.7226.0">
<TITLE>question about AsciiGrid</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/rtf format -->
<P><FONT SIZE=2 FACE="Arial">Hi,</FONT>
</P>
<P><FONT SIZE=2 FACE="Arial">In our framework, we are encapsulating GDAL.</FONT>
<BR><FONT SIZE=2 FACE="Arial">For all the raster and elevation formats, we define that the value for a pixel is specified at its center.</FONT>
<BR><FONT SIZE=2 FACE="Arial">This means that, when we are accessing a position in the data with a georeference, we interpolate between the 4 pixels around the requested value.</FONT></P>
<P><FONT SIZE=2 FACE="Arial">In my code, I put the 4 corners of the dataset into GCP (GDALCreateGCPTransformer) and I'm using GDALGCPTransform to get the pixel as double.</FONT></P>
<P><FONT SIZE=2 FACE="Arial">the problem that I'm facing is for asciigrid.</FONT>
<BR><FONT SIZE=2 FACE="Arial">In an elevation data (asciigrid or dted), the pixels are representing a posting point, and not a surface.</FONT>
<BR><FONT SIZE=2 FACE="Arial">This means that outside the box defined by the lowerleft and the upperleft postings, the data is not defined.</FONT>
<BR><FONT SIZE=2 FACE="Arial">For a DTED, all is fine, because a dted posting is defined a the lowerleft corner of the pixel.</FONT>
<BR><FONT SIZE=2 FACE="Arial">But for the asciigrid, the definition of the pixel posting is</FONT>
<BR><FONT SIZE=2 FACE="Arial">So, if the asciigrid is defined with xllcenter and yllcenter, asking for a pixel between [0,0.5[ or ]nXSize-0.5,nXSize] returns an undefined value (same for y).</FONT></P>
<P><FONT SIZE=2 FACE="Arial">in the case where the asciigrid is defined with xllcorner/yllcorner, the undefined values are from ]nXSize-1,nXSize]</FONT>
</P>
<P><FONT SIZE=2 FACE="Arial">In my framework, I change the georeferenced bounding box to take in account this 1/2 pixel deplacement.</FONT>
<BR><FONT SIZE=2 FACE="Arial">But for asciigrid, I need to know if the asciigrid is defined with xllcenter/yllcenter or xllcorner/yllcorner.</FONT>
</P>
<P><FONT SIZE=2 FACE="Arial">Is there a way to get this information, once I have the GDALDataset ?</FONT>
</P>
<BR>
</BODY>
</HTML>