[Gdal-dev] Warping of large files
fwarmerdam at gmail.com
Thu Apr 14 11:25:26 EDT 2005
On 4/14/05, Asger Petersen <asger at jo-informatik.dk> wrote:
> Hi list
> I would really appreciate some advice on this problem:
> I have received a couple of large (½-1GB) ecw-files that are geocoded in an obscure coordinate system. I have to display these files via WMS using mapserver, so it is necessary to reproject them. I have a coordinate transformation program that allows me to transform the obscure coordinates to coordinates in more known systems like utm.
> I imagined doing something like:
> 1) use gdal_translate to add GCPs with coordinates in utm
> 2) use gdalwarp to warp the image into utm projection
> 3) compress image to ecw (as our mapserver doesn't support jp2 at the moment)
> This method is fine for small images, but it is not suitable for my large files because I can't get an appropriate rw+ format to work with the warp. Gtiff is out of the question as the resulting files are way too big for this format. Using the --formats option the JP2ECW is shown to be rw+, but the driver keeps throwing a "ERROR 5: destination band 1 appears to be read-only." error. As I understand it compressing large files to ecw could also be a problem due to some limitation in the ecw sdk.
> Of course i could chop the files into pieces small enough to use Gtiff and then mosaik them in Mapserver, but I would really prefer keeping them in one piece.
The JP2ECW driver is a special case. It supports Create() and write
but only if the writes are full scanlines written sequentially. This is a
violation of the general model, but was necessary for internal use of
GDAL at ERMapper. I may well disable this Create support in general
builds to avoid confusion.
I would suggest you write out to a format that supports large files as
the intermediate. Likely PAux format would do fine for your needs, but
you could also use a format like Erdas Imagine (HFA driver).
I set the clouds in motion - turn up | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush | Geospatial Programmer for Rent
More information about the Gdal-dev