[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference azur::mcc

Title:DECmcc user notes file. Does not replace IPMT.
Notice:Use IPMT for problems. Newsletter location in note 6187
Moderator:TAEC::BEROUD
Created:Mon Aug 21 1989
Last Modified:Wed Jun 04 1997
Last Successful Update:Fri Jun 06 1997
Number of topics:6497
Total number of notes:27359

462.0. "MAP Background ..." by ADO75A::SHARPE (C is bliss?) Wed Nov 07 1990 19:58

    How do I include one of the three supplied map file backgrounds in a
    domain?
    
    It is not clear to me from scanning all of the menu's in the iconic map
    pm, nor from the documentation, nor from scanning this notes file.
    
    Regards
    Richard Sharpe 
T.RTitleUserPersonal
Name
DateLines
462.1BSYBEE::EGOLFJohn C. Egolf LKG2-2/T02 x226-7874Thu Nov 08 1990 07:4628
	This would  be  the  most  straight  forward,  but not the only
	way...

	The current name of the back-drop maps are:
	WORLD
	WORLD_SCALED
	UNITED_STATES

	In the EFT kit, we will also include WESTERN_EUROPE.

	Go into the FCL and
	MCC> CREATE DOMAIN WORLD
	MCC> CREATE DOMAIN WORLD_SCALED
	MCC> CREATE DOMAIN UNITED_STATES

	You can now  use the Iconic map PM.  All you need to do is open
	the domain of your choice and the back-drop map will appear.

	Notes:  Yes, you  can  create  the  domain from the map for the
	first time instead of using FCL, but the map won't appear until
	you exit and then re-enter;   usually  this scares most people.
	This is why I suggest using the FCL, then the IM PM.  Also, the
	WORLD map is 'quite' slow to paint and refresh, I'd suggest the
	WORLD_SCALED for starters.

				Hope this helps.
								JCE
462.2Australia please ...ADO75A::SHARPEC is bliss?Fri Nov 09 1990 17:3819
    OK, I got it to work. I actually guessed that if I copied
    MCC$_WORLD.DAT to MCC$_<domain_name>.dat, that file would appear as the
    background to my domain. It worked ...
    
    So,
    
    1. Can anyone give me a map that contains just Australia? I wish that
    there were comments in the map files. Of can you tell me which portion
    is Australia. Also, how do you re-scale it?
    
    2. What tools do you use to generate these, as I will be doing customer
    Demo's, and I would like to take their drawings (MacDraw, or what have
    you) and use them as the background to their network?
    
    Regards
    Richard Sharpe
    PS, I have seen the note on the format of the MAP files, and I tried to
    extract a portion that looked like Australia (268 points looked OK),
    but it was the wrong portion.
462.3TOOK::F_MESSINGERSat Nov 10 1990 20:017
    
    Jim Carey has (had?) a map of austrailia...between us, I'm sure
    we could come up with one.
    
    At the present there are no easy-to-use-map-creating tools.
    
    Fred
462.4Other methods for entering background maps?EEMELI::VALTONENNoname is better name?Mon Nov 12 1990 04:0917
    Fred (.3),
    
    what's the situation for support for other types of map background?
    
    I'm looking some schedules for easying up the creation of maps -
    the current editing method (entering x/y coordinates in ASCII) is
    requiring way too much effort!
    
    For example using Scanner and software like DECimage would shorten 
    the period of creation background to a few minutes - 
    now it takes hours and hours to enter data - and how many people 
    are repeating this same process for same geographical area?
    With scanning tools even the scaling can be performed easily outside
    DECmcc...
    
    Olli
             
462.5TOOK::F_MESSINGERMon Nov 12 1990 08:327
Ollie,

I'm afraid I must defer your question to those planning the product
releases.

Fred
462.6Maps according current political situationOSITEL::MATHEISlife is beautifulWed Dec 12 1990 11:3820
Hello,

while scanning throug the conference on the search for
an easy possibility to create a map of germany i came 
across this topic.
   It happend that I had the already existent maps of
world and western_europe on two windows of my
workstation. 
   As far as I can see there is no easy way of creating
a map of germany that I needed for CeBit91 in Hannover.
   But nevertheless I suggest to adapt the alredy
existing maps to our current politcal situation. Cold 
war is over and we germans are united again. There 
already exists a common parliament. So I would
really appreciate if you could adapt the maps. 
Please inform me if this is done.

Bye,

Manfred
462.7Maps with ONE united GermanyCOPCLU::SORENCS�ren H Christiansen EIS/ECS - DKThu Dec 13 1990 03:2414
    Hello Manfred (and others),
    
    I have modified the two maps provided with the kit (world and
    western_europe) to the current political situation. That is one united
    Germany. (At this time I have not attempted to modify anything related
    to the middle east, only time will show what have to be done there).
    
    The modified maps are located in
    
    	COPCLU::USER32:[SORENC.PUBLIC]
    
    Bye,
    
    S�ren
462.8problems with map back dropsMAIL::CLAYTONMerlin Clayton DTN 445-7217Thu Dec 13 1990 16:5025
What am I missing here?

I tired performing the steps in .1, and I copied the maps into the 
directory defined for the respective domain - still no map when I 
open the domain from the iconic map interface.

What have I done wrong?

The specific steps I took were as follows:

1.  creat/dir user:[usa]
2.  copy mcc_maps:mcc_united_states.dat mcc_united_states.dat
3.  from mcc FCL...
    MCC> create domain united_states dir=user:[usa]
4.  open mcc icon map interface
5.  open domain united_states
6.  the united_states domain is opened, but no map as back drop

7.  when I try to save the map file, i get the error message,
    "could not save the map file for this domain"



