home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
vis-ftp.cs.umass.edu
/
vis-ftp.cs.umass.edu.tar
/
vis-ftp.cs.umass.edu
/
pub
/
Software
/
ASCENDER
/
ascendMar8.tar
/
UMass
/
BuildingFinder
/
Lisp
/
fsToAscii.lisp
< prev
next >
Wrap
Lisp/Scheme
|
1995-05-23
|
752b
|
30 lines
;;
;; Extract the polygon data from the feature set
;; "UMass 2d Buildings" and write it to file.
;;
;;
;; Christopher Jaynes
;;
;;
(in-package 'cme)
(defun fsToFile (fsname filename)
(let* ((pane (ic::pick-a-pane (ic::get-interactor)
"Pick pane containing rooftop hypotheses"))
(topview (top-view pane))
(2dworld (2d-world topview))
(fs (find-fs-named 2dworld fsname))
(stream (open filename :direction :output :if-exists :new-version))
(count 0))
(dolist (curve (inferiors fs))
(format stream "Curve ~d: ~d~%" (incf count)
(number-of-vertices curve))
(dolist (vertex (listarray (vertices curve)))
(format stream "[~,2f ~,2f]~%" (first (listarray vertex))
(second (listarray vertex)))))
(close stream)))