You are on page 1of 146

Mamhmoud Abdelrahman: GIS analyst

KSA Riyadh - 0561318400


mahmouda18@gmail.com
http://kotobgis.blogspot.com/
https://www.facebook.com/gislibrary
https://www.facebook.com/gspace.gis


Arc GIS,
Global Mapper,
Google Earth,
and

Surfer


Arc GIS, Global Mapper, Google Earth,
and Surfer

:

:
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-

Arc Map
Arc Cataloge
Arc GIS
UTM
Google Earth & Arc GIS
Global Mapper, Arc GIS, Google Earth
Global Mapper & Google Earth
Global Mapper
Arc GIS
Arc GIS
Google Earth
Global Mapper
Arc Map
Google Earth

Surfer
VBA Arc GIS

: :
http://www.khalaaf.net/vb/showthread.php?t=841

.. (Rectify )..ARC MAP

// Arc Map

2- layers properties

properties
coordinate system

1 no projection 2 3 shape file

1 2
3- ok

1 rectify2 add

1 pyramid zoom pan

2 yes!

pyramid

1-

georeferencing

!


1 rectify2 3 4 5


x, y

ok

zoom extent


1 2-


1- georeferencing rectify


1 rectify

8

2-





.rrd, .tfw,.aux

:
http://www.khalaaf.net/vb/showthread.php?t=662

FEATURE CLASS ARC CATALOG

GEODATABASE
:

GEODATA BASE EGYPT_ROAD

FEATURE DATASET
FEATURE DATASET FEATURE CLASS

* FEATURE DATASET


Edit


select
import


add

import import

feature class


geometry
spatial refernce

point , line , polygon

--

Geodatabase Topology

Geodatabase

Arc map
Dataset
.......
- Arc catalog
- Dataset

- New Topology

--


*
*Cluster tolerance

Next Rank

--

Rank



NEXT

Add Rule

--

Topology
Topology Rule
Must not overlap (polygon_ Line):

Arc Map Polygon


-
- Merge
-
Arc Map Line

Must not Have Gaps :



Arc Map


--

Boundary Must Be Covered By :


)(polygon + Line
)(Polygon
) (Line


-

-



-


Must be covered by feature class of :


) (polygon _ Line
) (polygon + polygon )(line + Line

Arc Map


-
-

--

Must be covered by :
)(polygon + polygon



Arc Map

Must not overlap with (polygon) :


)(polygon + polygon

Arc Map
-

Must cover each other :


)(polygon + polygon

Arc Map
-
-



--

Area boundary must be covered by boundary of

)(polygon + polygon



Arc Map
Arc map

Must not have dangles :


)(Line

Arc Map

: Trim
:Extend
:Snap vertices

Must not have pseudo-nodes :


)(Line

Arc Map
Merge

Must not self overlap :


)(Line

Arc Map

--

Must not intersect :


)(Line


Arc Map

-
Split
C& D

-
A & B
-

Must be single part :


)(Line


Arc Map
Explode

Endpoint must be covered by :


)(Line + point

Arc Map

--

Topology editing


Arc Map

Arc Catalog
<
Arc map

Arc Map
Arc Map
Topology
View
Toolbars

Topology

- -

Arc catalog


Start Editing
TOPOLOGY

Target
polygon


- -


Validate

Show
Search Now


Zoom to Pan to _ Trim Extend - select Feature - Show rule descriptions - Mark
as exception

Zoom to Must Not Overlap


- -

Overlap


Merge

- -


Topology Rule
Rule
Reference: WWW.Esri.com
P


/P
:
www.gisclub.net

&.....

&
& &
- -

:
http://www.gisclub.net/vb/showthread.php?t=3060
- On Line -
) ( UTM
:
http://pages.globetrotter.net/roule/utmgoogle.htm
:
:

: (
(:

: Calculate :

UTM :

: 
'  () "         ! "#$   %& &  
.* +   , 

import screen  !12 /)  0  .

 74+   '6! %  7  ! + ,5 ') 4$# 3

. + ; &+ & "* #2 9$    ') + : +   8

Geog. Mohamed Gamil Mohamed


Specialists of Map & GIS
Egyptian General Survey Authority

geog. Mohamed Gameel Mohamed

elgameel_nri@yahoo.com

  
 
          
 
: 
!
, 
 +  !   '! ! ()! *   $ %& #1
(0 45) ) &2! 
 0*1 . !/ + , ! - .!