Merlin

462.9MCC_MAPS defined wrongCOOKIE::KITTELLRichard - Architected Info MgmtThu Dec 13 1990 17:332
RE: .8 See 546.*
462.10Creating background mapsPHONE::LORDWed Jan 09 1991 09:1618
	Hello,

	I'm in the process of trying to create a background map for the
	CME demo in Washington at the end of the month. I've read all of
	the notes in this file which I think are applicable and while the
	format of the domain file from note #261 is helpful, it would be
	nice if there was some way of converting a file produced by DECwrite
	or Paint or whatever to the coordinate system used by DECmcc. I 
	understand that there is no clean, easy-to-use process, but could
	you give an overview of the process you do use to create the world
	maps? However painful it might be it's got to be better than trying
	to do it by hand!

	Thanks,

	- Rick Lord

462.11TOOK::F_MESSINGERWed Jan 09 1991 11:1516

>>>	......I 
>>>	understand that there is no clean, easy-to-use process, but could
>>>	you give an overview of the process you do use to create the world
>>>	maps? However painful it might be it's got to be better than trying
>>>	to do it by hand!


The date came from a database already in vector format.  We wrote some code
to munge, filter, scale and then write to a file the Iconic_Map UI could read.

There are lots of inexpensive databases around.  One of them is from the
Dept of Commerce (NTIS). 

Fred
462.12BSYBEE::EGOLFJohn C. Egolf LKG2-2/T02 x226-7874Wed Jan 09 1991 19:2620
	If you can find a tool, such as AUTOCAD, that can output vector
	formatted data, you  stand  a chance of creating your own maps.
	We'd be very much  interested  in  anybody  who  has access and
	time/interest in creating a map backdrop with some tool (again,
	such as AUTOCAD).  We'll walk you through what you need to do.

	Tools  such  as DECwrite currently only  output  to  postscript
	format (or bookreader).  The DECwrite input  file  is DDIF.  WE
	have  not found any tools tools to convert  either  DDIF,  X11,
	postscript,  sixel, etc.  to vector.  We had  somebody  working
	with  us  to  write  a  converter  program  and  he  began   to
	understand  just  how much work it was and put it on  the  back
	self.

	*Maybe* in the next version we will be able to display DDIF  or
	bitmap  backdrop  maps  to  increase  performance  and  aid  in
	creating maps but until then  you  need  some  vector formatted
	output tool.

	JCE
462.13MAP FOR SWITZERLANDZUR01::SCHNEIDERRMon Jan 14 1991 05:5614
Hello

I created a map for Switzerland.

You can copy it from 

NCC003::DKA0:[DECMCC]MCC_SWITZERLAND.DAT

NCC003 (48.152)




				regards  Roland
462.14Roland, how did you do your map?MANIS2::MOELKR�nar M. Moelk von ICELAND.Mon Jan 21 1991 05:358
    	Roland,
    
    can you tell us how you made your map.
    
    	Regards,
    		R�nar.
    
    Ps. your system NCC003, 48.152, is known in GY as BRX11A!
462.15easy to do, but a lot of workZUR01::SCHNEIDERRTue Jan 22 1991 05:4348
Hello R�nar,

That is easy, but a lot of work.

In note 261.3 you can read the principels, how to create a background map.
For example if you want create a square, you have to take object_type 4 (closed
polygons) you have to set the egdepoints (5 points, because the last has to be 
equal to the first) so your count would be 5 (5 points).

The points you have to give in x/y coordinates.

To fill out the navigationwindow, choose:

x=0, y=0	left bottom
x=5, y=0	right bottom
x=5, y=5	right top
x=0, y=5	left top


Example:

version 0
domain TEST
last_x 0.0000 last_y 0.0000

object_type 4
count 5
0.000000 0.000000
5.000000 0.000000
5.000000 5.000000
0.000000 5.000000
0.000000 0.000000


So you can create each closed poligon you want. I hope this is clear, if not, 
ask.

So I took a map and messured the x and y coordinates by main. I asked our 
graphic specialist and he didn't know a utility that produces such an output.
In 462.12 you can read to produce a vector coordinate output with AUTOCAD. I
tried it, but there are hunderds of plotters predefined in AUTOCAD and I dont 
know whitch definition to take, to produce a file close to our. I tried one, but
the output was competly different.


					Roland


462.16Is it? - ATEM Is it? -ATEMIs it? >ATEM<MANIS2::MOELKR�nar M. Moelk von ICELAND.Wed Jan 23 1991 03:3522
    
    	Roland,
    
    thanks for your answare.  I really thought you had some nice tool
    to do this but not per hand, that's to much for me.
    
    Some one told me from a pixel editor or something like that which
    would be used to do the icons/symbols.  Has anyone heard about
    that?
    Here in GY we have a project tool called ATEM (Al-based Telecom
    Equipment Management) which is for network components documentation.
    It can take Maps that have been read by scanner and use them for
    background pictures.  It will allso use the Ethernim database
    for seting up the segments and components.  But I have no idea
    what kind of file format they are using for the background picture, but
    it is done with DECwindow so it must be similar to DECmcc bacground
    files.  I will try to get some more information on this and let you
    know because I think it is very important that we can take maps and
    convert them to background picture for DECmcc.
    
    	R�nar.
    
