I understand the last paragraph in the quote above. However, my confusion begins when trying to understand the positiongeo-referenced location of the dataa pixels value inwithin the cellpixel itself (height in my case) and the interaction of PixelIsPoint vs PixelIsArea.
By the GDAL documentation, the top-left corner of RasterData[0][0]
has a geo-referenced position of (0
- the top-left corner of
RasterData[0][0]
has a geo-referenced position of (0.0, 0,0) - the bottom-right corner of
RasterData[3][3]
has a geo-referenced position of (4.0, 4.0) - the center of
RasterData[0][0]
has a geo-referenced position of (0.5, 0.5)
This part I believe I understand well enough.0, 0
However,0) and I do not understand how to determine the bottom-right corner of RasterData[3][3]
has a geo(geo-referenced position) location of a pixels data (4.0, 4.0).
First question:
Doeswithin the interpretation ofpixel itself, nor do I understand whether PixelIsPoint / PixelIsArea affect this interpretationaffects the location of the corner positionpixel corners, or the location of a pixels data within the raster? And if sopixel itself.
For example, in what manner? IEI'm not entirely certain whether this is the correct way to create a vertex from this dataset: Could
// loop pixel_y 0 -> height (integer)
// loop pixel_x 0 -> width (integer)
vertex.x = GeoTransform[0] + GeoTransform[1] * pixel_x + GeoTransform[2] * pixel_y;
vertex.y = GeoTransform[3] + GeoTransform[4] * pixel_x + GeoTransform[5] * pixel_y;
vertex.z = RasterData[y][x];
The method above assumes the value of RasterData[y][x]
is geo-referenced at the top-left corner point of RasterData[0][0]
possibly bethe pixel (-0.5,-0.5) or (0.5, 0 this is where my doubt begins.5)?
SecondSo my question is:
Given that RasterData[0][0] == 1.0f
and we interpret that as a height value, does that value correspond most appropriately toHow do I determine the topcorrect geo-left cornerreferenced position of thea given pixel, or to the center of value RasterData[y][x]
when interpreting the pixeldata under PixelIsPoint versus PixelIsArea?
IE: would a vertex generated fromI want to take RasterData[0][0]RasterData[y][x]
would be most appropriate atand (0.0, 0.0, 1.0) orGeoTransform
and generate (0.5X, 0.5Y, 1.0Z)? How does the interpretation of PixelIsPoint / PixelIsArea affect this? vertex positions where:
- The X coordinate is the appropriate geo-referenced position for
RasterData[y][x]
- The Y coordinate is the appropriate geo-referenced position for
RasterData[y][x]
- The Z coordinate is the height value contained in
RasterData[y][x]