Coordinate of Mapx

Source: Internet
Author: User
We know that the difference between a GIS development kit or a GIS platform and a general graphics system is that the objects managed by it are all spatial references (or geographical references). In short, spatial references are coordinate systems, but the coordinate system is not a simple Cartesian coordinate system, because the earth is a circle. For more information about the relevant documents, see the General cartography textbooks.

Pair
In GIS, the coordinate system corresponds to each object. That is to say, any space object (feature) must have a space reference. However, in implementation, a layer usually corresponds to a space.
Reference, that is, the coordinate system. The whole map also has a spatial reference, and some systems, this reference is also divided into actual internal data and display (such as MapX ).

MapX null
For more information, see coordsys.
Object. The settings are plane coordinates (Cartesian coordinates, non-earth), longitude and latitude coordinates, and projection coordinate systems. Then the coordsys object can be
Layer and map object association, or each layer object and map object have their own space reference.

In MapX, the layer space reference can be obtained or set through the layer. coordsys attribute.

Mapx
The map object space reference can be set through the map. displaycoordsys and map. numericcoordsys attributes. The former is the display coordinate, and the latter is
Is the actual coordinate. If you set the former to the latitude and longitude, and the latter to the projection coordinate, you can use the map tool to obtain the coordinate unit of the former, and use featurefactory
Like adding an attribute, the coordinates used are the latter.

Therefore, when the corresponding layer and map object space references are inconsistent, real-time (onfly) transformation is required during display.

When we use featurefactory to add coordinates, we must be clear about the settings of the numericcoordsys attribute of the current map.

When creating a point object, the coordinate system numericcoordsys is used.

For a MapX control without any data added, the numericcoordsys attribute of its map is flat coordinate. If layers is used. add layer. This attribute is automatically changed to the space reference of the first layer to be added.

If geoset is loaded, the coordinate system is created through geoset.

By MapX layers. the add method creates a layer. Generally, you do not need to specify the space reference of the layer or specify the space reference of the file layer object in the layerinfo object, the space of the created layer is referenced as the space reference of MapX (numericcoordsys ).

In addition, when using non-Earth coordinates, You need to specify the range. The default value is-100 to 100, which is too small, but cannot be too large. If you are not sure, use Int. max is suitable. If too much data overflows, It is very small.

Coordinates are a headache in GIS development. If you encounter similar problems, I hope this article will be helpful.

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.