There are two parts:
Part 1 simple processing
Many people may need to convert the longitude and latitude and plane coordinates when using arcobject. Since latitude and longitude are spherical coordinates and plane coordinates are Cartesian coordinate systems of the X-Y, This is a seemingly difficult problem.
A lot of people have moved out of the projection formulas (such as Gaussian projection or mokto projection) in cartography, map projection, or surveying and plotting. They are also the reference coordinates and the heads of the angle are all big.
In fact, it is very easy to implement this function. The ipoint in the ARC engine can be used for projection and Inverse Projection Operations.
Projection process (C #):
/// Coordinate System of flatref projection, where 54013 is world projection. All latitude and longitude coordinates of world projection can be converted to plane coordinates, however, due to the large distortion of the projection plane, it is also relatively large (equivalent to splitting the whole earth into a piece, and then stretching and sticking it to the plane, the distortion is of course big ). Of course, you can also choose a plane with higher accuracy, such as esrisrprojcs_beijing1954gk_23n. The corresponding value is 21483. Only the earth plane near Beijing is stretched on the plane. Due to the reduced projection area, the projection longitude is increased. However, because the area is small, some longitude and latitude cannot be converted. For example, the precision latitude of the United States cannot be converted using Beijing projection.
Flatref = pfactory. createprojectedcoordinatesystem (54013 );
// Nothing to say, the standard latitude and longitude of the Earth, the X-Y Inverse Projection for longitude and latitude
Earthref = pfactory. creategeographiccoordinatesystem (INT) esrisrgeocstype. esrisrgeocs_nad1983 );
/// Converts latitude and longitude points to plane coordinates.
Private ipoint getproject (Double X, Double Y)
{
Ipoint Pt = new pointclass ();
PT. putcoords (x, y );
Igeometry GEO = (igeometry) pt;
Geo. spatialreference = earthref;
Geo. Project (flatref );
Return pt;
}
/// Convert the plane coordinate to the longitude and latitude.
Private ipoint getgeo (Double X, Double Y)
{
Ipoint Pt = new pointclass ();
PT. putcoords (x, y );
Igeometry GEO = (igeometry) pt;
Geo. spatialreference = flatref;
Geo. Project (earthref );
Double xx = pt. X;
Return pt;
}
In fact, ipoint projection has nothing to do with any map. You can directly call ipoint for projection conversion without using a map.
Part 2
It should be accurate and not studied in depth
Http://www.3snews.net/html/88/688-18657.html