MATLAB Map Toolbox Learning Summary (iii) basic knowledge of Map toolbox

Source: Internet
Author: User

MATLAB Map Toolbox Learning Summary (iii) basic knowledge of Map toolbox

What you want to introduce today are some of the more basic functions. With these functions in view, the basic concepts of map projection can be truly understood. To continue to study the function of map projection in Matlab, especially the projection file source code that I will mention in the future, it is necessary to know the functions of these functions. This article will list three cases and explain them in one of the following sections.

1 Work Case: Map projection Job 1

This case starts with job 1. Job 1 is a requirement to calculate some basic parameters of the Earth ellipsoid, including meridional curvature radius, the radius of curvature of the unitary ring, the mean radius of curvature and the radius of the weft ring. When I handed in the homework is a mathematical formula, but in fact, MATLAB has related functions.

Three functions are used here, including Referenceellipsoid, Rcurve, and Rsphere, where angle is the input angle. Using these two functions, it is easy to get the parameters of the above four ellipsoidal bodies.

Let's examine the code.

The first thing you need to introduce is the referenceellipsoid (reference ellipsoid) function. Similar to this function is the Referencesphere (reference sphere) and the Oblatespheroid function, which are all about the settings of the reference system. The arguments in the function brackets are also obvious, set to the WGS84 coordinate system, in km. It is necessary to set the required reference ellipsoid before the calculation of the map projection. MATLAB contains a variety of reference ellipsoid, can be used directly, only need to see the function to help.

The next thing to say is the Rcurve function. This function calculates various radii of curvature. Its basic usage is: Rcurve (Propertyname,ellipsoid,lat). The three parameters mentioned in the above case are: transverse, which is used to calculate the radius of curvature of the Mao unitary circle; meridian, used to calculate the meridional radius of curvature ; parallel, used to calculate the radius of the weft coil. As soon as you enter the reference ellipsoid and latitude you use, you can calculate the corresponding parameters.

Finally, I want to talk about the Rsphere function. This function is used to calculate the radius of the Earth's sphere. It is available in several ways, where the triaxial parameter calculates the average radius of curvature. The formula is sqrt (A*B), which is the geometric mean. Also includes Authalic, Euler and other parameters, please see Help for specific forms.

2 Job Case 2: Map projection Job 2

The problem with Job 2 is where a person starts off, goes eastward, and then goes north (the direction remains the same after the North Pole), eventually returning to the original point, and the same distance eastward toward the north. The core problem is the length of meridians and parallels. Also remember that at that time a whole long string of integral formula to enter Matlab,matlab to me to report too many points can not be counted. It was later replaced with a part of its Taylor expansion to carry out the calculation, fortunately it succeeded. But I don't have a better solution in this article. But I would like to take this opportunity to introduce several functions. Departure,meridianarc,meridianfwd,distance,reckon, respectively.

The function of the departure is to calculate the length of the parallels. Its basic usage is departure (lon1,lon2,lat,ellipsoid), first input two meridians, and then enter the latitude, with the ellipsoid parameters to calculate the length of the corresponding parallels.

The MERIDIANARC and MERIDIANFWD functions are exactly the opposite of the departure function and are used to calculate the length of the meridians. The basic usage of MERIDIANARC is S=meridianarc (phi1,phi2,ellipsoid), which is to calculate the distance s between them as long as the latitude is entered. MERIDIANFWD and Meridianarc are mutually positive and negative calculation. Its basic usage is PHI2=MERIDIANFWD (phi1,s,ellipsoid), that is, enter a little longitude, and then enter the distance and the ellipsoid, you can calculate the corresponding longitude. It is important to note that both functions need to enter a radian-based longitude, so be sure to first convert and re-enter.

The effects of the above three functions are as follows:

The two functions of distance and reckon are all related to distances. The basic usage of distance is [Arclen,az]=distance (Lat1,lon1,lat2,lon2), it is obvious that the distance between two points can be obtained by inputting the latitude and longitude of two points. This distance by default is a large circle distance, of course, can also set RH, to find the distance of the constant line. The obtained arclen is the distance, in addition to AZ, which is the azimuth between two points. The basic usage of reckon is [Latout,lonout]=reckon (Lat,lon,arclen,az), which is just the opposite of distance. Enter the latitude and longitude of a point, distance and azimuth, you can find the distance between the point and the corresponding azimuth angle.

3 Job Case 3: Map projection Job 7

In Job 7, the teacher asked each of us to use a conic isometric projection to display the provinces of their hometown according to the standard parallels. I would like to mention here the most basic organization principle of map projection in MATLAB.

In the toolbox, there is a handle to the mstruct, which is the map projection organizational structure. Once the AXESM is established, use the command: GCM to get the current projection information. Let's take the Mercator projection as an example to see what structures are included.

Of course not only these, but also many of the following properties are not listed. This shows the various properties of the AXESM. And these attributes I mentioned in the first article of this series, although I didn't understand the principles.

For property settings, you can use Getm and Setm to read and set the properties separately, in addition to using AXESM to set them. Getm is to read the projection property, using the method: Getm (Gcm,propertyname), that is, enter the properties you want to know. and Setm need to add a specific value after PropertyName, then the map projection will follow the change.

One of the mapparallels is the key to solving this problem, which refers to the standard parallels of the map projection. When the parameter is a value, the description is a tangent projection, and the two value is the cut projection. It is important to note that not all projection types support setting this property, so verify that the projection can set the standard parallels before use.

Unconsciously, when I write this time, the map projection of the course has been closed lessons. The final assignment was a custom projection, and it took me a lot of time, but it was done. Then, the next article will be the last article in this series, I hope to be able to use the Matlab map Toolbox for people to bring more help.

Tian Jing, the Hermit

2016.5.16

MATLAB Map Toolbox Learning Summary (iii) basic knowledge of Map toolbox

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.