[bknr-cvs] r2396 - branches/bos/projects/bos/m2
ksprotte at common-lisp.net
ksprotte at common-lisp.net
Wed Jan 23 17:57:23 UTC 2008
Author: ksprotte
Date: Wed Jan 23 12:57:22 2008
New Revision: 2396
Modified:
branches/bos/projects/bos/m2/config.lisp
branches/bos/projects/bos/m2/m2.lisp
branches/bos/projects/bos/m2/packages.lisp
Log:
new constant +utm-zone+ (50)
new functions: m2-utm, m2-lon-lat
Modified: branches/bos/projects/bos/m2/config.lisp
==============================================================================
--- branches/bos/projects/bos/m2/config.lisp (original)
+++ branches/bos/projects/bos/m2/config.lisp Wed Jan 23 12:57:22 2008
@@ -6,6 +6,7 @@
(defconstant +width+ 10800)
;; Die UTM-Koordinaten der Nord-West-Ecke des Gebiets (Zone 50)
+(defconstant +utm-zone+ 50)
(defconstant +nw-utm-x+ 491698.366d0)
(defconstant +nw-utm-y+ 9890100.289d0)
Modified: branches/bos/projects/bos/m2/m2.lisp
==============================================================================
--- branches/bos/projects/bos/m2/m2.lisp (original)
+++ branches/bos/projects/bos/m2/m2.lisp Wed Jan 23 12:57:22 2008
@@ -88,6 +88,10 @@
;; UTM laeuft von links nach rechts und von UNTEN NACH OBEN.
(defun m2-utm-x (m2) (+ +nw-utm-x+ (m2-x m2)))
(defun m2-utm-y (m2) (- +nw-utm-y+ (m2-y m2)))
+(defun m2-utm (m2) (list (m2-utm-x m2) (m2-utm-y m2)))
+
+(defun m2-lon-lat (m2)
+ (geo-utm:utm-x-y-to-lon-lat (m2-utm-x m2) (m2-utm-y m2) +utm-zone+ t))
(defmethod m2-num-to-utm ((num integer))
(multiple-value-bind (y x) (truncate num +width+)
Modified: branches/bos/projects/bos/m2/packages.lisp
==============================================================================
--- branches/bos/projects/bos/m2/packages.lisp (original)
+++ branches/bos/projects/bos/m2/packages.lisp Wed Jan 23 12:57:22 2008
@@ -6,13 +6,14 @@
(defpackage :geo-utm
(:use :cl)
- (:export #:lat-lon-to-utm-x-y
- #:utm-x-y-to-lat-lon))
+ (:export #:lon-lat-to-utm-x-y
+ #:utm-x-y-to-lon-lat))
(defpackage :bos.m2.config
(:export #:+width+
#:+nw-utm-x+
#:+nw-utm-y+
+ #:+utm-zone+
#:+m2tile-width+
#:+price-per-m2+
@@ -86,6 +87,8 @@
#:m2-y
#:m2-utm-x
#:m2-utm-y
+ #:m2-utm
+ #:m2-lon-lat
#:escape-nl
#:return-m2s
More information about the Bknr-cvs
mailing list