Opened 17 years ago

Closed 17 years ago

#1921 closed task (fixed)

gdal_retile.py for retiling tiled data sets, building tiled pyramids and writing the tileindex as a shape file

Reported by: mcr Owned by: warmerdam
Priority: normal Milestone: 1.5.0
Component: GDAL_Raster Version: unspecified
Severity: normal Keywords: gdal_retile tiled pyramids
Cc: hobu

Description (last modified by warmerdam)

I wrote a gdal_retile.py utility for retiling a tiled dataset. Building tiled pyramids is also supported. At the moment I do a some tests on large data sets. As an attachment you find a first version of the man page. My questions are

  1. Are you interested in this python script
  2. if you are, feedback is necessairy for me
  3. Do you have a concept for unit tests, at the moment I use the unittest module

thanks

Attachments (5)

gdal_retile.1 (2.6 KB ) - added by mcr 17 years ago.
gdal_retile.2.1 (2.8 KB ) - added by mcr 17 years ago.
The new manpage
gdal_retile.dox (3.2 KB ) - added by mcr 17 years ago.
dox File for the man page
gdal_retile.2.py (25.9 KB ) - added by warmerdam 17 years ago.
Newer version with minor formatting adjustments for usage to fit in 80 wide terminals.
gdal_retile.py (26.2 KB ) - added by mcr 17 years ago.
Changed license

Download all attachments as: .zip

Change History (13)

by mcr, 17 years ago

Attachment: gdal_retile.1 added

comment:1 by warmerdam, 17 years ago

Cc: hobu added
Description: modified (diff)

I'm interested in the script.

What feedback do you need?

We use our own approach to unit tests in http://trac.osgeo.org/gdal/browser/trunk/gdalautotest but they are for testing the API, not higher level utilities. We don't generally do automated/regression testing for utilities.

in reply to:  description comment:2 by mcr, 17 years ago

Attached you find a first Version of the gdal_retile.py and a new man_page. I did some unit tests within an eclipse project, if you are interested I can send you the whole project.

A hard test was the tiling of orthophotos from Austria and building 7 tiled pyramids. These jobs run 6 hours and it works.

I am looking forward for your feedback

by mcr, 17 years ago

Attachment: gdal_retile.2.1 added

The new manpage

comment:3 by warmerdam, 17 years ago

Status: newassigned

I have incorporated the script in gdal/pymod/samples.

The script uses ReprojectImage() which does not seem to exist in the "NG" bindings, which is why I have left it in the old pymod tree.

The man page is in raw manpage format which we don't use. Look at gdal/docs/gdal_utilities.dox for the source from which man pages are generated.

I'd suggest that a default tile size be built in for -ps - perhaps 256x256.

comment:4 by hobu, 17 years ago

in reply to:  4 comment:5 by mcr, 17 years ago

Attached is a dox File, which I created using gdal_utilites.dox as a pattern. I have no idea how to test it, i hope i did no typing errors.

I also uploaded a new version of gdal_retile.py which uses 256x256 as a default for the -ps option.

As a newcomer, I am little bit confused in the case of ReprojectImage ?. The last message told me that it was added in r12533, so can I use it or not, and if not how should I reproject the image.

by mcr, 17 years ago

Attachment: gdal_retile.dox added

dox File for the man page

by warmerdam, 17 years ago

Attachment: gdal_retile.2.py added

Newer version with minor formatting adjustments for usage to fit in 80 wide terminals.

comment:6 by warmerdam, 17 years ago

Christian,

I have attached a slightly altered version of the script (nicer usage formatting for 80 char wide windows), but unfortunately the script can't be incorporated into the GDAL tree as it stands since it is under an LGPL license, instead of the usual GDAL license. I have removed the earlier commit. If you would be willing to relicense it under the GDAL MIT/X style license please update the header accordingly and reattach.

The previous note from Howard is indicating that he has added the ReprojectImage() function in the new generation python bindings, so the script should work fine with old and new generation.

in reply to:  6 comment:7 by mcr, 17 years ago

Ok, I reattached the file with the correct license.

Another question: You commit gdal_retile.py under the samples dictionary. What is the procedure to become an offical gdal utility like gdal_merge.

thanks

by mcr, 17 years ago

Attachment: gdal_retile.py added

Changed license

comment:8 by warmerdam, 17 years ago

Resolution: fixed
Status: assignedclosed

I have committed the script, and documentations in trunk (r12573).

This is pretty much a full fledged utility now rather than just a sample script. You might want to announce this on gdal-dev so folks will understand what it's for, and that it is readily available.

Note: See TracTickets for help on using tickets.