Hello all,
I’m currently evaluating V9 (our company currently licences V4) with a view to use the isolines functionality. I must admit I’m new to ThinkGeo, so am just trying to get the isolines examples from the sample code working.
Seems that both the “Isolines” and “Isolines with Kriging” examples don’t actually draw any isolines. All we get are either a red or green grid, and no isolines or even sample data points. I’ve watched the video which walks though the isolines sample code and it certainly behaves quite differently there.
Is there any trick to getting the samples to work? Any advice much appreciated.
Scott D.
Isolines examples with V9?
Hi Scott,
I download the two isoline samples in product center and then I got the below results:
Comparing with the previous screenshot, it does have some differences on the color, but the isoline shape is fine. Then I looked into it and found there is an issue on generating the gradient colors
Collection<
GeoColor
> colors = GeoColor.GetColorsInQualityFamily(GeoColor.StandardColors.Blue, GeoColor.StandardColors.Red, isoLineBreaks.Count, ColorWheelDirection.Clockwise);
I think there is a bug in the GetColorsInQualityFamily static method and we are conforming it now.
Please let us know if any questions.
Thanks,
Troy
Hello Troy,
Many thanks for the reply, and for looking into this for us.
In the Isolines With Kriging sample that you showed, we just get the red grid after clicking the “Generate” button:
We’re using Visual Studio 2013 Premium. After reading about the GetColorsInQualityFamily, I tried changing it to use GetColorsInHueFamily, but that made no difference.
At the moment we are generating the contours as polygons and manually arranging them on the map (using version 4.5), but we’d much rather upgrade to version 9 and use the native isolines functionality as we sometimes have issues with the shape generation.
Any further help would be much appreciated.
Thanks,
Scott D.
Hi Scott,
I tried to run the sample in vs 2013 but still without issue. Would you please check the below items as I suspect on them?
1. Enable the exception debug so we can know there is no any exception thrown out.
2. Make sure the referring dlls are correct. one is the MapSuiteCore and the other one is Microsoft.SqlServer.Types.dll
3. The "result.grid" is generated in the Data folder.
4. Try another machine to see if the issue still exist?
Thanks,
Troy
Hi Troy,
Thanks for the further suggestions. To answer your questions:
- There are no exceptions thrown, except for a first chance COMException thrown by the adrotator. It doesn’t seem to cause any problems though (ie, it is handled).
- The dlls are correct. Microsoft.SqlServer.Types.dll isn’t local to the executing directory, but even if I alter the reference to copy it locally, it makes no difference.
- The “result.grid” file is generated. Interestingly, though, all the values in the main matrix seem to be the same number (to 4 decimal places). See:
I looked in the code to see where this was generated, wondering if there could be some kind of string culture issue when generating this, but it seemed pretty straight forward, though the actual file generation is done via the ThinkGeo GenerateGrid library call, so I couldn’t see that. Looking at the grid, the values look incorrect to me, but I’m just guessing. - The outcome is the same on other machines.
I hope this is enough info for you to spot something.
Thanks again,
Scott D.
Actually - further to my reply, and my suspicion of there being a problem with the culture when creating the results grid; I added a line to the Sample constructor to set the default culture of the application and that resulted in the results grid being calculated correctly.
So, good to know! As long as that is set, then we’re good to go. We just need to be sure that the thread using ThinkGeo uses that culture.
Regards,
Scott D.
Hi Scott,
It looks you have fixed that by set the culture? I am sorry we hadn’t thinking about the culture problem, thanks for your share.
Regards,
Don