462.17BITMAP works for iconsNSSG::R_SPENCENets don&#039;t fail me now...Wed Jan 23 1991 08:2914
    I have used a program called BITMAP that I am told comes on the
    DECwindows kit for VMS V5.4. I use it on a V5.3 system without
    problems. To use it I created a symbol like
     BITMAP :== $sys$login:BITMAP (cause I put the image in my default dir)
    and then invoke it like this
    $ BITMAP mcc_node4_8800_icon.dat 60x60
    For this example I am creating a cpu icon for an 8800 style cabinet.
    The 60x60 is the size in pizels. Most of the supplied icons are about
    60-90 pizels wide aby about 30 high. Experiment for the best effect.
    I have a few icons I have built that I can make available if people
    want them - (6000 series cpu, 8810 cpu, 8810 system with disk and tape,
    a windows system and a little windows system)
    
    s/rob
462.18TOOK::F_MESSINGERWed Jan 23 1991 12:1413
  re .-2

See note 261.3 for the format of the DECmcc map files.  They are in what's
known as vector format... drastically different than bitmap or pixmap or 
image format.

 Icons can be created using any drawing package that supports XBM (X bit map)
format.  DecPaint, Utox(I think), the X Bitmap editor (as Rob explained in
the previous reply) all support XBM.

Somewhere in here is a note that describes how to do it. Do a DIR/title=icon.

Fred
462.19Program tool to make your own MAPs quickly.KETJE::PACCOThu Jan 24 1991 05:19401
    Making a MAP is time consuming if you not have a tool.
    
    The following is a program which can produce a MAP very easily.
    The HW you need is a VT340 and a Digitizer tablet connected to the
    mouse input of the screen.  Information is added as comments in the
    source.  I hope this saves time for a lot of you.
    
	Dominique PACCO.
    
 	implicit integer*4 (a-z)
c
c	This program produces a MAP file for a DECmcc country (domain).
c
c	In addition this program produces a file in order to "replay"
c	the digitizing sequence.
c
c	Program to be used in conjunction with the digital digitizing
c	tablet VSXXX-AB, connected to a VT340.
c
c
	include '($ttdef)/list'
	parameter tab = 9
	parameter cr = 13
	parameter esc = 27
	external io$_sensemode,io$_setmode
	external io$_readvblk,io$m_noecho,io$m_escape
	external io$_writevblk
	external exit_handler
	integer*4 exit_block(4) /0,0,1,0/

	real*4 x0,y0,x1,y1
	real*4 x,y,ax,bx,ay,by

	logical*1 inited /.false./
	character*6 clear_screen /'.[H.[J'/
	character*21 open_regis /'.PpS(A[0,479][799,0])'/
	character*2 close_regis /'.\'/
	character*7 report /'R(P(I))'/
	character*5 report_one_shot /'R(I0)'/
	character*5 report_multiple /'R(I1)'/
	character*39 country
	character*138 line,string,old_string,xy,old_xy,vector,saved_text

	structure /iosb_structure/
	  integer*2 status
	  integer*2 length
	  integer*2 terminator
	  integer*2 term_length
	  end structure
	record /iosb_structure/ iosb

	common /exit/ channel,in_chars(3),in_chars_2(3)
c
c	Format of the auxilliary OUTPUT file :
c
c	Text:		[ix,iy]text<TAB>x<BLANK>y
c	Polyline:	[ix,iy]<TAB>x<BLANK>y
c			[ix,iy]<TAB>x<BLANK>y
c			[ix,iy]<TAB>x<BLANK>y
c			[ix,iy]<TAB>x<BLANK>y
c	End polyline:	anything else
c
c
c	This output file can be edited easily to produce the expected
c		output.
c
c

	clear_screen(1:1) = char(esc)
	clear_screen(4:4) = char(esc)
	open_regis(1:1) = char(esc)
	close_regis(1:1) = char(esc)

	io$_sense = %loc(io$_sensemode)
	io$_set = %loc(io$_setmode)
	io$_read = %loc(io$_readvblk)+%loc(io$m_escape)+%loc(io$m_noecho)
	io$_write = %loc(io$_writevblk)

	retcode = sys$assign('TT:',channel,,)
	if (.not.retcode) call lib$signal(%val(retcode))

	retcode = sys$qiow(,%val(channel),%val(io$_sense),,,,
	1	in_chars,%val(12),,,,)
	if (.not.retcode) call lib$signal(%val(retcode))
	in_chars_2(1) = in_chars(1)
	in_chars_2(2) = ior(in_chars(2),tt$m_escape)
	in_chars_2(2) = ior(in_chars_2(2),tt$m_eightbit)
	in_chars_2(2) = ior(in_chars_2(2),tt$m_nobrdcst)
	in_chars_2(2) = ior(in_chars_2(2),tt$m_mbxdsabl)
	in_chars_2(2) = iand(in_chars_2(2),not(tt$m_wrap))
	in_chars_2(3) = in_chars(3)
	retcode = sys$qiow(,%val(channel),%val(io$_set),,,,
	1	in_chars_2,%val(12),,,,)
	if (.not.retcode) call lib$signal(%val(retcode))

	exit_block(2) = %loc(exit_handler)
	exit_block(4) = %loc(exit_status)
	exit_status = ss$_normal
	retcode = sys$dclexh(exit_block)

	retcode = sys$qiow(,%val(channel),
	1	%val(io$_write),iosb,,,
  	1	%ref(clear_screen),%val(len(clear_screen)),,,,)
	if(.not.retcode) call lib$signal(%val(retcode))
	if (.not.iosb.status) call lib$signal(%val(retcode))

	write (6,*) 'Give the name of the country'
	write (6,*) 
	write (6,*) 'To draw a polyline :'
	write (6,*) '  Click with the mouse (tablet) on the first point'
	write (6,*) '  A vector will be drawn on each next click'
	write (6,*) 'To stop a polyline :'
	write (6,*) '  Type <Carriage_return>'
	write (6,*) 'To write a text :'
	write (6,*) '  Type the text'
	write (6,*) '  then click with the mouse at the x-y location'//
	1		'on the tablet'
	write (6,*) 'To end this session : type <CTRL-Z>'
	write (6,*) 
	write (6,'(''$Give the COUNTRY you want to draw : '')')
	read (5,'(q,a)') country_len,country
	call str$upcase(country(1:country_len),country(1:country_len))

	open (unit=1,file=country(1:country_len)//'.aux',
	1	carriagecontrol='list',
	1	type='unknown',access='append')

	rewind (unit=1)
	read (1,'(q,a)',end=20) line_len,line
	read (1,'(q,a)',end=20) line_len,line
	rewind (unit=1)

	read (1,'(q,a)',end=20) line_len,line
	i = index (line(1:line_len),',')
	old_xy_len = index (line(1:line_len),']')
	old_xy(1:old_xy_len) = line (1:old_xy_len)
	read (line(2:i-1),'(I)') ix0
	read (line(i+1:old_xy_len-1),'(I)') iy0
	read (line(old_xy_len+2:line_len),'(f12.5,2f12.5)') x0,y0

	read (1,'(q,a)',end=20) line_len,line
	i = index (line(1:line_len),',')
	xy_len = index (line(1:line_len),']')
	xy(1:xy_len) = line (1:xy_len)
	read (line(2:i-1),'(I)') ix1
	read (line(i+1:xy_len-1),'(I)') iy1
	read (line(xy_len+2:line_len),'(f12.5,2f12.5)') x1,y1


	retcode = sys$qiow(,%val(channel),
	1	%val(io$_write),iosb,,,
  	1	%ref(open_regis),%val(len(open_regis)),,,,)
	if(.not.retcode) call lib$signal(%val(retcode))
	if (.not.iosb.status) call lib$signal(%val(retcode))

	retcode = sys$qiow(,%val(channel),
	1	%val(io$_write),iosb,,,
  	1	%ref(report_multiple),%val(len(report_multiple)),,,,)
	if(.not.retcode) call lib$signal(%val(retcode))
	if (.not.iosb.status) call lib$signal(%val(retcode))

	retcode = sys$qiow(,%val(channel),
	1	%val(io$_read),iosb,,,
  	1	%ref(line),%val(len(line)),,,,)
	if (.not.retcode) call lib$signal(%val(retcode))
	if (.not.iosb.status) call lib$signal(%val(retcode))
	go to 30

