Hi Peter, Pete and Steve and others,
Yet another way of doing the task!
You may be interested to know we have a free downloadable product called Search
Plus that can do a search and replace function on a directory of files. It was
initially designed to globally edit workspaces where tables have changed location
but would work just as well for editing TAB files such as in your case. One
way would be to copy the TAB files to another directory. Then search for the
last few unique characters in TAB file and replace it with the same characters
plus the raster settings. Rename the files and put them back in the original
directory.
If you would like a free copy of Search Plus, download it for our products page
at http://www.spatialplus.com
Regards,
Sue.
++++++++++++++++++++++++++++++++++++++++
adding Susan Port
value Technical Support Coordinator
to [EMAIL PROTECTED]
your
spatial Spatial Plus
systems http://www.spatialplus.com
++++++++++++++++++++++++++++++++++++++++
>Thanks!
>
>Never thought of the wildcards - it might work... anyone?
>Actually, for my specific project (with LOTS of .TAB and .TIF files), I
>started by using
>
>dir *.tab > copy.bat
>dir *.tab > add.bat
>
>and then used Search & Replace to build the .BAT files
>
>Regards
>
>Peter
>
>Peter Ketting, GIS consultant
>Ministry for Environment and Energy
>Denmark
>
>
> ----------
> Fra: Thake, Peter[SMTP:[EMAIL PROTECTED]]
> Sendt: 17. august 1999 15:00
> Til: '[EMAIL PROTECTED]'
> Cc: 'Mapinfo-L'
> Emne: RE: MI colour/greyscale raster
>
> Hi Peter,
>
> Nice solution! What a pity you can't use wildcards to add the text to all
> tab files in a directory! (Or can you?)
>
> Pete
> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> Sent: 17 August 1999 10:52
> To: [EMAIL PROTECTED]
> Subject: RE: MI colour/greyscale raster
>
>
> Hi Steve, Pete and others!
>
> As somebody might have mentioned, you can have several .TAB files using
> the
> same .TIF file. This means you can have a number of different raster
> setups
> with almost no additional load on your precious hard drives.
>
> So in this case I think you would want to go with two .TAB files for each
> .TIF - one for viewing, one for printing.
>
> Then, if you are fortunate enough to still have the original .TAB files
> WITHOUT any Rasterstyle clause, you can quickly add the appropriate clause
> in a DOS prompt using the statement
>
> echo Rasterstyle 1 52 >> myfile.tab
>
> This will add the text "Rasterstyle 1 52" (without quotes) to the end of
> the
> file.
>
> *note: In the above statement, insert the correct rasterstyle (you should
> be
> able to read it in an "adjusted" .TAB) instead of 1 52, and insert the
> correct filename instead of myfile.tab.
>
> To show an example:
>
> Let's assume, that you have raster images consisting of pairs like this:
>
> image1.tif image1.tab
> image2.tif image2.tab
> image3.tif image3.tab
>
> When viewed in Mapinfo they display in (unadjusted) colours. When the .TAB
> files are viewed in a text editor, they do NOT contain a Rasterstyle
> clause.
>
> Make a file named copy.bat containing the text
>
> copy image1.tab bwimage1.tab
> copy image2.tab bwimage2.tab
> copy image3.tab bwimage3.tab
>
> and place it in the same directory as the .TAB files.
>
> Run copy.bat
>
> Open the file bwimage1.tab in Mapinfo, and adjust it to the grayscale
> display you need for printing. Close the file.
> Open the file bwimage1.tab in a text editor, and note the Rasterstyle
> clause
> at the end. For this example we'll asume it's 1 52.
>
> Make a file named add.bat containing the text
>
> echo Rasterstyle 1 52 >> bwimage2.tab
> echo Rasterstyle 1 52 >> bwimage3.tab
>
> and place it in the same directory as the .TAB files.
>
> *note: Leave out bwimage1.tab, you already adjusted it manually.
>
> Run add.bat
>
> ....and that _should_ be it! I'm writing this from memory, so I might have
> slipped somewhere, but I _have_ used this approach, and it works!
>
> HTH.
>
> Peter
>
>
> Peter Ketting, GIS consultant
> Ministry for Environment and Energy
> Denmark
>
> > ----------
> > Fra: Thake, Peter[SMTP:[EMAIL PROTECTED]]
> > Sendt: 16. august 1999 16:23
> > Til: 'Steve Halsall'
> > Cc: 'Mapinfo-L'
> > Emne: RE: MI colour/greyscale raster
> >
> > Hi Steve,
> >
> > Firstly apologies for my delayed response - I have been on holiday!
> >
> > I have had the same problem here with a load of raster maps and in my
> case
> > found the easiest solution was for the user to have access to the image
> > styles tool to lighten the images as required. However, this may not
> apply
> > to your situation.
> >
> > The mapinfo .tab file DOES seem to record the image style - open the
> .tab
> > up
> > in a text editor and look for this:
> > RasterStyle 1 52
> > RasterStyle 2 51
> > RasterStyle 3 1
> >
> > These values vary according to the style setting you chose -
> surprisingly,
> > this seems to be saved to the .tab without you being prompted.
> > Unfortunately
> > I think you are right though, I can not think of any 'quick fix' to edit
> > this value - other than to write some mapbasic to open each table in
> turn
> > and change the image style and save the table with a different name, or
> > some
> > Visual Basic to manually edit the .tab file and save it with a different
> > name.
> >
> > You could do a find and replace on the .tab file in a text editor, but
> > this
> > still means doing this 84 times...
> >
> > Good luck!
> >
> > Pete, Ordnance Survey, UK
> >
> > -----Original Message-----
> > From: Steve Halsall [mailto:[EMAIL PROTECTED]]
> > Sent: 10 August 1999 13:48
> > To: '[EMAIL PROTECTED]'
> > Subject: MI colour/greyscale raster
> >
> >
> > Hi
> >
> > I am using the UK Ordnance Survey 1:50,000 raster mapping (tif format)
> > with
> > their Boundary Line product. The tif map tiles are in colour which is
> > great
> > for when I want to view an area. However I am mainly interested in the
> > boundaries (from Boundary Line) and just need the raster mapping for
> > reference. For printing purposes I change the raster image to greyscale
> > and
> > change the contrast and brightness to about 70% using the Adjust Image
> > Style
> > option in Mapinfo. This produces the output that I want but unfo
> > unately it appears to make this change to the raster map rather than in
> > the
> > MapInfo table or the Workspace. This causes problems as the next time I
> > open
> > the raster map it may not be in the format that I require.
> >
> > The only solution I have come up with is to copy the raster tiles (84 of
> > them!) and rename them, then I will have to rename the relevant MapInfo
> > registration tables (and edit them to point to the correct raster file).
> I
> > can then use both sets of raster maps within MapInfo switching them off
> > and
> > on as required.
> >
> > Before I go ahead I would like to ask list members if they have found an
> > easier way?
> >
> > Steve Halsall
> > LGBCW
> > ----------------------------------------------------------------------
> > To unsubscribe from this list, send e-mail to [EMAIL PROTECTED] and put
> > "unsubscribe MAPINFO-L" in the message body, or contact [EMAIL PROTECTED]
> >
> >
> >
> > ***************************************************************
> > * This email/attachment(s) has been virus checked at OS *
> > * and is free of all known viruses.
> > *
> > * All non work related emails/attachments should be deleted
> > * to comply with 'Internet code of practice'
> > * as per office notice 524/98.
> > *
> > ***************************************************************
> >
> >
> > ----------------------------------------------------------------------
> > To unsubscribe from this list, send e-mail to [EMAIL PROTECTED] and put
> > "unsubscribe MAPINFO-L" in the message body, or contact [EMAIL PROTECTED]
> >
> ----------------------------------------------------------------------
> To unsubscribe from this list, send e-mail to [EMAIL PROTECTED] and put
> "unsubscribe MAPINFO-L" in the message body, or contact [EMAIL PROTECTED]
>
>
>
> ***************************************************************
> * This email/attachment(s) has been virus checked at OS *
> * and is free of all known viruses.
> *
> * All non work related emails/attachments should be deleted
> * to comply with 'Internet code of practice'
> * as per office notice 524/98.
> *
> ***************************************************************
>
>
> ----------------------------------------------------------------------
> To unsubscribe from this list, send e-mail to [EMAIL PROTECTED] and put
> "unsubscribe MAPINFO-L" in the message body, or contact [EMAIL PROTECTED]
>
----------------------------------------------------------------------
To unsubscribe from this list, send e-mail to [EMAIL PROTECTED] and put
"unsubscribe MAPINFO-L" in the message body, or contact [EMAIL PROTECTED]