全国高分辨率土地利用数据服务 土地利用数据服务 土地覆盖数据服务 坡度数据服务 土壤侵蚀数据服务 全国各省市DEM数据服务 耕地资源空间分布数据服务 草地资源空间分布数据服务 林地资源空间分布数据服务 水域资源空间分布数据服务 建设用地空间分布数据服务 地形、地貌、土壤数据服务 分坡度耕地数据服务 全国大宗农作物种植范围空间分布数据服务
多种卫星遥感数据反演植被覆盖度数据服务 地表反照率数据服务 比辐射率数据服务 地表温度数据服务 地表蒸腾与蒸散数据服务 归一化植被指数数据服务 叶面积指数数据服务 净初级生产力数据服务 净生态系统生产力数据服务 生态系统总初级生产力数据服务 生态系统类型分布数据服务 土壤类型质地养分数据服务 生态系统空间分布数据服务 增强型植被指数数据服务
多年平均气温空间分布数据服务 多年平均降水量空间分布数据服务 湿润指数数据服务 大于0℃积温空间分布数据服务 光合有效辐射分量数据服务 显热/潜热信息数据服务 波文比信息数据服务 地表净辐射通量数据服务 光合有效辐射数据服务 温度带分区数据服务 山区小气候因子精细数据服务
全国夜间灯光指数数据服务 全国GDP公里格网数据服务 全国建筑物总面积公里格网数据服务 全国人口密度数据服务 全国县级医院分布数据服务 人口调查空间分布数据服务 收入统计空间分布数据服务 矿山面积统计及分布数据服务 载畜量及空间分布数据服务 农作物种植面积统计数据服务 农田分类面积统计数据服务 农作物长势遥感监测数据服务 医疗资源统计数据服务 教育资源统计数据服务 行政辖区信息数据服务
Landsat 8 高分二号 高分一号 SPOT-6卫星影像 法国Pleiades高分卫星 资源三号卫星 风云3号 中巴资源卫星 NOAA/AVHRR MODIS Landsat TM 环境小卫星 Landsat MSS 天绘一号卫星影像
自定义工具类,实现添加图名,比例尺,指北针
-------------------------添加图名------------------------------
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using ESRI.ArcGIS.Display;
using ESRI.ArcGIS.SystemUI;
using ESRI.ArcGIS.Carto;
using ESRI.ArcGIS.esriSystem;
using ESRI.ArcGIS.Output;
using ESRI.ArcGIS.Controls;
using ESRI.ArcGIS.Geometry;
using ESRI.ArcGIS.ADF.BaseClasses;
using stdole;
//自定义工具类,实现添加图名功能
namespace WindowsApplication1
{
class addPageLayoutName:BaseTool
{
public Form1 formTemp;
TextBox textbox;
AxPageLayoutControl axLayoutControl;
IPoint pPoint;
//double xMap, yMap;
public static double xMap;
public static double yMap;
public override void OnMouseDown(int
Button, int Shift, int X, int Y)
{
if (Button==1)
{
pPoint =
formTemp.returnPageLayoutControl().ActiveView.ScreenDisplay.DisplayTransformation.ToMapPoint(X,
Y);
xMap =
pPoint.X;
yMap =
pPoint.Y;
formTemp.returnTextbox1().Location = new System.Drawing.Point(X,Y);
formTemp.returnTextbox1().Visible = true;
formTemp.returnTextbox1().Focus();
formTemp.returnTextbox1().Text = "请在此输入图名";
}
}
public override void OnCreate(object
hook)
{
axLayoutControl = hook as
AxPageLayoutControl;
}
public void
AddTextElement(AxPageLayoutControl PageLayoutControl,double x,double y,string
textName)
{
IPageLayout pPageLayout;
IActiveView pAV;
IGraphicsContainer
pGraphicsContainer;
IPoint pPoint;
ITextElement pTextElement;
IElement pElement;
ITextSymbol pTextSymbol;
IRgbColor pColor;
pPageLayout =
PageLayoutControl.PageLayout;
pAV =
(IActiveView)pPageLayout;
pGraphicsContainer =
(IGraphicsContainer)pPageLayout;
pTextElement = new
TextElementClass();
IFontDisp pFont = new
StdFontClass() as IFontDisp;
pFont.Bold = true;
pFont.Name = "宋体";
pFont.Size = 13;
pColor = new
RgbColorClass();
pColor.Red = 255;
pTextSymbol = new
TextSymbolClass();
pTextSymbol.Color =
(IColor)pColor;
pTextSymbol.Font = pFont;
pTextElement.Text =
textName;
pTextElement.Symbol =
pTextSymbol;
pPoint = new PointClass();
pPoint.X = x;
pPoint.Y = y;
pElement =
(IElement)pTextElement;
pElement.Geometry =
(IGeometry)pPoint;
pGraphicsContainer.AddElement(pElement, 0);
pAV.PartialRefresh(esriViewDrawPhase.esriViewGraphics, null, null);
}
}
}
另外附加其它(添加比例尺,指北针的代码,,,也是通过自定义工具类实现的,,,,下列只给出自定义工具类的代码!)
---------------------------------------添加指北针-------------------------------------------
using System;
using System.Collections.Generic;
using System.Text;
using ESRI.ArcGIS.Carto;
using ESRI.ArcGIS.Controls;
using ESRI.ArcGIS.Display;
using ESRI.ArcGIS.Geometry;
using ESRI.ArcGIS.ADF.BaseClasses;
namespace WindowsApplication1
{
sealed class addNorthArrow : BaseTool
{
AxPageLayoutControl axPageLayout=null;
IPoint pPoint;
bool bInuse;
INewEnvelopeFeedback pNewEnvelopeFeedback = null;
public addNorthArrow()
{
base.m_caption= "添加指北针";
base.m_toolTip = "添加指北针";
base.m_category =
"customCommands";
base.m_message = "添加指北针";
base.m_deactivate = true;
}
public override void OnCreate(object hook)
{
axPageLayout =
(AxPageLayoutControl)hook;
}
public override void OnMouseDown(int Button, int
Shift, int X, int Y)
{
pPoint =
axPageLayout.ActiveView.ScreenDisplay.DisplayTransformation.ToMapPoint(X, Y);
bInuse = true;
}
public override void OnMouseMove(int Button, int
Shift, int X, int Y)
{
if (bInuse==false)
{
return;
}
if
(pNewEnvelopeFeedback==null)
{
pNewEnvelopeFeedback = new NewEnvelopeFeedbackClass();
pNewEnvelopeFeedback.Display = axPageLayout.ActiveView.ScreenDisplay;
pNewEnvelopeFeedback.Start(pPoint);
}
pNewEnvelopeFeedback.MoveTo(axPageLayout.ActiveView.ScreenDisplay.DisplayTransformation.ToMapPoint(X,
Y));
}
public override void OnMouseUp(int Button, int
Shift, int X, int Y)
{
if (bInuse==false)
{
return;
}
if
(pNewEnvelopeFeedback==null)
{
pNewEnvelopeFeedback = null;
bInuse =
false;
return;
}
IEnvelope
pEnvelope=pNewEnvelopeFeedback.Stop();
if((pEnvelope.IsEmpty)||(pEnvelope.Width==0)||(pEnvelope.Height==0))
{
pNewEnvelopeFeedback = null;
bInuse =
false;
return;
}
addNorthArrowForm northArrow
= new addNorthArrowForm();
IStyleGalleryItem
pStyleGalleryItemTemp = Form1.pStyleGalleryItem;
if
(pStyleGalleryItemTemp==null)
{
return;
}
IMapFrame pMapframe =
axPageLayout.ActiveView.GraphicsContainer.FindFrame(axPageLayout.ActiveView.FocusMap)as
IMapFrame;
IMapSurroundFrame
pMapSurroundFrame = new MapSurroundFrameClass();
pMapSurroundFrame.MapFrame =
pMapframe;
pMapSurroundFrame.MapSurround =
(IMapSurround)pStyleGalleryItemTemp.Item;
//在pageLayout中根据名称查要Element,找到之后删除已经存在的指北针
IElement pElement =
axPageLayout.FindElementByName("NorthArrows");
if (pElement!=null)
{
axPageLayout.ActiveView.GraphicsContainer.DeleteElement(pElement); //删除已经存在的指北针
}
pElement =
(IElement)pMapSurroundFrame;
pElement.Geometry =
(IGeometry)pEnvelope;
axPageLayout.ActiveView.GraphicsContainer.AddElement(pElement,
0);
axPageLayout.ActiveView.PartialRefresh(esriViewDrawPhase.esriViewGraphics,
null, null);
pNewEnvelopeFeedback = null;
bInuse = false;
}
}
}
----------------------------------------添加比例尺(Scale Bars)-----------------------------------
using System;
using System.Collections.Generic;
using System.Text;
using ESRI.ArcGIS.Carto;
using ESRI.ArcGIS.Controls;
using ESRI.ArcGIS.Display;
using ESRI.ArcGIS.Geometry;
using ESRI.ArcGIS.ADF.BaseClasses;
namespace WindowsApplication1
{
sealed class addScaleBar:BaseTool
{
//----------------------------------------------------------
//发现的重大问题,如果用IHookHelper,就会出现问题,用AxPageLayoutControl则不会出现问题,以后注意
//private IHookHelper pHookHelper=null;
private AxPageLayoutControl
axPagelayoutControl = null;
private IPoint pPoint;
private INewEnvelopeFeedback
pNewEnvelopeFeedback;
private bool bInuse;
public addScaleBar()
{
base.m_caption =
"ScaleBar";
base.m_category =
"myCustomCommands(C#)";
base.m_message = "Add
a scale bar map surround";
base.m_name =
"myCustomCommands(C#)_ScaleBar";
base.m_toolTip = "Add
a scale bar";
base.m_deactivate = true;
}
public override void OnCreate(object
hook)
{
//pHookHelper.Hook = hook;
axPagelayoutControl = hook
as AxPageLayoutControl;
}
public override void OnMouseDown(int
Button, int Shift, int X, int Y)
{
pPoint =
axPagelayoutControl.ActiveView.ScreenDisplay.DisplayTransformation.ToMapPoint(X,
Y);
bInuse = true;
}
public override void OnMouseMove(int
Button, int Shift, int X, int Y)
{
if (bInuse==false)
{
return;
}
if
(pNewEnvelopeFeedback==null)
{
pNewEnvelopeFeedback = new NewEnvelopeFeedbackClass();
pNewEnvelopeFeedback.Display = axPagelayoutControl.ActiveView.ScreenDisplay;
pNewEnvelopeFeedback.Start(pPoint);
}
pNewEnvelopeFeedback.MoveTo(axPagelayoutControl.ActiveView.ScreenDisplay.DisplayTransformation.ToMapPoint(X,
Y));
}
public override void OnMouseUp(int
Button, int Shift, int X, int Y)
{
if (bInuse==false)
{
return;
}
if
(pNewEnvelopeFeedback==null)
{
pNewEnvelopeFeedback = null;
bInuse =
false;
return;
}
IEnvelope pEnvelope =
pNewEnvelopeFeedback.Stop();
if
((pEnvelope.IsEmpty)||(pEnvelope.Width==0)||(pEnvelope.Height==0))
{
pNewEnvelopeFeedback = null;
bInuse =
false;
return;
}
AddScaleBarForm
scaleBarForm = new AddScaleBarForm();
//scaleBarForm.Show();
IStyleGalleryItem
pStyleItem = Form1.pStyleGalleryItem;
if (pStyleItem == null)
{
return;
}
IMapFrame pMapframe =
axPagelayoutControl.ActiveView.GraphicsContainer.FindFrame(axPagelayoutControl.ActiveView.FocusMap)
as IMapFrame;
IMapSurroundFrame
pSurroundFrame = new MapSurroundFrameClass();
pSurroundFrame.MapFrame =
pMapframe;
pSurroundFrame.MapSurround
= (IMapSurround)pStyleItem.Item;
//在pageLayout中根据名称查要Element,找到之后删除已经存在的比例尺
IElement pelement =
axPagelayoutControl.FindElementByName("ScaleBars");
if (pelement != null)
{
axPagelayoutControl.ActiveView.GraphicsContainer.DeleteElement(pelement); //删除已经存在的指北针
}
pelement =
(IElement)pSurroundFrame;
pelement.Geometry =
(IGeometry)pEnvelope;
axPagelayoutControl.ActiveView.GraphicsContainer.AddElement(pelement, 0);
axPagelayoutControl.ActiveView.PartialRefresh(esriViewDrawPhase.esriViewGraphics,
null, null);
pNewEnvelopeFeedback =
null;
bInuse = false;
}
}
}