Issue Details (XML | Word | Printable)

Type: Improvement Improvement
Status: Resolved Resolved
Resolution: Fixed
Priority: Minor Minor
Assignee: dany111
Reporter: newmanw10
Votes: 0
Watchers: 1

If you were logged in you would be able to see more operations.

Add capability to warp/reproject images on read using gdal.AutoCreateWarpVRT

Created: 31/Jul/12 01:50 AM   Updated: 30/Oct/12 12:40 PM   Resolved: 30/Oct/12 12:40 PM
Component/s: gdal-framework
Affects Version/s: current
Fix Version/s: None

Time Tracking:
Original Estimate: 2 days
Original Estimate - 2 days
Remaining Estimate: 2 days
Remaining Estimate - 2 days
Time Spent: Not Specified
Time Spent - Not Specified

File Attachments: 1. Java Source File (51 kB) 31/Jul/12 01:58 AM - newmanw10
2. Java Source File (4 kB) 31/Jul/12 01:58 AM - newmanw10
3. Java Source File (15 kB) 31/Jul/12 01:58 AM - newmanw10
4. Text File imageio-42-patch.txt (21 kB) 01/Aug/12 01:45 AM - newmanw10



Participants: dany111 and newmanw10

 Description  « Hide

The java GDAL bindings support warping a Dataset on the fly when reading an image using gdal.AutoCreateWarpVRT(...).,%20java.lang.String,%20java.lang.String,%20int,%20double)

My suggestion is to modify to accept a new ImageReadParam extension (GDALImageReadParam) that contains the necessary information to pass to the AutoCreateWaprVRT method. The read method could check if the read param is a GDALImageReadParam and if the source projection is different from the destination projection create a virtual warped dataset from the original dataset.

This change would allow users of imageio-ext to warp images being read into any projection recognized by gdal.

newmanw10 added a comment - 31/Jul/12 01:58 AM - edited

Description of attached files:

This reader has modifications to check if the ImageReadParam is of type GDALImageReadParam. If so it will check if the destination projection contained in the GDALImageReadParam is different from the source files projection. If it is different it will use the AutoCreateWarpedVRT from the original dataset.

Extension of ImageReadParam used to pass read parameters specific to reading GDAL images. In this case this class contains parameters needed to warp an image on read.

A new test to pass a GDALImageReadParam with a different projection from the source image and read.

newmanw10 made changes - 31/Jul/12 01:58 AM
Field Original Value New Value
Attachment [ 50731 ]
Attachment [ 50732 ]
Attachment [ 50733 ]
newmanw10 added a comment - 01/Aug/12 01:45 AM - edited

Attached a patch for the modified files. Please ignore the original files attached as there was a small bug. The patch file is correct.

newmanw10 made changes - 01/Aug/12 01:45 AM
Attachment imageio-42-patch.txt [ 50746 ]
dany111 made changes - 29/Oct/12 04:55 PM
Assignee dany111 [ dany111 ]
dany111 made changes - 29/Oct/12 04:55 PM
Status Open [ 1 ] In Progress [ 3 ]
dany111 added a comment - 30/Oct/12 12:40 PM

Fixed on trunk. (check the latest github repository on master branch)
Need some test before porting it to 1.1.x series.

dany111 made changes - 30/Oct/12 12:40 PM
Status In Progress [ 3 ] Resolved [ 5 ]
Resolution Fixed [ 1 ]