Hi,
I am using the IsoLines with the Web Edition. It seems to work correctly for the most part. However, I have found that when my source data contains all the same values, or all values within a single isoLine level break, the isolines are not drawn. In some cases it actually even throws an access violation exception.
As an example, I used the ThinkGeo IsoLines with Kriging sample solution (ServicesEditionSample_IsolinesWithKriging_CS_120914). I modified the GrayCountyIrrigationWellDepths.csv file to make all the values the same (all values = 41). When you run sample program, you’ll see it raises the exception.
Secondly, if you change one single value in the data file (example change first value = 42), no exception is raised, but no isolines or coloring is done. This is the scenario I have been hitting in my application.
Collection<Feature> isoLineFeatures = IsoLineLayer.GetIsoFeatures(generatedGridMatrix, isoLineLevels, “ContourValue”, IsoLineType.ClosedLinesAsPolygons, -9999);
This line comes back with 0 features.
See the attached zip file. This contains the ThinkGeo example code. My only change was to set the values in the .csv file to the same number. The GrayCountyIrrigationWellDepths.csv file has been modified such that all well depths are 41 (this demonstrates the exception). There is another file called GrayCountyIrrigationWellDepths.AllCloseRange.csv you can use which has all 41 except one value of 42 (this demonstrates the second problem where no isolines or coloring is performed).
Thanks
Randy
IsoLines with same or similar values Exception
Hi Randy,
Seems we couldn’t access the zip file you provided. Could you please attach them again? As we cannot recreate the exception you mentioned.
Would you let us know the reason why you want to set all the values to same? Isolines are constructed with points which has equals value on the map, the value could be elevation or depth. If values on the map is all same or very similar, thus we cannot find a line and its all points have a same value. Because it’s meaningless to generate an isoline on flat area.
Thanks,
I purposely set the values in the example csv file to the same to demonstrate the problem. In my real application, the values are read from a database… sometimes within a given area there may only be a few points and sometimes they are the same. In this scenario, I would expect to see the coloring of the grid to still apply (but it does not).
I have reattached the zip file. Hopefully it comes through this time.
Hi Randy,
Seems the attached file has too long file name, so we still cannot download the attachment. Would you please attach it again with another file name? The best solution is rename the zip file to 12488.zip, that won’t have conflict with other same name zip file.
Isoline is used to show the variation trend based on some known data. We will interpolate these known data then generate a grid matrix, the matrix contains grid cell and its value (interpolated by known point value). Isolines are generated where these cell value start changing. So we need to make sure data have difference in this area.
In this case, data has very small changing in this area, we recommend using InverseDistanceWeightedGridInterpolationModel to generate grid cell. And make sure the value of isoline level is between the max value and min value of interpolated grid.
As for the exception you mentioned, we will dig into once we get your sample.
Thanks,
I have reattached the file with a shorter name.
As a workaround in my application, I have modified my code to check for 0 isoline features returned by IsoLineLayer.GetIsoFeatures(). And in that case I create a rectangleshape feature to cover the entire extent, with a default value so that it may be color coded. This seems to give the desired output.
Thanks,
Randy
12488.zip (416 KB)
Hi Randy,
Thanks for your project, for generate isolines by our GridIsoLineLayer, we have isoLineLevels and Grid file for draw lines, you can try to change another kriging model in CreateGridFile function and modify isoLineLevels in GetGridIsoLineLayer function so that the points placed on different isoline level.
For GridIsoLineLayer, if all the grid file with the same value and they are in same isoline leve, the isoline won’t be drawn.
I think your workaround is correct, if this area with same value, you can draw a polygon cover it with a color, because modify GridIsoLineLayer to complete this is not easy.
Regards,
Don