Opened 17 years ago

Closed 15 years ago

#1532 closed enhancement (wontfix)

Support for reading image using an Envelope in the projected coordinate system

Reported by: szekerest Owned by: tamas
Priority: normal Milestone:
Component: default Version:
Severity: normal Keywords:
Cc:

Description

2007/3/25, Paul, Michael <michael.paul@…>:

the GDALReadDirect were really helpful to minimize the code we need to read GDAL images from C#. But always there is sth missing. We are rarely using GDAL to read a whole image at it's original size. Mostly, we use it to read just a part of it. E.g. one of our test cases is the worldatnight.jpg file. It's envelope is -180,-90,180,90 and size let's say 1800x2400 pixels. Now, to generate a map containing the correct part of this image we have to do some calculations. E.g. if map size is 883x605 pixels and current envelope is -3.34,39.5,-3.20,40.0 the call to band.ReadRaster is still not a trivial thing for unexperienced users. It is another suggestion, but I think the following new call may be added to the wishlist: byte[] buf = band.ReadRaster (int imgWidth, int imgHeight, Envelope env)

I don't know if it should be exactly this syntax or sth similar, but it should be even useful as a new method within GDAL. A good example is the ECW SDK, which is hiding all these inner calculations to the end user. In GDAL it did not find anything similar and remember some initial headaches with it until everything worked correctly. E.g. the map envelope may be totally outside of the image envelope, or the image is only partially contained within the current map, etc. Imagining relatively unexperienced developers with the same problem, I am sure that a direct method call would be widely accepted.

Change History (2)

comment:1 by tamas, 17 years ago

Owner: changed from szekerest to tamas
Severity: blockernormal

comment:2 by tamas, 15 years ago

Resolution: wontfix
Status: newclosed

I close this ticket, currently I'm not keen to introduce new function signatures to do this. ReadRaster/WriteRaster is capable to access subsections of the rasters.

Note: See TracTickets for help on using tickets.