Hi Marilyn,
you could simply convert your ASCII political boundary layer file to DX-format, 
then
IMPORT the converted file in your network, add color (if you didn't do this at 
the
file creation stage) and put it together with the rest of your illustration 
into 
COLLECT before you pass it to IMAGE or DISPLAY.
Obviously your converted boundary data should be in the same spatial dimensions
(e.g. latitude/longitude coordinates) as the rest of the fields; otherwise you
may need some geographical projection tools/macros, which are available via the
DX bonus pack.
If you don't know how to convert your boundary information to DX format, I have 
included a small and rather basic FORTRAN program that I used to convert 
coastline
information to DX format. It simply reads latitude/longitude information from a 
file
and puts it back in a form suitable for IMPORT in native DX.

Regards,
Bodo


On Mon, Jul 07, 2003 at 11:31:53AM -0300, Marilyn Meneucci Ibañez wrote:
>  Hi, users
> 
> 
>   I am sorry. I think that not explain well.
>   I would be very greatfull if you can help me again.
>   I have data that form a politic boundary in a
> country (closed polygon) and data that que form an
> image. I need overlay closed poligon on image. What
> fromat of the data wiil use? 
>    I am sending the files anexed.
> 
> 
> 
> 
>                            Thank you very much,       
>                                                       
>                                                    
> Ibanez, Marilyn M.
> INPE - Instituto Nacional de Pesquisas Espaciais.
> Brazil                                                
>                                                       
>                                                       
>              
> 
> =====
> Marilyn Menecucci Ibañez
> 
> _______________________________________________________________________
> Yahoo! Mail
> Mais espaço, mais segurança e gratuito: caixa postal de 6MB, antivírus, 
> proteção contra spam.
> http://br.mail.yahoo.com/




-- 
Adress:    Bodo Ritter
           c/o Deutscher Wetterdienst
           Postfach 100465
           63004 Offenbach/Main

Tel.  :    +49-69-8062-2703
Fax   :    +49-69-8062-3721
email :    [EMAIL PROTECTED]
program Coast2dx
!
!     Convert coast line ASCCI file to DX-Format
!
PARAMETER (LINES=20000,NPOINTS=1000000)
INTEGER START(0:LINES),Connections (0:LINES)
REAL Latitude(0:NPOINTS),LONGITUDE(0:NPOINTS)
INTEGER PS(0:NPOINTS)
INTEGER line,points,conns,points_max
INTEGER unit_dx,unit_dx_bin
INTEGER *4 jl

real zphi(10000),zlam(10000)
print *,' ============================================='
print *,' Conversion of coastline file to OpenDX-Format'
print *,' ============================================='

OPEN(UNIT=11,FILE='coast.dat2',STATUS='OLD')

! use assign to specify files used by C programs (OpenDX) to have type sbin
! -------------------------------------------------------------------------
  unit_dx     = 12
  unit_dx_bin = 13

call system ('FILENV=assign_file; export FILENV')
call asnunit(unit_dx_bin  ,'-s sbin',ierr)

  open (unit_dx    ,file='Coast.dx'    ,form='formatted')
  open (unit_dx_bin,file='Coast.dx.bin',form='unformatted')

! Read ASCII data and create line segments
zlat_min = 9999.
zlat_max =-9999.
zlon_min = 9999.
zlon_max =-9999.
iklp = 0
line = 0
conns= 0
START      (0) =-1
CONNECTIONS(0) = 0
points_max = 0

COAST_LINES: do jl=1,99999999
if (mod(jl-1,5000)==0) print *,'Kuestenlinienabschnitt ',jl
points = 0

 do jp=1,99999999
! if (mod(jp-1,100)==0) print *,'reading jp=',jp
 READ (11,8001,END = 2) zphi(jp),zlam(jp)
 8001 FORMAT (1X,F6.2,F8.2)
  if (zphi(jp) > 90.01) go to 1   ! end of line segment
 end do


    1 continue
      points = jp-1
      if (points > 1) then
      line =line + 1
! TEST
!             IF (line >=5) go to 2

      CONNECTIONS(line) = points-1
      START      (line) = START(line-1)+CONNECTIONS(line-1)+1
      DO j=0,points-1
      longitude(START(line)+j)=zlam(j+1)
      latitude (START(line)+j)=zphi(j+1)
      zlat_min =min(latitude (START(line)+j),zlat_min)
      zlat_max =max(latitude (START(line)+j),zlat_max)
      zlon_min =min(longitude(START(line)+j),zlon_min)
      zlon_max =max(longitude(START(line)+j),zlon_max)
      END DO
      DO jc=0,CONNECTIONS(line)
      PS(conns+jc) = START(line) + jc
      END DO
      conns = conns + CONNECTIONS(line)
      iklp = iklp + points
      points_max = max(points_max,points)
      end if
end do COAST_LINES