20	rewind (unit=1)
	write (6,*) 
	write (6,'(''$Give x coordinate of first reference point : '')')
	read(5,'(f20.0)') x0
	write (6,'(''$Give y coordinate of first reference point : '')')
	read(5,'(f20.0)') y0
	write (6,'(''$Give x coordinate of second reference point : '')')
	read(5,'(f20.0)') x1
	write (6,'(''$Give y coordinate of second reference point : '')')
	read(5,'(f20.0)') y1
	write (6,*) 
	write (6,*) 'Now click on the two reference points on your tablet'
	write (6,*) 'Then click on all points for your country'
	write (6,*) 

	retcode = sys$qiow(,%val(channel),
	1	%val(io$_write),iosb,,,
  	1	%ref(open_regis),%val(len(open_regis)),,,,)
	if(.not.retcode) call lib$signal(%val(retcode))
	if (.not.iosb.status) call lib$signal(%val(retcode))

	retcode = sys$qiow(,%val(channel),
	1	%val(io$_write),iosb,,,
  	1	%ref(report_multiple),%val(len(report_multiple)),,,,)
	if(.not.retcode) call lib$signal(%val(retcode))
	if (.not.iosb.status) call lib$signal(%val(retcode))

	retcode = sys$qiow(,%val(channel),
	1	%val(io$_read),iosb,,,
  	1	%ref(line),%val(len(line)),,,,)
	if (.not.retcode) call lib$signal(%val(retcode))
	if (.not.iosb.status) call lib$signal(%val(retcode))

21	retcode = sys$qiow(,%val(channel),
	1	%val(io$_read),iosb,,,
  	1	%ref(line),%val(len(line)),,,,)
	if (.not.retcode) call lib$signal(%val(retcode))
	if (.not.iosb.status) call lib$signal(%val(retcode))
	if (iosb.terminator .eq. esc) go to 21
	line_len = iosb.length

	i = index (line(1:line_len),',')
	old_xy_len = index (line(1:line_len),']')
	old_xy(1:old_xy_len) = line (1:old_xy_len)
	read (line(2:i-1),'(I)') ix0
	read (line(i+1:old_xy_len-1),'(I)') iy0

22	retcode = sys$qiow(,%val(channel),
	1	%val(io$_read),iosb,,,
  	1	%ref(line),%val(len(line)),,,,)
	if (.not.retcode) call lib$signal(%val(retcode))
	if (.not.iosb.status) call lib$signal(%val(retcode))
	if (iosb.terminator .eq. esc) go to 22
	line_len = iosb.length

	i = index (line(1:line_len),',')
	xy_len = index (line(1:line_len),']')
	xy(1:xy_len) = line (1:xy_len)
	read (line(2:i-1),'(I)') ix1
	read (line(i+1:xy_len-1),'(I)') iy1

	write (1,'(a,a1,2f12.5)')  old_xy(1:old_xy_len),tab,x0,y0
	write (1,'(a,a1,2f12.5)')  xy(1:xy_len),tab,x1,y1

30	ax = (x1-x0)/(ix1-ix0)
	bx = (x0*ix1-x1*ix0)/(ix1-ix0)

	ay = (y1-y0)/(iy1-iy0)
	by = (y0*iy1-y1*iy0)/(iy1-iy0)

	xy_len = 0

