Импортировать файл Ascii / Grid с MapXtreme2008? - PullRequest
0 голосов
/ 30 апреля 2010

Мы смотрим на обновление MapXtreme2008 с MapX4.5 / Vertical Mapper3 с пробной версией на 60 дней. Мы не можем импортировать файл Ascii / Grid с MapXtreme. Мы постарались опубликовать на форуме MapXtreme, но пока ответа нет. Спасибо.

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

1 Ответ

0 голосов
/ 01 июля 2010

Если Cell Width слишком длинный, создание сетки из точек с использованием интерполятора занимает так много времени. Тем не менее, вы можете указать, какой интерполятор, как агрегировать точки.
Вот пример кода:

//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();

Надеюсь, это поможет
Myra

Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...