[OSGeo-Discuss] help with geotifcp usage

Homan, Thomas thoman at co.gila.az.us
Wed Sep 15 16:01:04 PDT 2010

It's been a bit since I scripted anything in bash and I don't have anything fired up at the moment. You'll have to fill in the details on the scripting but something like this should be close to working
FILES = /path/to/files/*.tif
For f in $FILES
  Echo "Processing $f..."
  Geotifcp -g a.tif ${f%.*} ${f%.*}.newtif

Once the processing is done delete the *.tif and then mv the *.newtif to *.tif. These steps could be handled inside the do but for a one-off process a little manual review of results before a delete works well for me.

Just a random thought


-----Original Message-----
From: discuss-bounces at lists.osgeo.org [mailto:discuss-bounces at lists.osgeo.org] On Behalf Of P Kishor
Sent: Wednesday, September 15, 2010 3:07 PM
To: OSGeo Discussions
Subject: Re: [OSGeo-Discuss] help with geotifcp usage

On Wed, Sep 15, 2010 at 11:20 PM, P Kishor <punk.kish at gmail.com> wrote:
> On Wed, Sep 15, 2010 at 11:13 PM, Bob Basques <bob.b at gritechnologies.com> wrote:
>>  Hmm, the help file doesn't say much does it.  Did you try using a thrid
>> file name on the end instead of b.tif (again)?
> Seems like the following works
>    geotifcp -g a.tif b.tif c.tif
> creating an extra file c.tif. What a shame. Now, to figure out if I
> can apply this blessed proj info to 100 files in one shot or not, and
> then delete 100 old files.
> Also, I wish these darned commands were named consistently. When I see
> `geotifcp` I think of its analog as `geotifls`, and when I see
> `listgeo` I think of its analog as `copygeo`. What a shame its not so.
>> bobb
>> On 9/15/2010 4:07 PM, P Kishor wrote:
>>> I have a file a.tif with correct proj info embedded in it. I have
>>> another file b.tif with no proj info in it. I want to take the proj
>>> info within a.tif and embed it into b.tif. When I try the following --
>>> geotifcp -g a.tif b.tif b.tif
>>> my b.tif goes from around 321K to 8 bytes. Obviously that is no good,
>>> but I can't, for the life me, intuit what the usage would be.
>>> Corollary -- I have about a 100 target tifs... b_1.tif, b_2.tif, and
>>> so on. I would really like to embed the proj info from a.tif into all
>>> of the b_?.tif so what would that usage be?

A little more on geotifcp. It doesn't really have an explicit
usage/help switch, but if I type just the command, I get the usage
description. There is a typo in it, however

    usage: gtiffcp [options] input... output

huh! What the heck is `gtiffcp` ?

    -bash: gtiffcp: command not found

Puneet Kishor
Discuss mailing list
Discuss at lists.osgeo.org

More information about the Discuss mailing list