60	old_xy_len = xy_len
	old_xy(1:xy_len) = xy(1:xy_len)
	if (.not. eof) then
	  read (1,'(q,a)',end=61) line_len,line

	  xy_len = index(line(1:line_len),']	')
	  if(xy_len .eq. 0) then
	    xy_len = index(line(1:line_len),']')
	    saved_text_len = index(line(1:line_len),'	')-xy_len-3
	    if(saved_text_len .le. 0) go to 60
	    saved_text(1:saved_text_len) = line(xy_len+2:)
	    endif
	  xy = line(1:xy_len)
	  else
61	  eof = .true.
	  retcode = sys$qiow(,%val(channel),
	1	%val(io$_read),iosb,,,
  	1	%ref(line),%val(len(line)),,,,)
	  if (.not.retcode) call lib$signal(%val(retcode))
	  if (.not.iosb.status) call lib$signal(%val(retcode))
	  line_len = iosb.length

	  if (iosb.terminator .eq. esc) then
	    saved_text_len = 0
	    if (line_len .le. 0) go to 60
	    saved_text = line(1:line_len)
	    saved_text_len = line_len
	    go to 60
	    endif
	  if (iosb.terminator .ne. cr) go to 100
	  xy = line(1:line_len)
	  xy_len = index(line(1:line_len),']')
	  if(xy_len .eq. 0) then
	    write (1,'(a)') line(1:line_len)
	    go to 60
	    endif
	  xy(1:xy_len) = line(1:xy_len)
	  endif

70	i = index (xy,',')
	read (xy(2:i-1),'(I)') ix
	read (xy(i+1:xy_len-1),'(I)') iy

	x = ax*ix + bx
	y = ay*iy + by

	if (saved_text_len .gt. 0) then
	  if (eof) write (1,'(a,a1,2f12.5)') xy(1:xy_len)//''''//
	1	saved_text(1:saved_text_len)//'''',tab,x,y
	  vector_len = xy_len + 4 + saved_text_len
	  vector(1:vector_len) = 'P'//xy(1:xy_len)//'T'''//
	1	saved_text(1:saved_text_len)//''''
	  retcode = sys$qiow(,%val(channel),
	1	%val(io$_write),iosb,,,
  	1	%ref(vector),%val(vector_len),,,,)
	  if(.not.retcode) call lib$signal(%val(retcode))
	  if (.not.iosb.status) call lib$signal(%val(retcode))
	  saved_text_len = 0
	  xy_len = 0
	  go to 60
	  endif

	if (eof) write (1,'(a,a1,2f12.5)') xy(1:xy_len),tab,x,y

	if (old_xy_len .gt. 0) then
	  vector_len = old_xy_len + xy_len + 2
	  vector(1:vector_len) = 'P'//old_xy(1:old_xy_len)//'V'//xy(1:xy_len)
	  else
	  vector_len = xy_len + xy_len + 2
	  vector(1:vector_len) = 'P'//xy(1:xy_len)//'V'//xy(1:xy_len)
	  endif 
	retcode = sys$qiow(,%val(channel),
	1	%val(io$_write),iosb,,,
  	1	%ref(vector),%val(vector_len),,,,)
	if(.not.retcode) call lib$signal(%val(retcode))
	if (.not.iosb.status) call lib$signal(%val(retcode))
	go to 60

100	retcode = sys$qiow(,%val(channel),
	1	%val(io$_write),iosb,,,
  	1	%ref(close_regis),%val(len(close_regis)),,,,)
	if(.not.retcode) call lib$signal(%val(retcode))
	if (.not.iosb.status) call lib$signal(%val(retcode))

	rewind (unit=1)
	eof = .false.
	open (unit=2,file=country(1:country_len)//'.dat',
	1	carriagecontrol='list',
	1	type='new')
	read (1,'(q,a)',end=190) line_len,line
	read (1,'(q,a)',end=190) line_len,line
	write (2,*) 'version 0'
	write (2,*) 'domain '//country(1:country_len)
	write (2,'(a,f10.6,a,f10.6)') ' last_x ',x,' last_y ',y
	write (2,*)

101	do n=0,10000
	  read (1,'(q,a)',end=107) line_len,line
	  if (index(line(1:line_len),']') .eq. 0) go to 105
	  if (index(line(1:line_len),']	') .eq. 0) go to 103
	  enddo
103	if (n .eq. 0) go to 120
105	if (n .eq. 0) go to 101
	backspace(unit=1)
106	if (eof) go to 190
	go to 108
107	if (eof) go to 190
	eof = .true.
	if (n .eq. 0) go to 190
108	do i=1,n
	  backspace(unit=1)
	  enddo

110	write (2,*) 'object_type 4'
	write (2,'(a,i6)') '   count ',n+1
	read (1,'(q,a)',end=190) saved_text_len,saved_text
	backspace (unit=1)
	do i=1,n
	  read (1,'(q,a)',end=190) line_len,line
	  xy_len = index(line(1:line_len),']	')
	  write (2,'(2a)') ' ',line(xy_len+2:line_len)
	  enddo
	xy_len = index(saved_text(1:saved_text_len),']	')
	write (2,'(2a)') ' ',saved_text(xy_len+2:saved_text_len)
	write (2,*)
	go to 101

120	xy_len = index(line(1:line_len),']')
	saved_text_len = index(line(1:line_len),'	')-xy_len-3
	saved_text(1:saved_text_len) = line(xy_len+2:)
	xy_len = index(line(1:line_len),'	')
	write (2,*) 'object_type 4'
	write (2,*) '  text ',saved_text(1:saved_text_len)
	write (2,'(2a)') '   x ',line(xy_len+1:line_len)
	write (2,*)
	go to 101

