Jump to content

Need help with finding Latitude and longitude of certain points of the floorplan.


Recommended Posts

Hi all,

I am working with 2D floorplan and using plain AutoCAD 2019.

 I am able to connect to the online map using geographic location command in AutoCAD.But I also want latitude and longitude of the certain points in the floorplan with which I have no success till now.
Can somebody advise or suggest me how to achieve this?

Thanks 

Edited by AbdRF
Link to comment
Share on other sites

After setting the geographic location via map or file go to the Geolocation tab and use Mark Position to add position markers to your floor plan.  You can then use the list command to give you the latitude/longitude position of the points as well as the WCS coordinates.

Command: LIST
Select objects: 1 found

Select objects: 1 found, 2 total

Select objects:

                  POSITIONMARKER  Layer: "0"
                            Space: Model space
                   Handle = 221
Latitude:     42.47564509
Longitude:    -71.77053900
Elevation:    0.00000000
At Point:     X = 29.08230122, Y = 67.19429027, Z = 0.00000000

                  POSITIONMARKER  Layer: "0"
                            Space: Model space
                   Handle = 222
Latitude:     42.47565523
Longitude:    -71.77049879
Elevation:    0.00000000
At Point:     X = 158.41955278, Y = 113.93650305, Z = 0.00000000

 

Link to comment
Share on other sites

  • 1 year later...

este lisp sirve para poner la latitud y longitud de un punto indicado (wgs84) indicando el huso y hemisferio (norte o sur)

 


(defun c:latlon (/ out x y ptcoord textloc OLDSNAP OLDBLIP OLDLIGHT ed)(vl-load-com)    ;variables as local
(setq OLDSNAP (getvar "OSMODE")            ;store system variables
);setq)
(setvar "CMDECHO" 0)                ;change system variables
(setq smeMa 6378137.0)
(setq smeMe 6356752.314)
(setq zeta "N")
(setvar "OSMODE" 175)
(setq PRECISION 14)

(setq raiz1 (- (* smeMa smeMa) (* smeMe smeMe)))

(setq exd (/ (sqrt raiz1) smeMa))
(setq Sdaexd (/ (sqrt raiz1) smeMe))
(setq SdaeC (* Sdaexd Sdaexd))
(setq rpol (/ (* smeMa smeMa) smeMe))
(initget 128)
(while(/= nil (setq out(getpoint (strcat "\nIndique punto ó [HUso<" (rtos PRECISION 2 0) ">/Hemisferio<" ( strcat zeta ) ">]: ")))) 
     (cond
     ((= 'LIST(type out))
      (setvar "OSMODE" 0)
      (setq x (car out));(rtos (car out) 2 ))
      (setq y (cadr out));(rtos (cadr out) 2 ))
      (setq z (caddr out));(rtos (caddr out) 2 ))     
(setq merC (- (* 6 PRECISION) 183))
(if (= zeta "N") (setq YalEcu y) (setq YalEcu (- y 10000000)))
(setq Fiprima (/ YalEcu (* 6366197.724 0.9996)))
(setq raiz2 (+ 1 (* SdaeC (* (cos Fiprima) (cos Fiprima)))))
      (setq Ni (* (/ rpol (sqrt raiz2)) 0.9996 ))
      (setq aMinusc (/ (- x 500000) Ni))
      (setq zTabla (* (/ (* SdaeC (* aMinusc aMinusc)) 2) (* (cos Fiprima) (cos Fiprima))))
      (setq Xi (* aMinusc (- 1 (/ zTabla 3))))
(setq sinhXi (/ (- (exp Xi) (exp (- Xi))) 2.0))
(setq seno1 (* 2 Fiprima))
(setq Auno  (sin seno1))
(setq Ados (* Auno (* (cos Fiprima) (cos Fiprima))))
(setq Jdos (+ Fiprima (/ Auno 2)))
(setq Jcuatro (/ (+ (* 3 Jdos) Ados) 4))
(setq Jseis (/ (+ (* 5 Jcuatro) (* Ados (* (cos Fiprima) (cos Fiprima)))) 3))
(setq Alfa (* 0.75 SdaeC))
(setq Beta (* (/ 5.0 3.0) (* Alfa Alfa)))
(setq Gamma (* (/ 35.0 27.0) (* Alfa (* Alfa Alfa))))
(setq Bfi (* (* 0.9996 rpol) (- (+ Fiprima (* Beta Jcuatro)) (+ (* Alfa Jdos)(* Gamma Jseis)))))
(setq bMinusc (/ (- YalEcu Bfi) Ni))
(setq Eta (+ (* bMinusc (- 1 zTabla)) Fiprima))
(setq DeltaLamda (atan (/ sinhXi (cos Eta))))
(setq Tau (atan (* (cos DeltaLamda) (/ (sin Eta) (cos Eta)))))
(setq Firad (+ Fiprima (* (- (+ 1.00 (* SdaeC (* (cos Fiprima) (cos Fiprima)))) (* (* 1.50 (* SdaeC (sin Fiprima))) (* (cos Fiprima) (- Tau Fiprima)))) (- Tau Fiprima))))
(setq long (+ (* (/ DeltaLamda pi) 180) merC))
(setq lat (* (/ Firad pi) 180))
      (princ "\nLatitud: ")
         (princ (rtos lat 2 12))
         (princ "\nLongitud: ")
         (princ (rtos long 2 12))
      (setq angulo3 (* pi (/ 45.0 180.0)))
    (setq textloc (POLAR out angulo3 10))
      (setq ptcoord (strcat "(" (rtos lat 2 8)", " (rtos long 2 8) ")" ))
      (setq ptcoordz (strcat "(" (rtos lat 2 8) ", " (rtos long 2 8)  ")" ))
      (setq zeta10 ptcoord)
    (command "_MLEADER" out textloc (strcat zeta10))
          (setq sset (entlast))
       (vla-put-TextRotation (vlax-ename->vla-object sset) (setq angulo4 (* pi (/ 90 180.0))))
(setvar "OSMODE" 175)
    ); end condition #1
      ((= (strcase out) "HU")
       (initget 4)
(if (setq PRECISION2 (getint (strcat "\nHUso< " (rtos PRECISION) " >: ")))
(setq PRECISION PRECISION2)
)
       ); end condition #2
      ((= (strcase out) "H")
       (initget 1 "S N")
(if  (setq zeta2 (getkword (strcat "\Hemisferio [Norte/Sur]:")))
(setq zeta zeta2)
)
       ); end condition #5
      (T
       (alert "Opción no valida!")
       ); end condition #6
      ); end cond    
(initget 128)
); end of while

(princ)
)

 

 

Edited by ap11
error ortográfico
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...