.0! 89! 

Specialists of Map & GIS

options



tools

 -  !/ ! *! !/

Egyptian General Survey Authority

geog. Mohamed Gameel Mohamed

.<9! 

elgameel_nri@yahoo.com
get points from terrain
 kml

.   (

Specialists of Map & GIS

shape file)

&. - ;  %& #2

      3

Egyptian General Survey Authority

geog. Mohamed Gameel Mohamed

. - ,! ?  B!

elgameel_nri@yahoo.com
ok

A0

intervals

! 8@! *! 8/& =>? #4

,! - &'! ! ( -! +4?! ! & '  89! ? - !/ #5
.!! 89!    ! 
- >*D
.

xyz

UTM- WGS84

0*1   C
! ! (

D0  ! =* ; !/!

Specialists of Map & GIS

shape file )

,! %. 89! #6

Decimal Degrees (DD) -

8 0*1

Egyptian General Survey Authority

geog. Mohamed Gameel Mohamed

elgameel_nri@yahoo.com

A0 + 
! = F ! 0*1 &'    E %@ !*! !
= .

Project

A0

Projection & Transformation

A0

Data Management Tools

A0

close

' #7

Arc ToolBox

%@

! @! 5, =>& + * ! @! !G 


! & * =& !! 8/&! =>
%. D0! 9!" = !  
! F ! 0*1 * 0!0! 
! & +
."9@! 
!

Specialists of Map & GIS

Egyptian General Survey Authority

geog. Mohamed Gameel Mohamed

Specialists of Map & GIS

elgameel_nri@yahoo.com

Egyptian General Survey Authority

geog. Mohamed Gameel Mohamed

elgameel_nri@yahoo.com

.I'! 8/& & 5, & ; ! => J *!  AE #8

. 8! 0*1

Specialists of Map & GIS

x&y

;?* A, ' #9

Egyptian General Survey Authority

geog. Mohamed Gameel Mohamed

elgameel_nri@yahoo.com

  
 ( ? !/ +

X&Y&Z

 0*   !   #10

.=?. I  ! A? K/  + , !

B! A!L?
* C!
(
;?* *  * / &2!
9 # = # '! 

Specialists of Map & GIS

Egyptian General Survey Authority

 
     

 
      
  
 

!" #"  $ %        
:&& '
 )& ! *  +   ),- '  # #. '      +
:3    / 0 "  ) 1 ! * 2
.2 8  '  45  +   )   6  7

=  < + !- '  $  7; < : $   +
. 
ED Analyst /"

  )(

TIN)

Surface

!> "  

"=1 B    " '  /&&   + "  @?

. create tin from features &

create/modify tin

&

ED Analyst



B      *   #.  )  ' *  ) G.* H7 @F


7-   & )J' H7  . (Z ,- ')

height source

I ' *  & )(=1


.ok & )  

 
     

 
      

 
     

 
      

*   #. )( =1 B    TIN ) /&&    2 8  $.  @E


.0 7;   )  K 

 
     

 
      

 
     
.contour &

surface analysis

 
      


& )(  *   #.  )

ED Analyst /"

input surface

  )  + @L

' *  ) G.* H7 @M

  & )   N #. # 2-

contour interval

I ' * 

.ok & )   7-

 
     

 
      

 
     

 
      

 LQ -   8" ) ?Q 2-    G  P   3 .3 @O
. RSQ -  "

 T <


:        / *6
Specialists of Map & GIS
Egyptian General Survey Authority
Elgameel_nri@yahoo.com

 
     

 
      

:
Global Mapper , Arc GIS, and
Google Earth
/




Global Mapper , Arc GIS, and Google Earth
:



.







:

DEM

DEM

DEM

:


:

- YES

Geographic Lat, Long _WGS 84

OK

File Data Export Raster and Elevation