! ---------------------------------------------------------------
    2 continue                       ! end of file
      print *,'EOF jp=',jp,' line segments before EOF :',line
      points = jp-1
      if (points > 1) then
      line = line + 1
      CONNECTIONS(line) = points-1
      START      (line) = START(line-1)+CONNECTIONS(line-1)+1
      DO j=0,points-1
      longitude(START(line)+j)=zlam(j+1)
      latitude (START(line)+j)=zphi(j+1)
      zlat_min =min(latitude (START(line)+j),zlat_min)
      zlat_max =max(latitude (START(line)+j),zlat_max)
      zlon_min =min(longitude(START(line)+j),zlon_min)
      zlon_max =max(longitude(START(line)+j),zlon_max)
      END DO
      DO jc=0,CONNECTIONS(line)
      PS(conns+jc) = START(line) + jc
      END DO
      conns = conns + CONNECTIONS(line)
      iklp = iklp + points
      points_max = max(points_max,points)
      end if
!
!====================================================================
!
print *,' ---------------------------------'
print *,' Minimum Longitude :',zlon_min
print *,' Minimum Latitude  :',zlat_min
print *,' Maximum Longitude :',zlon_max
print *,' Maximum Latitude  :',zlat_max
print *,' ---------------------------------'
print *,jl  ,' Records wurden verarbeitet'
print *,iklp,' Punkte  wurden verarbeitet'

PRINT *,' Total no. of positions    : ',iklp  
PRINT *,' Total no. of connections  : ',conns   
PRINT *,' Total no. of line segments: ',line    
PRINT *,' Max.no. of points/segment : ',points_max
PRINT *,' Segment    Start  No.of Connections'
DO jline=1,line
IF (jline <= 5 .or. jline>=(line-5) .or. MOD(jline-1,1000)==0) THEN
PRINT 9001,jline,START      (jline),CONNECTIONS(jline)

! IF (jline<=2 ) THEN
! PRINT 9002,(j,longitude(j),latitude(j),j=START(jline),START(jline+1)-1)
! END IF
9001 FORMAT(1x,I5,2I12)
9002 FORMAT(10x,I5,2F10.2)
END IF
END DO

  print *,'===============   START    SEGMENT ======='
  iseg = 1
  DO j=0,conns-1 
  if (j>0 .AND. PS(J)/=PS(J-1)+1) then
   iseg = iseg + 1
   print *,'------',ps(j),'    ----   ',iseg 
  end if
  print 9901,' PS(j): ',PS(j),PS(j)+1,longitude(ps(j)),longitude(ps(j)+1), &
                                      latitude (ps(j)),latitude (ps(j)+1)
9901 format(A10,2I10,2f8.2,4x,2f8.2)
  END DO
  print *,'========================================='


! Write connections to file
  write(unit_dx_bin) (PS(j),PS(j)+1,j=0,conns-1)

! Write positions to file
  write(unit_dx_bin) (latitude (j),longitude(j),j=0,iklp-1)
 


  write(unit_dx,*) '#                                              '
  write(unit_dx,*) '# Coast line file for OpenDX                   '
  write(unit_dx,*) '#                                              '

  ishift = 0             
  write(unit_dx,*) '# Object 0 contains the connections, i.e.      '
  write(unit_dx,*) '# indices of line segments                     '            
      
  write(unit_dx,*) '#                                              '
  write(unit_dx,'(a,I12)') &
 'object "segments" class array type int rank 1 shape 2 items ',conns 
! write(unit_dx,*) 'data follows'                        
! write(unit_dx,'(2I8)') (PS(j),PS(j)+1,j=0,conns-1)
  write(unit_dx,'(a,I12)') ' msb ieee data file ./Coast.dx.bin, ',ishift
  write(unit_dx,*) 'attribute "name" string "segments" '  
  write(unit_dx,*) 'attribute "element type" string "lines" '  
  write(unit_dx,*) 'attribute "ref type" string "positions" '  
  write(unit_dx,*) '#                                              '

  ishift = conns*2*4
  write(unit_dx,*) '# Object 1 contains the positions  , i.e.      '
  write(unit_dx,*) '# 2D longitude/latitudes of coastal points     '
  write(unit_dx,*) '#                                              '
  write(unit_dx,'(a,I12)') &
 'object "latlon" class array type float rank 1 shape 2 items ',iklp
! write(unit_dx,*) 'data follows'                        
! write(unit_dx,'(2F8.2)') (latitude (j),longitude(j),j=0,iklp-1)
  write(unit_dx,'(a,I12)') ' msb ieee data file ./Coast.dx.bin, ',ishift
  write(unit_dx,*) 'attribute "dep" string "positions" '  

  write(unit_dx,*) '#                                              '
  write(unit_dx,*) '# Create dataless field from connections       '
  write(unit_dx,*) '#                       and positions          '
  write(unit_dx,*) '#                                              '
  write(unit_dx,*) 'object "Coast" class field                     '
  write(unit_dx,*) 'component "connections" value "segments"       '
  write(unit_dx,*) 'component "positions" value "latlon"           '
  write(unit_dx,*) 'attribute "name" string "Coast line"           '
  write(unit_dx,*) '#                                              '
  write(unit_dx,*) 'end                                            '


stop
end
 

Reply via email to