Автор работы: Пользователь скрыл имя, 06 Января 2013 в 23:20, реферат
Цель работы – анализ методов информационной визуализации и визуального анализа и применение их для разработки прототипа системы поддержки конечного пользователя.
В процессе работы проводился анализ возможностей географических информационных систем как средств визуализации и анализа данных, исследовались различные методы представления географических и семантических данных.
Raions.Symbology = scheme;
IMapLabelLayer labelLayer = new MapLabelLayer();
ILabelCategory category = labelLayer.Symbology.
category.Expression = "[name]";
labelLayer.Symbolizer = lb;
category.Symbolizer.
IMapLabelLayer labelLayer2 = labelLayer;
PolygonSymbolizer style = new PolygonSymbolizer(color1);
style.OutlineSymbolizer = new LineSymbolizer(Color.Black, 2);
Raions.Symbolizer = style;
Raions.LabelLayer = labelLayer;
Raions.ShowLabels = true;
}
private void loadMainStreet()
{
PolygonSymbolizer water = new PolygonSymbolizer(Color.
water.OutlineSymbolizer = new LineSymbolizer(Color.
Water = map.Layers.Add(DataManager.
(@"GisData\Water.shp", false, prog));
mapLayers.Add(Water);
Water.Symbolizer = water;
LineSymbolizer ls = new LineSymbolizer(Color.Gray, 8);
road_scheme = new LineScheme();
Color color1 = Color.FromArgb(0, 0, 0);
LineCategory traff1 = new LineCategory(color1, 6);
traff1.FilterExpression = "[traffic] < 4";
Color color2 = Color.FromArgb(108, 108, 108);
LineCategory traff2 = new LineCategory(color2, 6);
traff2.FilterExpression = " [traffic] >= 4 ";
Color color3 = Color.FromArgb(165, 165, 165);
LineCategory traff3 = new LineCategory(color3, 6);
traff3.FilterExpression = " [traffic] > 5 ";
Color color4 = Color.FromArgb(212, 212, 212);
LineCategory traff4 = new LineCategory(color4, 6);
traff4.FilterExpression = " [traffic] > 8 ";
road_scheme.ClearCategories();
road_scheme.AddCategory(
road_scheme.AddCategory(
road_scheme.AddCategory(
road_scheme.AddCategory(
road_scheme2 = new LineScheme();
LineCategory traff12 = new LineCategory(color1, 6);
traff12.FilterExpression = "[quality] < 4";
LineCategory traff22 = new LineCategory(color2, 6);
traff22.FilterExpression = " [quality] >= 4 ";
LineCategory traff32 = new LineCategory(color3, 6);
traff32.FilterExpression = " [quality] > 5 ";
LineCategory traff42 = new LineCategory(color4, 6);
traff42.FilterExpression = " [quality] > 8 ";
road_scheme2.ClearCategories()
road_scheme2.AddCategory(
road_scheme2.AddCategory(
road_scheme2.AddCategory(
road_scheme2.AddCategory(
MainStreet = map.Layers.Add(DataManager.
(@"GisData\MainStreet.shp", false, prog));
mapLayers.Add(MainStreet);
MainStreet.Symbology = road_scheme;
MainStreet.Symbolizer = ls;
MainStreetTraff = map.Layers.Add(DataManager.
(@"GisData\traff.shp", false, prog));
LineSymbolizer ls2 = new LineSymbolizer(Color.Red, 5);
MainStreetTraff.Symbolizer = ls2;
PointSymbolizer icon = new PointSymbolizer(Color.Gray, PointShapes.Ellipse, 10);
MainStreetIco = map.Layers.Add(DataManager.
(@"GisData\MainStreetIco.shp", false, prog));
MainStreetIco.Symbolizer = icon;
}
private void loadBigStreet()
{
BigStreet = map.Layers.Add(DataManager.
(@"GisData\BigStreet.shp", false, prog));
BigStreet.Symbology = road_scheme;
mapLayers.Add(BigStreet);
}
private void loadStreets()
{
Streets = map.Layers.Add(DataManager.
(@"GisData\Streets.shp", false, prog));
Streets.Symbology = road_scheme;
mapLayers.Add(Streets);
}
private void loadBuildings()
{
PolygonSymbolizer style = new PolygonSymbolizer(Color.
style.OutlineSymbolizer = new LineSymbolizer(Color.Black, 2);
Buildings = map.Layers.Add(DataManager.
(@"GisData\Buildings.shp", false, prog));
mapLayers.Add(Buildings);
IMapLabelLayer labelLayer = new MapLabelLayer();
LabelSymbolizer lb = new LabelSymbolizer();
lb.FontSize = 15;
ILabelCategory category = labelLayer.Symbology.
category.Expression = "[number]";
labelLayer.Symbolizer = lb;
Buildings.LabelLayer = labelLayer;
Buildings.ShowLabels = true;
Buildings.Symbolizer = style;
}
private void loadSvetofor()
{
PointSymbolizer sveto = new PointSymbolizer(Images.sveto, 20);
Svetofor = map.Layers.Add(DataManager.
Svetofor.Symbolizer = sveto;
}
private void loadPeshehod()
{
PointSymbolizer pesh = new PointSymbolizer(Images.znak, 20);
Peshehod = map.Layers.Add(DataManager.
(@"GisData\Peshehod.shp", false, prog));
Peshehod.Symbolizer = pesh;
}
private void loadPlaces()
{
PointSymbolizer place = new PointSymbolizer(Images._4051, 20);
Places = map.Layers.Add(DataManager.
(@"GisData\Places.shp", false, prog));
Places.Symbolizer = place;
}
private void UncheckOtherButtonsButMe(
{
foreach (ToolStripItem item in this.toolStrip1.Items)
{
ToolStripButton buttonItem = item as ToolStripButton;
if (buttonItem != null)
{
if (buttonItem.Name != checkedButton.Name)
{
buttonItem.Checked = false;
}
}
}
}
private void cmdZoomIn_Click(object sender, EventArgs e)
{
if (map == null) return;
if (cmdZoomIn.Checked == false)
{
UncheckOtherButtonsButMe(
cmdZoomIn.Checked = true;
foreach (IMapFunction gt in map.MapFunctions.Values)
{
gt.Deactivate();
MyZoomInFunction zf = gt as MyZoomInFunction;
if (zf != null)
{
zf.Activate();
map.Cursor = Cursors.UpArrow;
this.mode = 1;
try
{
MemoryStream ms = new MemoryStream(Resource.
map.Cursor = new Cursor(ms);
}
catch
{
map.Cursor = Cursors.Arrow;
}
continue;
}
}
}
}
private void cmdZoomOut_Click(object sender, EventArgs e)
{
if (map == null) return;
if (cmdZoomOut.Checked == false)
{
UncheckOtherButtonsButMe(
cmdZoomOut.Checked = true;
foreach (IMapFunction gt in map.MapFunctions.Values)
{
gt.Deactivate();
MyZoomOutFunction zf = gt as MyZoomOutFunction;
if (zf != null)
{
zf.Activate();
map.Cursor = Cursors.UpArrow;
this.mode = 2;
try
{
MemoryStream ms = new MemoryStream(Resource.
map.Cursor = new Cursor(ms);
}
catch
{
map.Cursor = Cursors.Arrow;
}
continue;
}
}
}
}
private void cmdMaxExtents_Click(object sender, EventArgs e)
{
if (map == null) return;
UncheckOtherButtonsButMe(
map.ZoomToMaxExtent();
map.FunctionMode = FunctionModes.None;
mode = 0;
zoomCount = 0;
checkVisual.Enabled = false;
InvisibleLayers();
City.IsVisible = true;
if (checkLabels.Checked) City.ShowLabels = true;
else City.ShowLabels = false;
City.SelectionEnabled = true;
map.Invalidate();
Rectangle r = map.MapFrame.View;
int w = r.Width;
int h = r.Height;
r.Inflate((int)(r.Width / 4), (int)(r.Height / 4));
map.MapFrame.View = r;
map.MapFrame.ResetExtents();
}
private void cmdPan_Click(object sender, EventArgs e)
{
if (map == null) return;
if (cmdPan.Checked == false)
{
UncheckOtherButtonsButMe(
cmdPan.Checked = true;
map.FunctionMode = FunctionModes.Pan;
mode = 0;
}
}
private void cmdSelect_Click(object sender, EventArgs e)
{
if (map == null) return;
if (cmdSelect.Checked == false)
{
UncheckOtherButtonsButMe(
cmdSelect.Checked = true;
map.FunctionMode = FunctionModes.Info;
foreach (IMapFunction gt in map.MapFunctions.Values)
{
gt.Deactivate();
SelectInfoFunction zf = gt as SelectInfoFunction;
if (zf != null)
{
zf.Activate();
map.Cursor = Cursors.Hand;
mode = 0;
continue;
}
}
}
}
private void cmdCalc_Click(object sender, EventArgs e)
{
if (map == null) return;
if (cmdCalc.Checked == false)
{
UncheckOtherButtonsButMe(
cmdCalc.Checked = true;
foreach (IMapFunction gt in map.MapFunctions.Values)
{
gt.Deactivate();
MyMeasureFunction zf = gt as MyMeasureFunction;
if (zf != null)
{
zf.Activate();
map.Cursor = Cursors.Cross;
mode = 0;
continue;
}
}
}
if (cmdCalc.Checked == false)
{
UncheckOtherButtonsButMe(
cmdCalc.Checked = true;
map.FunctionMode = FunctionModes.Measure;
}
}
private void map_click(object sender, EventArgs e)
{
if (this.mode == 1 && ((MouseEventArgs)e).Button == MouseButtons.Left)
{
this.zoomCount += 1;
Console.Out.WriteLine(this.
}
else if (this.mode == 1 && ((MouseEventArgs)e).Button == MouseButtons.Right)
{
this.zoomCount -= 1;
Console.Out.WriteLine(this.
}
else if (this.mode == 2 && ((MouseEventArgs)e).Button == MouseButtons.Right)
{
this.zoomCount += 1;
Console.Out.WriteLine(this.
}
else if (this.mode == 2 && ((MouseEventArgs)e).Button == MouseButtons.Left)
{
this.zoomCount -= 1;
Console.Out.WriteLine(this.
}
if (zoomCount == 1)
{
InvisibleLayers();
City.IsVisible = true;
selectedFalse();
City.SelectionEnabled = true;
if (checkLabels.Checked) City.ShowLabels = true;
else City.ShowLabels = false;
panel1.Visible = false;
checkVisual.Enabled = false;
}
if (zoomCount >= 2)
{
InvisibleLayers();
Raions.IsVisible = true;
selectedFalse();
editTrue();
Raions.SelectionEnabled = true;
checkVisual.Enabled = true;
btnVis1.Text = "По населению";
btnVis2.Text = "По площади";
}
if (zoomCount >= 3)
{
map.MapFrame.ClearSelection();
InvisibleLayers();
CityAsImage();
Water.IsVisible = true;
MainStreet.IsVisible = true;
MainStreetIco.IsVisible = true;
selectedFalse();
editTrue();
Water.SelectionEnabled = true;
MainStreet.SelectionEnabled = true;
btnVis1.Text = "По качеству полотна";
btnVis2.Text = "По средней скорости";
}
if (zoomCount >= 6)
{
CityAsImage();
Raions.IsVisible = false;
MainStreet.IsVisible = true;
MainStreetIco.EditMode = false;
Water.IsVisible = true;
BigStreet.IsVisible = true;
selectedFalse();
MainStreet.SelectionEnabled = true;
Water.SelectionEnabled = true;
BigStreet.SelectionEnabled = true;
btnVis1.Text = "По уровню пробок";
btnVis2.Text = "По качеству покрытия";
}
if (zoomCount >= 13)
{
CityAsImage();
Raions.IsVisible = false;
MainStreet.IsVisible = true;
Water.IsVisible = true;
BigStreet.IsVisible = true;
Streets.IsVisible = true;
selectedFalse();
MainStreet.SelectionEnabled = true;
Water.SelectionEnabled = true;
BigStreet.SelectionEnabled = true;
Streets.SelectionEnabled = true;
btnVis1.Text = "По уровню пробок";
btnVis2.Text = "По качеству покрытия";
}
if (zoomCount >= 15)
{
CityAsImage();
Raions.IsVisible = false;
MainStreet.IsVisible = true;
Информация о работе Разработка специализированной системы визуализации и анализа городской среды