190	continue
	end
	integer function exit_handler*4
	implicit integer*4 (a-z)
	parameter csi = '9b'x
	character*47 regis_reset
	1	/'.H.J.?25h.Pps(e,M0(AD)1(AB)2(AR)3(AG),c1).\.?4l'/
	parameter ss$_normal = 1
	common /exit/ channel,in_chars(3)
	external io$_setmode
	io$_set = %loc(io$_setmode)
	regis_reset(1:1) = char(csi)
	regis_reset(3:3) = char(csi)
	regis_reset(5:5) = char(csi)
	regis_reset(10:10) = char(27)
	regis_reset(42:42) = char(27)
	regis_reset(44:44) = char(csi)
	retcode = sys$qiow(,%val(channel),%val(io$_set),,,,
	1	in_chars,%val(12),,,,)
	if (.not.retcode) call lib$signal(%val(retcode))
	call sys$exit(%val(ss$_normal))
	return
	end
    
462.20DRAW_MAP: VMS/DECwindows tool producing backdrop maps for DECmccVERS::PETROUThu Jan 24 1991 12:51349
	Hello world...

	I am Philippe Petrou, working on DECmcc in order to find a way to manage
TIMA operations. I worked for 2 weeks to write a simple tool producing DECmcc 
background maps. Now it is ready and described on TIMA star database. As using 
this note I think I reach more interested peoples than throught TIMA, I copy 
here below quit the same article...


	Remind it is a very simple tool, that can be used waitting more features
in DECmcc iconic map itself. In that way, don't wait for any other version of 
DRAW_MAP. Anyway the tool is delivered here with the sources code files, so YOU
can make what you want with it...

	Now let's read the following.

			Regards. Philippe (@EVT PETROU)

CODE SAMPLE ARTICLE OUTLINE

------------------------------------------------------------------------------

BRIEF PROBLEM OUTLINE:

DECmcc EFT 1.1 uses backdrop maps described in ASCII files by Carthesis coor-
donates of polygones. As no classic drawing tool produces such data, DRAW_MAP 
was created. It produces DECmcc usable files of DECwindows user's  drawn maps.

PRODUCT:   DRAW_MAP version 1.0

LAYERED PRODUCT:   VAXC, VAX Fortran on VMS/DECwindows 5.3

DATE:   23-JAN-1991



OVERVIEW:

Problem...       DECmcc backdrop maps are not easy to produce. DRAW MAP was
created to easily produce such map files.

Features..       Draw map has the following features:
 1 Displaying a DECmcc map file
 2 Displaying XBitMap file produced by DECpaint (or any other way...)
 3 Creating a map by drawing polygones (see note below) in a window.
 4 Saving map created map data in a new DECmcc map file
 5 Scaling an old DECmcc map file so that it takes more or less space in the
navigation area. (Max scale in it is 5.0)

NOTE==> DECmcc toolbox allows you to put text and draw simple lines in maps, so 
it was not used to manage this features in DRAW_MAP.

Who uses it...   All person who wants to quickly produce DECmcc formatted
backdrop maps.




How to use it... Here below is a short user guide of Draw Map

1 Starting Draw Map

1-1 Prerequisite
          Draw Map environment has the folowing caracteristics:
 - A Xwindows terminal (Station, Xterminal...) supporting X11 standard as 
DECwindows
 - VMS/DECwindows operating system
 - The following files in the same directory:
         + DRAW_MAP.EXE executable program
         + DRAW_MAP.DAT ressource file used by Draw Map at run time
         + DRAW_MAP.UID DECwindows interface description file
Remind: The ressource file of a DECwindows application is an editable file in 
whitch you can modify some parameter of the interface (geometry,...)

1-2 Starting
          Draw map may be run from File View (run option) or from DCL with the
following command:
                   $ RUN DRAW_MAP.EXE
In order to use the DRAW_MAP.DAT ressource file, the running process must have
DECW$USER_DEFAULTS search list pointing on draw map directory.



2 Displaying a DECmcc map

2-1 How to do
 + Choose option GET_MAP from GET_FILE submenu from FILE menu.
 + A file selection window appears. It contains (by default) all .DAT extensed 
files of your current directory.
 + Select the DECmcc map file you want to display
 + Then drawmap reads this file and convert map data to Xlib format. When this
work is done, drawmap alarms you with a french message.
 + Finaly choose option DRAW_MAP from DRAW menu and the map should appear in
the work area holding all the offered space of the window.

2-2 The data file
 The data file MUST be to DECmcc map data file format. (An example is given
below)
Anyway we have the following restrictions;
 + Draw map converts only object_type 4 data.
 + Draw map reads only 2000 points building a maximum of 200 polygones.

2-3 Common errors
           During these oprations the following errors may occur:
 + Error opening the selected file (priviledges, bad file...)
 + Error in the file format (may occur in data reading or data converting 
operations)
 + Rounding error
 + Array access error (access violation) if to much data




3 Displaying a XBitMap (XBM) model

3-1 How to do
 + Choose option GET_XBM from GET_FILE submenu from FILE menu.
 + A file selection window appears. It contains (by default) all .XBM extensed 
files of your current directory.
 + Select the XBitMap file you want to display
 + Finaly choose option DRAW_XBM_MODEL from DRAW menu and the map should appear
in the work area.

3-2 The bitmap file
          The bitmap file MUST be of XBitMap format as defined in X11 standard.
DECpaint uses this format when saving X11. An example of bitmap file is given
below.

