Example of ArcGIS AO projection coordinate system, projectpoint of Point Projection

Source: Internet
Author: User
Tags gety

In ArcGIS Java SDK, there are many examples. For a map, the coordinate system (spatial reference) is very important. It directly determines the coordinate value of a point! Therefore, this example is very basic! Paste

This example shows that projectpoint is an example of geometry. The engine init and shutdown are omitted. the engine and ArcView licenses are required.

 
System. Out. println ("Starting projectpoint-An ArcObjects Java SDK developer sample ");
// Create a point with geographic coordinates... Point point = New Point (); point. putcoords ( -100.0, 40.0 ); System. Out. println ( "Original coordinates:" + point. getx () + "," + Point. Gety ()); // Create the spatialreferenceenvironment... Spatialreferenceenvironment = New Spatialreferenceenvironment (); // Apply the initial spatial reference... Ispatialreference geographiccoordinatesystem = Spatialreferenceenvironment. creategeographiccoordinatesystem (esrisrgeocstype. esrisrgeocs_nad1927); point. setspatialreferencebyref (geographiccoordinatesystem ); // Create the output projected coordinate system... Ispatialreference projectedcoordinatesystem = Spatialreferenceenvironment. createprojectedcoordinatesystem (esrisrprojcstype. esrisrprojcs_nad1983utm_13n ); // Create the geotransformation... Igeotransformation = (Igeotransformation) spatialreferenceenvironment. creategeotransformation (esrisrgeotransformationtype. esrisrgeotransformation_nad1927_to_wgs1984_5 ); // Project the point... Point. projectex (projectedcoordinatesystem, esritransformdirection. esritransformforward, igeotransformation, False , 0.0, 0.0 ); System. Out. println ( "Projected coordinates:" + point. getx () + "," + Point. Gety (); system. Out. println ( "Done! ");

The most important coordinate systems are wgs1984 and beijing1954 and xian1980, which are unique to China. esrisrgeocstype does not have the Xian keyword. Two grs1980 and ossn1980 do not know if they are

Com. ESRI. ArcGIS. Geometry. esrisrgeocstype. esrisrgeocs_beijing1954 = 4214; Com. ESRI. ArcGIS. Geometry. esrisrgeocstype. esrisrgeocs_wgs1984= 4326;Public Static Final IntEsrisrgeocs_grs1980 = 4019;Public Static Final IntEsrisrgeocs_ossn1980 = 4279;

Esrisrprjcstype also has a coordinate systemCode.

 

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.