问题
Let's say I have a small area mapped out using local planar coordinates in meters. e.g. A rectangular warehouse that's 300m x 450m. I use some GPS device to find the WGS 84 lat/lon of one corner of the warehouse.
How can I project my plane coordinates onto the WGS 84 geoid to find the lat/lon values for the 3 other corners of the warehouse?
I understand this is a complicated problem since values vary on different parts of the earth. Do I need to deal with finding some local coordinate system first or can I somehow use the relationship between my known points to go direcly to WGS84?
I don't have a lot of experience with this sort of problem so forgive me if parts of my question don't make any sense.
回答1:
Your question makes perfect sense, but the solution is far from trivial.
The solution depends on whether your local coordinate system is north-south aligned (relatively easy) or if completely arbitrary (prohibitively harder).
Your local system is accurately north-south aligned:
- convert the known lat/lon coordinate to a cartesian coord (easting,northing).
- determine the x and y differences between (1) and the local coordinate of that point.
- apply this coord difference to to each of the 3 corners local coordinate.
- convert (3) back to geographical lat/lon.
This works because both systems have the same unit scale (metric) and rotation (north-south), all that's left is translation which is the coordinate difference.
Your local system is arbitrary, and not north-south aligned:
- You need two more lat/lon known points. This is a fact, no way around it, otherwise rotation can't be determined and no solution.
- convert these known lat/lon coordinates to cartesian.
- helmert transformation using the 3 known/unknown pairs to solve for the remaining unknown local coordinate(s). (Search for an online tool)
- convert results back to geographical.
This works because the helmert transformation is determining both the translation and rotation between the two systems.
Converting between lat/lon and cartesian and back again is in itself not trivial, but necessary. Either do it accurately using a projection library like proj4, or approximately assuming a spherical earth, e.g. this answer.
Hope this hasn't put you off!
来源:https://stackoverflow.com/questions/14740192/overview-for-converting-local-plane-coordinates-to-wgs84