2009/7/8 Frank Warmerdam <[email protected]>: > Jorge Arévalo wrote: >> >> Hello, >> >> If I have an OGRGeometry object (said poGeom), I can get its coords by: >> >> OGREnvelope * poE = new OGREnvelope(); >> poGeom->getEnvelope(poE); >> >> // poE->MinX, poE->MinY, poE->MaxX, poE->MaxY are the limit coords >> >> If I want the size of the Geometry: >> >> double dSizeX = poE->MaxX - poE->MinX; >> double dSizeY = poE->MaxY - poE->MinY; >> >> Is it the correct way? > > Jorge, > > This is appropriate for finding the width and height of the > bounding box. Is that what you mean when you say "size"? Size > is not a well defined term all on it's own.
Hello Frank, I'm talking about the nRasterXSize, nRasterYSize of a GDALDataset (this is what I mean with "size"). In the context of the GDAL WKT Raster driver, I can get the extent covered by a raster getting the "extent" column from RASTER_COLUMNS table. If I read this column like an OGRGeometry object, with an OGREnvelope, I can get the upper left coords (poE->MinX, poE->MinY?) and the extent of the raster. But I'm not sure if my operations are correct or there is a better way to do this Many thanks > > Best regards, > -- > ---------------------------------------+-------------------------------------- > I set the clouds in motion - turn up | Frank Warmerdam, > [email protected] > light and sound - activate the windows | http://pobox.com/~warmerdam > and watch the world go round - Rush | Geospatial Programmer for Rent > > _______________________________________________ gdal-dev mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/gdal-dev
