首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >用MapXtreme2008导入Ascii/网格文件?

用MapXtreme2008导入Ascii/网格文件?
EN

Stack Overflow用户
提问于 2010-05-01 03:34:32
回答 1查看 461关注 0票数 0

我们正在考虑通过60天试用版从MapX4.5/Vertical Mapper3升级到MapXtreme2008。我们无法使用MapXtreme导入Ascii/网格文件。我们已经尝试在MapXtreme论坛上发帖了,但到目前为止还没有回应。谢谢。

http://en.wikipedia.org/wiki/ESRI_grid

EN

回答 1

Stack Overflow用户

发布于 2010-07-01 14:56:28

但是,您可以指定插值器以及如何聚合点。

下面是一个代码示例:

代码语言:javascript
复制
//outTable and usaCapsTable is given

// Create the Interpolator
InverseDistanceWeightedInterpolator idw = new InverseDistanceWeightedInterpolator();
// Set the values
idw.SearchRadius = 100; // in pixels
idw.Exponent = 2;
idw.MinPoints = 1;
idw.MaxPoints = 1000;

// Create a GridCreator and pass in the table to use for input, the column holding the data, the interpolator. 
MapInfo.Raster.GridCreatorFromFeatures cg = new GridCreatorFromFeatures(usaCapsTable, "Pop_1990", idw, outTable);
cg.CellWidth = new Distance(12.9, DistanceUnit.Mile);
Inflection[] infl = new Inflection[5];
infl[0] = new Inflection(8000, Color.Blue);
infl[1] = new Inflection(121000, Color.Aquamarine);
infl[2] = new Inflection(199000, Color.Green);
infl[3] = new Inflection(298000, Color.Yellow);
infl[4] = new Inflection(980000, Color.Red);

// Create a grid Style to use and pass in the onflection points.
cg.GridStyle = new GridStyle(infl, true, Color.White, true);

// Now check if there is a current selection. If yes then use the objects to clip the grid against.
if ((MapInfo.Engine.Session.Current.Selections.DefaultSelection.Count > 0) &&
    MapInfo.Engine.Session.Current.Selections.DefaultSelection[0].Count > 0)
{
    MapInfo.FeatureProcessing.FeatureProcessor fp = new MapInfo.FeatureProcessing.FeatureProcessor();
    Feature clip = fp.Combine(MapInfo.Engine.Session.Current.Selections.DefaultSelection[0]);
    cg.ClippingGeometry = clip.Geometry;
}
else
{
    cg.ClippingGeometry = null;
}

// Create the grid file.
cg.CreateGrid();

希望这能有所帮助

玛拉

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/2747143

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档