|
Group: Forum Members
Posts: 9,
Visits: 55
|
I am having some confusion with plotting latitude, longitude, and elevation via the NMeshSurfaceSeries. I see that we have to provide indexX, and indexZ values. I am not entirely clear on why. From what I gather, the values are for an array of sorts? The data I am using is a comma delimited file containing latitude, longitude, and elevation. How would the data be translated in the method provided below? Thanks in advance for your help. Latitude, Longitude, Depth 3357.424,-8648.6006,1 3357.4242,-8648.6004,1 3357.4245,-8648.6001,1.1 3357.4242,-8648.6004,1.2 3357.4248,-8648.6,1.3 3357.4248,-8648.6,0.6 3357.4254,-8648.5997,0.6 3357.4254,-8648.5997,0.6 3357.4254,-8648.5997,0.6 3357.4254,-8648.5997,0.6 3357.4254,-8648.5997,0.6 3357.4265,-8648.5976,0.6 3357.4266,-8648.5971,0.7 3357.4268,-8648.5965,0.7 3357.4268,-8648.5965,0.7 3357.4268,-8648.5965,0.7 3357.427,-8648.5955,0.7 3357.427,-8648.5955,0.7 3357.4273,-8648.5943,0.8 3357.4273,-8648.5943,0.8 private void FillData(NMeshSurfaceSeries surface) { //double x, y, z; //int nCountX = surface.Data.GridSizeX; //int nCountZ = surface.Data.GridSizeZ; //for (int j = 0; j < nCountZ; j++) //{ // for (int i = 0; i < nCountX; i++) // { // x = 2 + i + Math.Sin(j / 4.0) * 2; // z = 1 + j + Math.Cos(i / 4.0); // y = Math.Sin(i / 3.0) * Math.Sin(j / 3.0); // if (y < 0) // { // y = Math.Abs(y / 2.0); // } // System.Diagnostics.Debug.WriteLine("{0},{1},{2},{3}", j, i, y, x, z); // surface.Data.SetValue(j, i, y, x, z); // } //} surface.Data.SetValue(j, i, y, x, z); }
|
|
Group: Administrators
Posts: 3.1K,
Visits: 4.2K
|
Hi Sean, We think that the transformation produces incorrect points that's why you get such results. Please find attached a sample app that shows how to plot the same surface using grid and triangulated surface series. The reference image you attached is most likely displayed with grid surface equivalent as the x/z coordinates look equally spaced. Regarding your question: 1) The sample app shows that there is nothing special about the flat surface - simply the y coordinates of adjacent points are equal. 2) There is no internal limitation to the number of data points in the surface - some of our users use the control with millions of data points. The exception is very strange given the fact that VS does not show the stack trace and only appears when running the app in debug mode so it may be related to a .NET bug and not the control. Hope this helps - let us know if you meet any problems or have any questions.
Best Regards, Nevron Support Team
|