Contours problem in x64
For the same map and for the same contour interval I get 2 different results depending on the platform whether it is x86 or x64.
JM_WIN32_Cont-0.5.pngJM_x64_Cont - 0.5.png
What can be causing this problem?
thank you,
Dana
JM_WIN32_Cont-0.5.pngJM_x64_Cont - 0.5.png
What can be causing this problem?
thank you,
Dana
Comments
-
Dana,
Which version of the GM SDK are you using? Also is it possible the elevation units were assigned incorrectly to one of the files (i.e. meters for one and feet for the other)? That would cause one file to have about 3 times as many contours as the other for the same contour interval.
Thanks,
Mike
Global Mapper Guru
geohelp@bluemarblegeo.com
Blue Marble Geographics for Coordinate Conversion, Image Reprojection and Vector Translation -
global_mapper wrote: »Dana,
Which version of the GM SDK are you using? Also is it possible the elevation units were assigned incorrectly to one of the files (i.e. meters for one and feet for the other)? That would cause one file to have about 3 times as many contours as the other for the same contour interval.
Thanks,
Mike
Global Mapper Guru
geohelp@bluemarblegeo.com
Blue Marble Geographics for Coordinate Conversion, Image Reprojection and Vector Translation
Hello again,
Thank you for the answer.
I looked and both maps have the mIntervalInFeet true in x86 and also in x64. I debugged to get the values .
I use the 1.34 version.
Thank you,
Dana -
Dana,
What about the elevation layer, what elevation units is it in? If you call GM_GetLayerInfo on the elevation layer the mElevUnits will tell you the native elevation units interpretation for the layer. You can call GM_SetLayerElevationUnits to set the elevation units for a layer in case it is set wrong.
Thanks,
Mike
Global Mapper Guru
geohelp@bluemarblegeo.com
Blue Marble Geographics for Coordinate Conversion, Image Reprojection and Vector Translation -
Hello,
I looked at the layer info in x64 and in x86 by comparison and they have the same elevation unit.
I really don't know what could be causing this .
Thank you,
Dana -
Dana,
That is bizarre. Looking at the contours more closely I suppose it doesn't look like a meters/feet issue since the contours aren't reduced or increased by about a factor of 3. Can you show me your code where you set up the GM_ContourParams_t structure? In particular you should make sure to set the mSize variable, like the following:
GM_ContourParams_t theParams;
::memset( &theParams, 0,sizeof theParams );
theParams.mSize = sizeof theParams;
Thanks,
Mike
Global Mapper Guru
geohelp@bluemarblegeo.com
Blue Marble Geographics for Coordinate Conversion, Image Reprojection and Vector Translation -
global_mapper wrote: »Dana,
That is bizarre. Looking at the contours more closely I suppose it doesn't look like a meters/feet issue since the contours aren't reduced or increased by about a factor of 3. Can you show me your code where you set up the GM_ContourParams_t structure? In particular you should make sure to set the mSize variable, like the following:
GM_ContourParams_t theParams;
::memset( &theParams, 0,sizeof theParams );
theParams.mSize = sizeof theParams;
Thanks,
Mike
Global Mapper Guru
geohelp@bluemarblegeo.com
Blue Marble Geographics for Coordinate Conversion, Image Reprojection and Vector Translation
Hello ,
The way I generate the contours is:
GM_ContourParams_t theContourParams;
::memset( &theContourParams, 0, sizeof theContourParams );
theContourParams.mSize = sizeof theContourParams;
theContourParams.mDesc = "Generated Contours";
theContourParams.mIntervalInFeet = TRUE;
theContourParams.mGenerateAreas = TRUE;
theContourParams.mContourInterval = 0.5;
GM_LayerHandle_t32 theContourLayer = NULL;
_theError = GM_GenerateContours ( _theLayer, &theContourParams, &theContourLayer);
Thank you,
Dana -
Dana,
I wonder if somehow the resampling used during the operation is being calculated differently. It's hard to say what little oddities might exist in such an older version. Can you try forcing the resampling method for the terrain layers to "nearest neighbor" before doing the operation to make sure it isn't somehow switching to a box resampler of some kind?
You can do that by looping over the layers are setting resampling to GM_SAMPLING_NEAREST_NEIGHBOR using the following code:
GM_RasterDisplayOptions_t theDispOpts;
memset( &theDispOpts, 0, sizeof theDispOpts );
theDispOpts.mSize = sizeof theDispOpts;
GM_GetRasterDisplayOptions( theLayerHandle, &theDispOpts );
theDispOpts.mResamplingMethod = GM_SAMPLING_NEAREST_NEIGHBOR;
GM_SetRasterDisplayOptions( theLayerHandle, &theDispOpts );
Thanks,
Mike
Global Mapper Guru
geohelp@bluemarblegeo.com
Blue Marble Geographics for Coordinate Conversion, Image Reprojection and Vector Translation
Categories
- 12.5K All Categories
- 5.5K Features Discussion
- 314 Downloading Imagery
- 1.3K Elevation Data
- 377 Georeferencing Imagery Discussion
- 611 GM Script Language
- 50 User Scripts
- 112 GPS Features
- 397 Projection Questions
- 805 Raster Data
- 1.3K Vector Data
- 6.5K Support
- 161 Announcement and News
- 893 Bug Report
- 557 SDK
- 1.2K Suggestion Box
- 3.7K Technical Support
- 546 Other Discussion
- 128 GIS Data Sources
- 26 Global Mapper Showcase
- 230 How I use Global Mapper
- 104 Global Mapper Forum Website