3-3 Common error
           During these oprations the following errors may occur:
 + Error opening the file
 + Server has not enough memory to store the bitmap.




4 Creating a DECmcc map and produce a new data file

4-1 How to do
 + Choose option CREATE_MAP from DRAW menu.
 + Then the working area cursor changes to DECwindows draw cursor, and the
mouse buttons get the following functions;
Button 1: + It stores the clicked point's coordonates and draw a line to the
            last one (except in case of polygone begining).
Button 2: + It closes the current polygone, stores its number of points, and
            allow you to start a new polygone
Button 3: + It ends the graphic recording
 + At this stage, data are in memory. you have to save them in a new file...
 + Choose option CREATE_FILE from SAVE_FILE submenu from FILE menu.
 + Then a dialog box appears, asking for the new file name and the scale factor
(REAL) you want to apply to new map data.
CARE==> THE SCALE FACTOR MUST BE ENTER IN REAL FORMAT.

4-2 Constraints
         Here are the constraints to the acquisition:
 + The maximum number of points is a little less than 2000 (let say 1500...)
 + Scale factor must be real formatted (ex: 4.3) else...




5 Scaling a DECmcc map data

5-1 How to do
          In order to change the space a map takes in DECmcc navigation area,
this option allows you to change the scale of the map.
To use it let's do the following:
 + Select option SCALE_FILE from submenu SAVE_FILE from menu FILE
 + Then a dialog box appears prompting you for;
             - The source DECmcc map data file
             - The file name to be created (it may be the same as source one =>
then drawmap create a new version)
             - The new sacle factor (REAL)

5-2 Constraints
	Scale MUST be a real data. For example: 3.0




6 Example of using
  Context: I need a new map of France to put as background of my TIMA_France mcc
domain.
  Solution:
 + I scan my favorit France map and then produce an image file (.IMG)
 + I read this file with DECpaint and scale the map in order to held it in a 
picture size of about 500x500 pixels.
 + I save it as - X11 (XBitMap)
                - <filename>.XBM
 + I quit DECpaint and start DRAW_MAP
 + Here I display my XBM model of France map
 + Then I create my France polygone
 + Finaly I save the new map in a file that I scale as I want.
 + Now I can use DECmcc with this new map and fullfill it with text, lines and
icons using DECmcc toolbox.




PROGRAM NOTES:

Where to find sources and executable:
       A backup file located on VERS::DISK$KIT:[KIT.EMA.DECMCC.DRAWMAP]
       It contains all needed files and 4 test files of France;
- TEST_FRANCE.IMG produced by scanning a France map.
- TEST_FRANCE.XBM produced by DECpaint from TEST_FRANCE.IMG (after scaling 25%)
- TEST_FRANCE.DAT produced by DRAW_MAP using TEST_FRANCE.XBM as XBM model and 
creating a map scaled to 1.6
- MCC$_TIMA_FRANCE.DAT produced by DECmcc and inserting TEST_FRANCE.DAT data as
polygone.
	This backup file names: DRAW_MAP.BCK and its listing is the following:
Listing of save set(s)

       DRAW_MAP.C;1                        34  23-JAN-1991 12:02
       DRAW_MAP.COM;1                      10  24-JAN-1991 14:45
       DRAW_MAP.DAT;1                       1  21-JAN-1991 16:19
       DRAW_MAP.EXE;1                      29  23-JAN-1991 12:03
       DRAW_MAP.H;1                         4  22-JAN-1991 19:53
       DRAW_MAP.OBJ;1                      13  23-JAN-1991 12:03
       DRAW_MAP.PS;1                      673  24-JAN-1991 17:41
       DRAW_MAP.UID;1                      48  22-JAN-1991 20:40
       DRAW_MAP.UIL;1                      24  22-JAN-1991 20:40
       DRAW_MAP_CALLBACKS.C;1              31  23-JAN-1991 10:44
       DRAW_MAP_CALLBACKS.OBJ;1            13  23-JAN-1991 10:45
       DRAW_MAP_EXTERN.C;1                 20  22-JAN-1991 20:17
       DRAW_MAP_EXTERN.OBJ;1               10  22-JAN-1991 20:18
       DRAW_MAP_GETFILE.FOR;1              10  21-JAN-1991 16:46
       DRAW_MAP_GETFILE.OBJ;1               4  16-JAN-1991 17:17
       DRAW_MAP_NEW_FILE_DAT.FOR;1         11  21-JAN-1991 16:48
       DRAW_MAP_NEW_FILE_DAT.OBJ;1          6  15-JAN-1991 19:15
       DRAW_MAP_SAVEMAP.FOR;1               6  21-JAN-1991 16:52
       DRAW_MAP_SAVEMAP.OBJ;1               3  17-JAN-1991 19:17
       MCC$_TIMA_FRANCE.DAT;3              12  24-JAN-1991 15:50
       TEST_FRANCE.DAT;1                    5  24-JAN-1991 15:54
       TEST_FRANCE.IMG;2                    3  24-JAN-1991 15:25
       TEST_FRANCE.XBM;3                  462  24-JAN-1991 15:46

Total of 23 files, 759 blocks
End of save set

Installing DRAW_MAP:
	The application can run if the here above prerequisites are respected.

Anyway, you can rebuilt the executable file running the DCL procedure 
DRAW_MAP.COM with the command:
		$ @draw_map
This procedure makes all that the application needs to run.



Documentation:
	A FRENCH documentation about this application exists in postscript form.
It describes the story of DRAW MAP, a user's guide, and the architecture of the
application.



PROGRAM SAMPLE:

