RE: MI colour/greyscale raster

1999-08-17 Thread Gis

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
 

RE: MI colour/greyscale raster

1999-08-17 Thread Thake, Peter

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 g

MI colour/greyscale raster

1999-08-10 Thread Steve Halsall

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 
unfortunately 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]



Re: MI colour/greyscale raster

1999-08-10 Thread Leslie Last

Steve,

You don't have to copy the raster tiles, just the .tab file.  The .tab file
is a text file, which for your raster tables refers to the .tif file  you
can set up as many .tab files as you like referring to the same .tif file -
they don't have to be in the same folder - you can include a full pathname
in the File line.  For example, here are some excerpts from .tab files.

1. The original colour representation (I've named it z_col_tv.tab) -

Definition Table
  File "z_lzw_tv.tif"
  Type "RASTER"
  (50,10) (1,1) Label "NW",
  (60,10) (4001,1) Label "NE",
  (60,9) (4001,401) Label "SE",
  (50,9) (1,401) Label "SW"
  CoordSys Earth Projection 8, 79, "m", -2, 49, 0.9996012717, 40,
-10
  Units "m"

2. A greyscale representation of the same .tif file (I've named it
z_gry_tv.tab) -

Definition Table
  File "z_lzw_tv.tif"
  Type "RASTER"
  (50,10) (1,1) Label "NW",
  (60,10) (4001,1) Label "NE",
  (60,9) (4001,401) Label "SE",
  (50,9) (1,401) Label "SW"
  CoordSys Earth Projection 8, 79, "m", -2, 49, 0.9996012717, 40,
-10
  Units "m"
  RasterStyle 3 1

RasterStyle 3 is the setting that turns greyscale on.
To adjust contrast and brightness, add further lines using RasterStyle 1
for brightness and 2 for contrast.  Thus
  RasterStyle 1 70
  RasterStyle 2 70
sets both to 70 percent.

You can do all this using a text editor (or program).

Regards

Leslie Last
--

 -D O T T E D  E Y E S-

Consultancy  -  Geographical Information  -  Marketing

--
web: http://www.dottedeyes.com
email: [EMAIL PROTECTED]
telephone: +44 (0)1527 854830


--
 From: Steve Halsall [EMAIL PROTECTED]
 To: '[EMAIL PROTECTED]'
 Subject: MI colour/greyscale raster
 Date: 10 August 1999 13:47
 
 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
unfortunately 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]
--
To unsubscribe from this list, send e-mail to [EMAIL PROTECTED] and put
"unsubscribe MAPINFO-L" in the message body, or contact [EMAIL PROTECTED]