TheSwamp
CAD Forums => Vertically Challenged => Land Lubber / Geographically Positioned => Topic started by: dubb on November 15, 2018, 03:25:45 PM

I tried this and it does not work for me.
x = R * cos(lat) * cos(lon)
y = R * cos(lat) * sin(lon)

I did some searching. It is a rather complex question.

I'm not a very civil guy, so :
What does the R represent ? at equator or at your point ?
Are X and Y on the surface ?
OR :

This looks interesting
https://rechneronline.de/earthradius/
added
The equator is better characterized as an ellipse rather than a circle
and
The earth is slightly oblate ( flattened at the poles)
So yes, I can see that it may get complicated :)

This looks to me that you are searching for cartezian coords and you have spherical parameters :
(setvar 'lastpoint '(0.0 0.0 0.0))
pt (x y z) = @R<lat<lon

R represents the radius of the earth.
Taken from stackexchange. https://gis.stackexchange.com/questions/221882/formulatoconvertxytolonglatcoordinatesgivenapoint
I'm not a very civil guy, so :
What does the R represent ? at equator or at your point ?
Are X and Y on the surface ?
OR :

I skipped physics in college. :uglystupid2:
My local coordinate system is in state plane nad83. That might have something to do with the conversion from cartesian to wgs84.

export you point in state plane
import it into QGIS using new layer from delimited text option
export that layer in lat lon, or KML, or what ever...
tell me what you have (post the point file), and tell me what you want...and I can transform and give you a tutorial for same

I'm definitely capable of using qgis, googlearth to convert the coordinates. I was looking to create a function that will take the x,y of a point in AutoCAD, then convert into lat & longs, then apply it to a direct url string to launch in google maps.
export you point in state plane
import it into QGIS using new layer from delimited text option
export that layer in lat lon, or KML, or what ever...
tell me what you have (post the point file), and tell me what you want...and I can transform and give you a tutorial for same

Thats a CIV3D function>
Like the others its a complicated formula and depends totally where you are in the world and what zone you are within. CIV3D has a function to import lat long directly and like I said pretty sure it can export also. For me we just did tricky stuff like take your phone photo with the gps mode on and place it on a dwg at that location, we found around + 510m accuracy not bad for a phone photo.
You would be best googling for the actual formula then it could be rewritten into lisp. You will find it under land surveying.

It can be easily done with lisp using the in built functions if you are using Autocad Civil or Autocad Map.
You would just need to know the code for the coordinate system.
My coorindate system is called "SGC" to convert from WG84 to SGC i use
(ade_projsetsrc "LL84")
(ade_projsetdest "SGC")
(ade_projptforward pt)

Just adding an input.
The coordinate conversion you are trying to.do is involving a math to unproject a projected point to a global coordnate system GCS (actual position in an ellipsoid/spheroid) which are measured in degrees.
Assuming the xy coordinates given are Projected in UTM. Then you would need to tell which one of the 60 zones is the location of the coordinates. Each of the zones has the same easting and northing but different locations.
You would also need to tell which datum you are converting to. This can be WGS84 or any other. There is a long list of datums. lat longs are not only WGS84.
It looks like the equations you are trying are rotational transformations but not relating to geodetics.

Thanks for all the input. I have alot to learn about GIS.
Just adding an input.
The coordinate conversion you are trying to.do is involving a math to unproject a projected point to a global coordnate system GCS (actual position in an ellipsoid/spheroid) which are measured in degrees.
Assuming the xy coordinates given are Projected in UTM. Then you would need to tell which one of the 60 zones is the location of the coordinates. Each of the zones has the same easting and northing but different locations.
You would also need to tell which datum you are converting to. This can be WGS84 or any other. There is a long list of datums. lat longs are not only WGS84.
It looks like the equations you are trying are rotational transformations but not relating to geodetics.

Little late, but have a look at NOAA's Vertical Datum transformation program, can be run via command line, you can input any point in any coordinate system and transform to any other coordinate system. Works perfectly, may take a bit of coding.