(GEO TEFF & KML


KMZ
. KML
RASTR & DAM & VECTOR

Data Export Raster and Elevation KML & KMZ




.

KML
- Add Network Link
- KML ok

- KML ok



: : : :


________________________________________________________________

:
: dem grid google

:
dem grid google

landuse

http://www.gisclub.net/vb/showthread.php?p=15647

Global Mapper
-

Arc GIS
-

:

____________________________________________________________________

/
www.cadmagazine.com


ArcGIS
: DEM
- :STRM
ftp://esrpu.ecs.nasa.gov/srtm/version
SRTM .Africa ) ( .
- hgt :dem
hgt dem Global Mapper
www.globalmapper.com
- dem :grid
dem grid ArcToolbox Conversion tool>>To Raster>>DEM To Raster

- Grid .ArcGIS

PDF created with pdfFactory Pro trial version www.pdffactory.com

- :
- ArcScene .

PDF created with pdfFactory Pro trial version www.pdffactory.com

Properties Base Heights Obtain heights for layer from surface


.OK

View>>Scene Properties>>General>>Calculatefrom Extent


Calculate from Extent .

PDF created with pdfFactory Pro trial version www.pdffactory.com

- :
Polygon ArcMap Field
) ( .Save Edite
ArcScene .
Properties Base Heights Obtain heights for layer from surface

PDF created with pdfFactory Pro trial version www.pdffactory.com

Estrusion OK .

- .

PDF created with pdfFactory Pro trial version www.pdffactory.com

- :ArcScene
- Animation .


Duration .

ArcScene Fly Navigate

View>Scene Properties>General
-

PDF created with pdfFactory Pro trial version www.pdffactory.com

- Animation Export To Video .

- AVI .Export

OK

.

.
.........

PDF created with pdfFactory Pro trial version www.pdffactory.com


   !   $ ... & %('  *+) ) ( %(!

 /  


.....
   
 "! (&
 *

&0  -*. 
,
.* 4*, 4
 2&3 1  &:  49 8 
 ) <
( " ,  
..

-. . '/ 
  :

(    DEM 7  Digital Elevation Model 99( = ?>  ! ('@
   !A ?C  E .*!
C.
 DEM G + .A('.$
  HI  K  L    ! ( % '  ') !  .
) PA @-$ 
?)('( !:( ' G L(
 VW$ 
.].[miss value
( ' G L %9?) ' ( .
- ! X )I  !    :u.ecs.nasa.gov/srtm/versionsrpftp://e
') $   !. A K SRTM03 ]! X Africa ] %(! %  ]?' ) X  9?'  (.

.?9. 
-$
  :
&
2 9 &, ) 9 (

C &
:(4


.$ ) ( ]
Shape File'$  ? ' ?' '$.) 9  1 (4*3
(! - ] @/L+ ' -' !  V!I L& Arc Map b ! G c) % !() A


   !   $ ... & %('  *+) ) ( %(!

 )' ( ]  

'9 % !( ) Spatial Analyst X (   Surface analysis c$ L$  Contour !() A

) ('>  Contour


' % &-) $ L ? $ f  )( ' ] DEM    L Contour interval'  '$ ?'  !() A


   !   $ ... & %('  *+) ) ( %(!

 ) ('> )-  Contour

-!L$ ' '    !() A

 ) ('>  AL$  ? '$


   !   $ ... & %('  *+) ) ( %(!

.&
2  49. G9F ):(Slope

-   Spatial Analyst  surface analysis %  Slope !.() A

) ('>  Slope

' % &-) $ L  Slope ! () A  L$  ' ] DEM output cell size  ]   =  L  ) ( P f$  L
]  ' DEM-     c.

) ('> )- Slope

!' k- ]    ! () A  VW$ '    E VW$ ' =   .


   !   $ ... & %('  *+) ) ( %(!

 ) ('>  ]  L$  

- Table of content ) $  !.()A

 ) ('>   !]  

.&
2 IJ (

C ]: [Hillshade
3:K
' . 
] '> o='9 n  )! c    nA 9 & ) L )X9
! = n? L !.%I+

!( %(*) ) + ('  %& $ ...


   !  

.()A!  Hillshade  % surface analysis    Spatial analyst X


-

Hillshade  ( '> )

@ +'

Azimuth E   L! Hillshade  -) $ L& % -

qo  ) r@ * -  nA'   (

Altitude nA
.L$ )   n=

Hillshade  -) >( ')

.A!  $ L$ '   -


   !   $ ... & %('  *+) ) ( %(!

) ('>   L$ ] qo =n


 !] &q - )  L$  ' X> = A! n>  ! A- '> ]     A - '> ]    ]
