2010-04-30 5 views
0

Nous cherchons à mettre à jour MapXtreme2008 de MapX4.5/Vertical Mapper3 avec la version d'essai de 60 jours. Nous ne sommes pas en mesure d'importer le fichier Ascii/Grid avec MapXtreme. Nous avons essayé de poster sur le forum MapXtreme, mais pas de réponse jusqu'à présent. Merci.Importer un fichier Ascii/Grid avec MapXtreme2008?

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

+0

pouvez-vous fournir plus de détails sur le problème? –

+0

Nous voulons importer Ascii/Grid (élévation, type de sol, utilisation des terres) avec MapXtreme. MapXtreme prend en charge les données raster avec le fichier .mig. Nous pouvions importer les données en créant une table avec chaque point de cellule, puis utiliser InverseDistanceWeightedInterpolator pour créer la grille. Ça marche, mais c'est très lent. Moins d'une minute avec MapX/Vertical Mapper et 18 minutes avec MapXtreme. C'est la création de la table avec chaque point qui prend des temps. – cro

Répondre

0

Si Largeur Cell est trop long, il faut beaucoup de temps pour créer une grille de points à l'aide d'un interpolateur. Cependant, vous pouvez spécifier quel interpolateur, comment agréger des points.
Voici un exemple de code:

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

Hope this helps
Myra