Super map secondary development from 0 to 1


Why write this blog

Geographic Information System layman, computer background. The project requires development based on CSharp and SuperMap. After looking at the example program of SuperMap, I found that there is no one I can use. Some examples have reference value, but they are also edges and corners, not a system. You need to organize your thoughts.

2、 Demand

Colleagues provide an algorithm interface to calculate the attribute value of a point (similar to the height contour value) according to the entered longitude and latitude and other parameters. The project needs to calculate the attribute value of each point in China, and then render the color and present it on the map according to the different attribute values (later known as thematic map).

3、 Introduction to SuperMap

I use the SuperMap iobjet 8C, and the machine is 64 bit. Due to the integration of other software interfaces, 64 bit programs must be generated, so only supermap64 bit installation package can be installed. In this way, you can't drag and drop controls or run sample programs (all 32-bit).

4、 Development history

1. First, according to the entry program, the function of adding mapcontrol to WinForm form form is realized, and then the workspace is opened to display the map.
2. Call the interface, calculate the value of each point (with a longitude and a latitude as the interval), define a two-dimensional array rec [] [], to store the value of each point. After checking the help document, I roughly understand that the grid thematic map needs to be generated. So I need to generate grid data. At the beginning, I think my array data contains the information needed by grid data. So I want to directly generate grid data set, and then fill in the attribute value and the corresponding latitude and longitude. But ask the customer service that they will not do this generally, and they will use interpolation algorithm to generate grid data.
But during the consultation, the super map staff asked me repeatedly.
Person: how do you get your point data?
Me: my data is based on latitude and longitude
Man: how is the latitude and longitude taken?
Me: the latitude and longitude of the points on the map of China? (what's the problem???)
Man: even if the coordinate system is not the same and the longitude and latitude are not the same, what is your reference system? You need to make sure
Summary: because it's a layman, I search the latitude and longitude range of China on the Internet, get the range value, and then get the point data, but what coordinate system is this? There is no way to solve it, and the point data must have coordinate system and other data, and what is the coordinate system of the map, these need to be corresponding. Finally, my solution is to find a point data set from the selected map data set, and empty the point data content after copying. Then the empty data set has the same coordinate system as the map, and no parameters need to be set. In this way, after adding point data to the point data set, the point data set is obtained.
3. The point data set needs to be converted into grid data set. The e-mail customer service starts to give an interface interpolator, but it can't be used in this way. Because the DEM data needs to be built first, and this interface will be called automatically during the construction process (the call customer service told me). The solution is to DEM the point data generated by me through idesktop (the location of each version is not the same) Same as, 8C under data column). Then set the corresponding object parameters according to the parameter settings in the parameter panel (further modify the parameters appropriately).

Super map secondary development from 0 to 1
4. For layer display, the grid map should be displayed at the bottom so as not to obscure the vector data. At the same time, the surface data in the data set layer of the map should be removed (try to set translucency, but the effect is not good), leaving only line data, point data and text data. In this way, the effect will be better.