twinsvicki
路人甲
路人甲
  • 注册日期2006-03-27
  • 发帖数28
  • QQ
  • 铜币256枚
  • 威望0点
  • 贡献值0点
  • 银元0个
阅读:1779回复:3

arcgis server WebControls.Map控件取经纬度的问题?

楼主#
更多 发布于:2007-03-06 10:42
<P>ESRI.ArcGIS.Server.WebControls.Map Map1</P>
<P>我想取到Map1中加载的地图服务的中心点的经纬度,要怎么实现呢?如果做了放大缩小 一样能取到中心点的经纬度</P>
喜欢0 评分0
gis
gis
管理员
管理员
  • 注册日期2003-07-16
  • 发帖数15947
  • QQ554730525
  • 铜币25339枚
  • 威望15364点
  • 贡献值0点
  • 银元0个
  • GIS帝国居民
  • 帝国沙发管家
  • GIS帝国明星
  • GIS帝国铁杆
1楼#
发布于:2007-03-06 11:32
获取当前extent的坐标范围就很容易获取到中点了
举报 回复(0) 喜欢(0)     评分
twinsvicki
路人甲
路人甲
  • 注册日期2006-03-27
  • 发帖数28
  • QQ
  • 铜币256枚
  • 威望0点
  • 贡献值0点
  • 银元0个
2楼#
发布于:2007-03-06 12:09
那中心点坐标怎么转换成经纬度呢?
举报 回复(0) 喜欢(0)     评分
gis
gis
管理员
管理员
  • 注册日期2003-07-16
  • 发帖数15947
  • QQ554730525
  • 铜币25339枚
  • 威望15364点
  • 贡献值0点
  • 银元0个
  • GIS帝国居民
  • 帝国沙发管家
  • GIS帝国明星
  • GIS帝国铁杆
3楼#
发布于:2007-03-06 13:25
<P>在程序可以使用ToMapPoint方法来转换</P>
<P>下文是在工具里,DD到DMS坐标的一个转换方法;</P>
<P>I had to find a way to convert a digitized point coverage into DMS. I = <BR>searched the ArcInfo-L archive site and found the sum from your work in = <BR>July. Since I do not subscribe to the list and I cannot reach all of the = <BR>people who helped you I thought maybe you could post this for me. <BR><BR>I tried several of the methods and this is what I found: <BR><BR>Christian Taynton from SAIC had an EXCEL formula that DOES NOT WORK. It = <BR>drops the remainders from the calculations therefore his DMS is off by = <BR>more than 7 minutes which is significant. <BR><BR>The Avenue script from YEW has errors and will not run as written. Still = <BR>trying to figure that on out.. <BR><BR>Dr. Robert Hyatt's idea of projecting a file is good, if you have the = <BR>data in a file. Mine was in a point coverage. <BR><BR>Keith Rhea's idea to use the software from = <BR>www.directionsmag.com/latlong.asp is also very good but it looks like it = <BR>only processes one set of data at a time. I needed to process 190 well = <BR>sites. <BR><BR>The shareware called CORPSCON is good but when I tried to download it it = <BR>was going to take over an hour just for the first part of the software. = <BR>Maybe another time when I have the time. <BR><BR>SOLUTION <BR><BR>I ended up writing an EXCEL formula to solve the problem. There are two = <BR>ways to do it depending on how exact you need the data. See the = <BR>following: <BR><BR>Converting DD to DMS in EXCEL <BR><BR>BACKGROUND <BR><BR>I had a well site map from 1937 that only provided the associated well = <BR>numbers and a scale of 1"=3D5miles. I needed to produce an ARC point = <BR>coverage and register the sites to UTM, zone 14, units meters, NAD27.=20 <BR><BR>STEPS - ARC <BR><BR>Copy master tic coverage. <BR><BR>Add well points to TIC cover using digitizer. <BR><BR>Edited cover to remove tic points and made sure well numbers =3D point = <BR>ID's. <BR><BR>ADDLATLONG did not work in ARC NT 7.2.1 and since I need more than just = <BR>X, Y coordinates I needed the data to be in DD so I: <BR><BR>Re-projected from UTM to geographic, units DD, NAD27. <BR><BR>ADDXY <cover> point. <BR><BR>STEPS - ARCVIEW 3.1 <BR><BR>Created new theme and added the new DD well point coverage. <BR><BR>Opened attribute table. <BR><BR>Exported attribute table as <cover>.dbf <BR><BR>STEPS - EXCEL <BR><BR>Opened <cover>.dbf and added labels to column's: <BR><BR>E1: X_DEG, F1: X_MIN, G1: X_SEC <BR><BR>A B C D E F G <BR><BR>WELLSXY# <BR><BR>WELLSXY_ID <BR><BR>X_COORD <BR><BR>Y_COORD <BR><BR>X_DEG <BR><BR>X_MIN <BR><BR>X_SEC <BR><BR><BR>1 <BR><BR>1 <BR><BR>100.145 <BR><BR>28.190 <BR><BR>100.000 <BR><BR>8.000 <BR><BR>41 <BR><BR><BR>1.. Highlight column C (X_Coord) <BR><BR>Open window: Edit <BR><BR>Select: Replace <BR><BR>Find what: - (type in a negative sign) <BR><BR>Replace with: + <BR><BR>Search: by columns <BR><BR>Replace all <BR><BR>2. Select E2 cell (X_DEG) <BR><BR>Type in: =3D (type in an equal sign) <BR><BR>Open window: Insert <BR><BR>Select: Function <BR><BR>Math ; Trig - TRUNC; click on OK <BR><BR>Number: C2; click on OK <BR><BR>it will look like: =3DTRUNC(C2) <BR><BR>1.. Select F2 cell (X_MIN) <BR><BR>Type in: =3DTRUNC((B2-D2)*60) <return> <BR><BR>2.. Select G2 cell (X_SEC) <BR><BR>Type in: =3D((((B2-D2)*60)-E2)*60) <return> <BR><BR>++++ PROBLEM ++++: This X_SEC formula drops all digits past the decimal = <BR>place w/o rounding. E.G.: 41.9997 comes out as 41, NOT 42!! <BR><BR>If this is okay with you then follow the same steps for Y_COORD only = <BR>change the =3DTRUNC formula's to reflect the different column-cell #'s. <BR><BR><BR><BR>If this is a problem you can follow the loonnnggg method below: <BR><BR>See steps 1 and 2 above then type in: <BR><BR>F2: =3DC2-E2 <BR><BR>G2: =3DF2*60 <BR><BR>(X_MIN) H2: =3DTRUNC(G2) <BR><BR>I2: =3DG2-H2 <BR><BR>J2: =3DI2*60 <BR><BR>(X_SEC) K2: =3DTRUNC(I2,2) <BR><BR>After you have run the steps for the first set of coordinates highlight = <BR>them and=20 <BR><BR>copy, then highlight the remaining blank cells for the rest of the = <BR>coordinates <BR><BR>and paste. This will automatically fill in the DMS's for all of the = <BR>cells. <BR><BR>GOOD LUCK! <BR></P>
举报 回复(0) 喜欢(0)     评分
游客

返回顶部