Sample DECmcc backdrop map data file:
+------------------------------------------------------------------------------+
 version 0
 domain .mcc.TIMA_France
 last_x 0.000000 last_y 0.000000

 object_type 1
   mcc_code 8
   center_x 1.463825   center_y 1.068711
   text_x 1.361954   text_y 0.989293
   name   .mcc.tima_ZTO

 object_type 1
   mcc_code 8
   center_x 1.204990   center_y 1.275052
   text_x 1.044907   text_y 1.193555
   name   .mcc.tima_UEO

 object_type 4
   count 56
   0.870656 0.000000
   0.972435 0.013368
   0.944163 0.153361
   0.989389 0.200022
        :
        :
   0.571019 0.059984
   0.684089 0.113357
   0.870656 0.000000

 object_type 2
   var 1
   width 0.008000
   start_x 0.651455 start_y 1.278171
   stop_x 0.897297 stop_y 1.134719

 object_type 2
   var 1
   width 0.008000
   start_x 0.428482 start_y 0.878482
   stop_x 0.897297 stop_y 1.134719

 object_type 7
   text .mcc.tima_LFO
   x 0.935551 y 1.414328

 object_type 7
   text Lille
   x 0.983368 y 1.563410
[EOF]


Sample Xbitmap formatted file
+------------------------------------------------------------------------------+
#define TEST_width 50
#define TEST_height 50
#define TEST_x_hot 0
#define TEST_y_hot 0
static char TEST_bits[] = {
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
   0x00, 0x00, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0xfc, 0xff, 0xff,
   0xff, 0xff, 0xff, 0x00, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x1c,
   0x00, 0x00, 0x00, 0x00, 0xe0, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0xe0,
   0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x00, 0x1c, 0xff, 0xff, 0xff,
   0xff, 0xe3, 0x00, 0x1c, 0xff, 0xff, 0xff, 0xff, 0xe3, 0x00, 0x1c, 0xff,
   0xff, 0xff, 0xff, 0xe3, 0x00, 0x1c, 0x07, 0x00, 0x00, 0x80, 0xe3, 0x00,
   0x1c, 0x07, 0x00, 0x00, 0x80, 0xe3, 0x00, 0x1c, 0x07, 0x00, 0x00, 0x80,
   0xe3, 0x00, 0x1c, 0x07, 0x00, 0x00, 0x80, 0xe3, 0x00, 0x1c, 0x07, 0x00,
   0x00, 0x80, 0xe3, 0x00, 0x1c, 0x07, 0x00, 0x00, 0x80, 0xe3, 0x00, 0x1c,
   0x07, 0x00, 0x00, 0x80, 0xe3, 0x00, 0x1c, 0x07, 0x00, 0x00, 0x80, 0xe3,
   0x00, 0x1c, 0x07, 0x00, 0x00, 0x80, 0xe3, 0x00, 0x1c, 0x07, 0x00, 0x00,
   0x80, 0xe3, 0x00, 0x1c, 0x07, 0x00, 0x00, 0x80, 0xe3, 0x00, 0x1c, 0x07,
   0xfe, 0xfc, 0x81, 0xe3, 0x00, 0x1c, 0x07, 0x8c, 0x19, 0x83, 0xe3, 0x00,
   0x1c, 0x07, 0x8c, 0x19, 0x83, 0xe3, 0x00, 0x1c, 0x07, 0x8c, 0x19, 0x83,
   0xe3, 0x00, 0x1c, 0x07, 0xcc, 0x98, 0x81, 0xe3, 0x00, 0x1c, 0x07, 0x7c,
   0xf8, 0x80, 0xe3, 0x00, 0x1c, 0x07, 0x0c, 0x18, 0x80, 0xe3, 0x00, 0x1c,
   0x07, 0x0c, 0x18, 0x80, 0xe3, 0x00, 0x1c, 0x07, 0x3e, 0x7c, 0x80, 0xe3,
   0x00, 0x1c, 0x07, 0x00, 0x00, 0x80, 0xe3, 0x00, 0x1c, 0x07, 0x00, 0x00,
   0x80, 0xe3, 0x00, 0x1c, 0x07, 0x00, 0x00, 0x80, 0xe3, 0x00, 0x1c, 0x07,
   0x00, 0x00, 0x80, 0xe3, 0x00, 0x1c, 0x07, 0x00, 0x00, 0x80, 0xe3, 0x00,
   0x1c, 0x07, 0x00, 0x00, 0x80, 0xe3, 0x00, 0x1c, 0x07, 0x00, 0x00, 0x80,
   0xe3, 0x00, 0x1c, 0x07, 0x00, 0x00, 0x80, 0xe3, 0x00, 0x1c, 0xff, 0xff,
   0xff, 0xff, 0xe3, 0x00, 0x1c, 0xff, 0xff, 0xff, 0xff, 0xe3, 0x00, 0x1c,
   0xff, 0xff, 0xff, 0xff, 0xe3, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0xe0,
   0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x00, 0x1c, 0x00, 0x00, 0x00,
   0x00, 0xe0, 0x00, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0xfc, 0xff,
   0xff, 0xff, 0xff, 0xff, 0x00, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00,
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
   0x00, 0x00};
462.21great tool!HAWK2::GOLDMANAmy Goldman, DTN 226-5115Thu Jan 31 1991 09:5311
    Phillipe,
    
    	I have copied over this tool and have been playing with it a
    bit.  I just want to say that you've done a great job!!  Very
    impressive, indeed!  A tool like this to help draw background 
    maps is a wonderful enhancement to the product.  If you do make
    revisions or updates to this tool, please keep us posted!
    
    	Again, thanks for sharing this!
    
    	amy
462.22USTICA::ODOARDIThu Jul 25 1991 11:570