qo !  Transparent ] )A DEM ! :

 ) ('> ]   

) ('> ] DEM ] qo


   !   $ ... & %('  *+) ) ( %(!

.&
2 * K<
M  ]: [Aspect

-  spatial analyst X  surface analysis %  Aspect !.A

) ('>  Aspect

%&-) $ L  Aspect $  ' ] (.W DEM Cell size ')  !.A

) ('> )-  Aspect

- %  L$ '  ! A  @+' cE (


 ! A.


   !   $ ... & %('  *+) ) ( %(!

) ('> ] + 'I][Aspect

-& L A! $  +  'I.

) ('>  +  'I ]  

.
C &
"0 KN * K(

C :
    ]$7 ) @- ?
 . ) @I u ( $   ]] ' ) criteria W . Model
- % -$ 
Classify spatial analyst X %  Classify !.A


   !   $ ... & %('  *+) ) ( %(!

) ('>  Classify

-' % &-) L '  GH ) ]   '  !.A

) ('> )-  Classify

!( %(*) ) + ('  %& $ ...


   !  

.A!  Equal value 9W % -)$


Classify    -

]$7   ) I 9( '> ?)

C VW$ 
? L$  ) ] H! G -)$ $ ('OK X*=  !(.L(  (  b . L&  k-! No Value  q* X$ >7'!   C
: Vector !<& K*  
C
 K*
2& 4 .
.('$ ?' f$ 9 )qE ?? 9 c+ ] DEM ] .$(  I  '$ :?9 ]
DEM .$ -:
 ' % ?  '  ?     E 9 $  :%@ ( -L ( W q $ ...?  @ - % G $!
.inverse Distance Weighted=IDW (
.Kriging (
.Natural Neighbor (
.A!  Interpolation  Spatial Analyst Tool  ArcToolbox
L -


   !   $ ... & %('  *+) ) ( %(!

 ) ('> I ?  )   I.$ DEM

 (:Natural Neighbor 4Q
) L'  A.

 (:IDW 4Q
-) L'    !.A

!( %(*) ) + ('  %& $ ...


   !  

:?
] DEM .$ -:
.DEM ] .$ ) L ' '    $ ?' $ ' ) PA E $ Spatial Analyst  ArcToolbox
I Topo To Raster GI ( 9W $ .A!  Interpolation  Tool

Topo To Raster   I >( ') 

   -) $ L& -

Topo To Raster  -) >( ')


   !   $ ... & %('  *+) ) ( %(!

........
/


..
 %E' I
//9.....

: Google Earth
:
GPS
Google Earth !!!
. Google Earth . - Google Earth.

:
kml
) (

:

Datum : WGS1984
:

:
.
GPS
:
GARMIN etrex
WGS 84


Ain el Abd 1970
:

.
:
- :
Geographic Coordinate System: GCS_WGS_1984
Datum: D_WGS_1984
Prime Meridian: Greenwich
Angular Unit: Degree

- :
Geographic Coordinate System: GCS_WGS_1972
Datum: D_WGS_1972
Prime Meridian: Greenwich
Angular Unit: Degree

.
:


.
Garmin
GPSMAP 276C
.
/ :
... ..

gps
gps datum ...
... ...

..
,
.

: Global Mapper v 8.0


Start

Global Mapper v 8.0


Global Mapper v 8.0

ESRI

Programs

.(177)

(Global Mapper)
:

(177)

( Global Mapper )

-1

( Download )

. ( Credit Cards )
-2

( Overlay )

.
( Vectorization )

-3

( GPS )

( GPS )

-4

( Projection )

-5

.
.
Export )

-6

( Global Mapper )
( Extensions )

( Converter )

-7

( DEMs )

.
.

-8

-9
. ( Profiles )

-10

( DEMs )

( Slope )

. ( DEMs )

-11
-12

-13

( Extensions )
DLG-O, DRG, DOQ, DEM, DGN, DTED, DWG, DXF, SDTS DLG, SDTS DEM,
ECW, MrSID, ESRI Shapefiles, E00, MapInfo MIF/MID, MapInfo TAB/MAP,
GTOPO30, TerrainBase, SRTM, ETOPO2, ENVI DEM, JPG, PNG, BIL, BSQ, BIP,
XYZ, Tiger/Line, Arc Vector Coverages, VPF (VMAP, DNC), S-57, ADRG, ASRP,
CADRG, CIB, JPEG2000, GIF, NOS/GEO, Garmin PCX5, GPX (GPS eXchange
Format), OziExplorer WPT/PLT, ASTER DEM (HDF and GeoTIFF formats), ASTER
L1A/L1B imagery, Zmap Plus Grids, LIDAR LAS, Marplot MIE, DHM (Swiss DEM),
MODIS imagery, NTF Grids, MapTech Topo/Aerial Maps, Idrisi RST, JDEM, SEGP1,
CompeGPS, KML, KMZ, Polish MP (cGPSMapper), NITF, Geodas Grid (GRD98),
Intergraph COT, CDF, WasP .map files, SMT/KINGDOM files

. ( Global Mapper )

:
:

(178)

(178)
Menu

-1

Open your own Data files

.Command: File Open Data file


Menu Command: File

-2

Find Data Online

. Open Data Online


.

-3
.

-4

.
(

-5
)
.(

.(180)

. HGT

DEM

. (179)

(179)

DEM

(180)

:
:

-1

Global Mapper

-2

File,View,Tools,Search,GPS,Help

-2

,Save
,Save

Configuration

DEM

(Surface map)
(X,Y,Z)

.(181)
. 3D

(3D)
.(182)

(181)
.(182)

DEM

DEM

(182)

.(183)
.(184)

(183)

(184)
. (185)

(185)
.(186)
.

(186)
(187)
. (188)

(187)

(188)
(Raster)
()

(Vectorize).(Vector)
(Vector)

.(189)

(189)
.

(190)

New Area

.(191)

New Point

New Line

(190)

(191)

(USGS,DEM,GRID)

Hill Shading

.(192)

(192)
(Base Map)

-1
Rectify
.

(JPG,TIFF.BMP,SHP,DXF)
.

(194)

.(TIFF)

(193)

(193)
(195)
(196)
.

(194)
Image Rectify (284)
.OK

Select Projection
.

(195)
Export )

( Global Mapper )
( Extensions )

.(196)

( Converter )

(196)
: ( DEMs)
(197)
. (198)

(197)

OK

(198)

DEM

(199)

Identify
.(200)

ID

(200)

,





,


) (geostatistical analyst

Kriging

Kriging

geostatistical analyst

Kriging

:
http://www.gisclub.net/vb/showthread.php?t=3060
- On Line -
) ( UTM
:
http://pages.globetrotter.net/roule/utmgoogle.htm
:
:

: (
(:

: Calculate :

UTM :

Document converted by PDFMoto freeware version

Surfer .7

.
X,Y,Z_1 Z
_2 WORKSHEET

_3 SAVE AS FORMAT

DAT.
_4 WORKSHEET PIOT
GRID DATE

Document converted by PDFMoto freeware version

_5 }FORMAT {DATE
_6 .

DATE

GENERAL
SPASING GRIDING
MITHOD .
2

Document converted by PDFMoto freeware version

_7 OK
}FORMAT.{GRID
_8 MAP_CONTORMAP_NEWCONT

_9 .GRID OK.
,
.

OK .

, .

Document converted by PDFMoto freeware version

Document converted by PDFMoto freeware version


:
.:
Grid/convert/_1
opin grig . grid
, ok save grid
format }ascllxyz{*.dat
.

2
3
map/post map/newpost map_2
file.dat
file .opin
general
. x,y,z
labels
.
ok .

Document converted by PDFMoto freeware version

:
_1 work sheet format.dat

_2 grig/dat
spasing max,man

.
format.ascallxyz.dat

save ok .
map/post map/newpost map_3
file.dat
file .opin
general
. x,y,z
labels
.
ok .

3
7

2
6

1
5

Document converted by PDFMoto freeware version


:
.

_1 blank
.
_2 .volume
:
_1 blank

.
worksheet
:
_
c
1.6
1.8
1.6

b
0

a
3

2.3
5.2
2.3

4.2
4.6
4.2


a,b,c
a , b )(

) ( ) ( 1
.

Document converted by PDFMoto freeware version

.
_ )format.(*.bln
_ grid blank
opem grid
ok
opem file
) (
)format.(grid
blank .
_2 : volume
_ grid volume
open grid
grid volume lowor
surface
z .

Document converted by PDFMoto freeware version


finsh , ground
_1 : residuals
residuals
Z grond , Z finsh
Z ground Z finsh x,y
Z finsh .
Z grawnd .
:
Z ground x,yZ fnish
:
*Zres=Z fnish-Z ground
*Z ground=Z fnish-Z res

_1 .ground.grid
_2 . finsh . dat
_3 grid residual open grid
file open grid open dat finsh.dat

residuals .

Document converted by PDFMoto freeware version

worksheet finsh
residuals
Zground
Zground Zfinsh
Zg,Zf X,Y.
dat.
grid dat Zground.grid

finsh
blank Zfinsh/bln/grid
_2 :volume
_1 grid/voluome
Zres ground.grid
_2 lower surface
finsh blank.grid
.

www.gisclum.net
: Visual Basic
MapObjects /
: /
________________________________________________________________________

:
Visual Basic
MapObjects .
/

:



.
.
:
: MapObjects
ESRI
ActiveX

.

ArcGIS Geomedia..

: ActiveX Control
ActiveX





.

.



) (VB ) (VBA )(Visual Stoudio.NET
) (++Visual C ) (Delphi (Borland C++
) Builder ) (Visual FoxPro ) (Power Builder(Java).
:
-


.

.
.

.


...

:
Layers Thematic Maps Label Text Pan/Zoom ShapeFiles ) (
SQL Expression -

:

: ( )Standard EXE

:
-
Components ProjectComponents

- ) Esri MapObjects 2.0/2.4 (Last Version Ok

- )(
/ .

- .shp )
( Properties

- Add .

:




F5




-

:
:
-
-
- ) (
:
)
( :
ESRI has released a 90-day evaluation version of MapObjects available as a
free download at
http://www.gisclub.net/vb/redirector.php?url=http://www.esri.com/software/ma
pobjects/download.html
This may be useful for testing and experimenting with MapObjects without
having to make the purchase

:
The item you requested cannot be found. The item may have been moved or
deleted.
!!
) (
.
____________________________________________________________________

:

/

VBP ArcGIS
GIS VB

ArcGIS


Mapcontrol Microsoft Common
Dialog Control ]Ctrl+T


Mapcontrol
Microsoft Common Dialog Control CommandButton


:
commandButton1 = cmdopenfile
commandButton2 = cmdExtent
commandButton3 = cmdZoomin
commandButton4 = cmdPan
commandButton5 = cmdMouse
commandButton6 = cmdPrinter
Name



cmdopenfile
:
CommonDialog1.DialogTitle = "Browse Map Document"
CommonDialog1.Filter = "Map Documents (*.mxd)|*.mxd"
CommonDialog1.ShowOpen
MapControl1.LoadMxFile CommonDialog1.FileName

cmdExtent
:
MapControl1.Extent = MapControl1.FullExtent

cmdZoomin
:
MapControl1.MousePointer = esriPointerZoomIn

cmdPan
:
MapControl1.MousePointer = esriPointerPan
MapControl1.Pan

cmdMouse
:
MapControl1.MousePointer = esriPointerDefault

cmdPrinter
:
CommonDialog2.ShowPrinter
MapControl1.MousePointer = esriPointerHourglass

Mapcontrol1
:
If button = 1 Then
MapControl1.Extent = MapControl1.TrackRectangle
ElseIf button = 2 Then
MapControl1.Pan
End If



___________________________________________________________________




.


:

1- Mapcontrol
2- Microsoft Common Dialog Control
3 Toolbar
4- ImageList
5- Label

) (


Right Click ImageList Properties

Insert Picture )
( (

Key . Index . Image
. 1 . Open
. LoadData .
. Pointer .
. Zoom .
. FullExtent .
. Identify .
. Trackevents .
OK

Right Click Toolbar Properties
) (

Button



) ( Index Open
) ( 4 , 5 , 6 ( 7 ) Insert
Button LoadData ) ( 4 , 5 , 6



Toolbar
:

Private
Sub
Toolbar1_ButtonClick(ByVal
button
MSComctlLib.button)
'&Yacute;&aring;&Iuml;
&Ccedil;&aacute;&atilde;&Oslash;&aacute;&THORN;
With MapControl1

As

Select Case button.Key


Case "Open"
CommonDialog1.DialogTitle = "Browse Map Document"
CommonDialog1.Filter = "Map Documents (*.mxd)|*.mxd"
CommonDialog1.ShowOpen
MapControl1.LoadMxFile CommonDialog1.FileName
Case "LoadData"
'Get IGxDialog interface
Dim pGxDialog As IGxDialog
Set pGxDialog = New GxDialog
'Get IGxObjectFilter interface
Dim pGxObjectFilter As IGxObjectFilter
Set pGxObjectFilter = New GxFilterFeatureClasses
'Set GxDialog properties
Set pGxDialog.ObjectFilter = pGxObjectFilter
pGxDialog.AllowMultiSelect = True
pGxDialog.Title = "Add Feature Data"
'Get IEnumGxObject
Dim pEnumGxObject As IEnumGxObject
'Display the GxDialog and set the EnumGxObject. Exit if
user cancel the dialog
If
pGxDialog.DoModalOpen(MapControl1.hWnd,
pEnumGxObject) = False Then Exit Sub
Dim pFeatureLayer As IFeatureLayer
Dim pFeatureClass As IFeatureClass
Dim pGxDataset As IGxDataset
'Get IGxObject interface
Dim pGxObject As IGxObject
pEnumGxObject.Reset
Set pGxObject = pEnumGxObject.Next
'Loop through the GxObjects
Do While Not pGxObject Is Nothing
'Query interface for IGxDataset interface
Set pGxDataset = pGxObject
'Get IFeatureClass interface
Set pFeatureClass = pGxDataset.Dataset

'Get IFeatureLayer interface


Set pFeatureLayer = New FeatureLayer
'Set layer properties
Set pFeatureLayer.FeatureClass = pFeatureClass
pFeatureLayer.Name = pFeatureClass.AliasName
'Add the layer to the MapControl
MapControl1.AddLayer pFeatureLayer, 0
'Add the layer name to the control
Set pGxObject = pEnumGxObject.Next
Loop
Case "Zoom"
.MousePointer = esriPointerZoomIn
Case "Pointer"
MapControl1.MousePointer = esriPointerDefault
Case "Pan"
MapControl1.MousePointer = esriPointerPan
MapControl1.Pan
Case "Fullextent"
MapControl1.Extent = MapControl1.FullExtent
Case "Trackevents"
MapControl1.MousePointer = esriPointerHotLink
Case "query"
.MousePointer = esriPointerCrosshair
Case "Identify"
MapControl1.MousePointer = esriPointerDefault
Dim pIdentifyDialog As IIdentifyDialog
Dim
pIdentifyDialogProps
As
IIdentifyDialogProps
Dim pEnumLayer As IEnumLayer
Dim pLayer As ILayer
Dim pActiveView As IActiveView
' Set pMxDoc = Application.Document
Set
pActiveView
=
Me.MapControl1.ActiveView.FocusMap
'Create

new

IdentifyDialog

and

associate it
'with the focus map and the map's display
Set pIdentifyDialog = New IdentifyDialog
Set
pIdentifyDialogProps
=
pIdentifyDialog 'QI

Set
pIdentifyDialog.Map
Me.MapControl1.ActiveView.FocusMap
Set
pIdentifyDialog.display
pActiveView.ScreenDisplay

=
=

'Clear the dialog on each mouse click


pIdentifyDialog.ClearLayers
'Perform an identify on all of the layers
the dialog
'says are searchable
Set
pEnumLayer
=
pIdentifyDialogProps.Layers
pEnumLayer.Reset
Set pLayer = pEnumLayer.Next
Do While Not pLayer Is Nothing
pIdentifyDialog.AddLayerIdentifyPoint
pLayer, x, y
Set pLayer = pEnumLayer.Next
Loop
pIdentifyDialog.Show
End Select
End With
End Sub
OnMouseDown Mapcontrol
:
If button = vbLeftButton Then
MapControl1.Extent = MapControl1.TrackRectangle
End If
With Toolbar1.Buttons
If .Item("Zoom").Value = tbrPressed Then
MapControl1.Extent = MapControl1.TrackRectangle
ElseIf .Item("Pan").Value = tbrPressed Then
MapControl1.Pan
ElseIf .Item("Trackevents").Value = tbrPressed Then
AddGeoEvent mapX, mapY
ElseIf .Item("query").Value = tbrPressed Then
SearchShape
End If
End With

Mapcontrol OnMouseMove
:
Label1.Caption
=
""1:
&
MapControl1.MapScale
;'&Yacute;&aring;&Iuml
;&Ccedil;&aacute;&atilde;&Oslash;&aacute;&THORN

References

) (

You might also like