السبت، ٢٨ فبراير ٢٠٠٩
Krooki to Google Maps - UTM to Degrees
الاثنين، ٣١ مارس ٢٠٠٨
ArcMap and Google Earth Integration
The movie below shows how to build a tool in ArcMap that will sycronize the current ArcMap extent with Google Earth extent this code is working with wg84 projections. To use this code you should have GE installed on your PC
copy the code below to a mousedown event on UIToolControl on ArcMap VBA
Dim pScreenDisplay As IScreenDisplay
Dim pActiveView As IActiveView
Dim pMxDoc As IMxDocument
Set pMxDoc = Application.Document
Set pActiveView = pMxDoc.FocusMap
Set pScreenDisplay = pActiveView.ScreenDisplay
pScreenDisplay.TrackPan
Dim pMap As IMap
Dim pMapsActiveView As IActiveView
Dim pEnvelope As IEnvelope
Dim pCenterPt As IPoint
Dim pEnvSpatRef As ISpatialReference
Dim pSRI As ISpatialReferenceInfo
Dim pPCS As IProjectedCoordinateSystem
Dim dMetersPerUnit As Double
Dim viewAlt As Double
'Google Earth Parameters
Dim GE As IApplicationGE
Set GE = New ApplicationGE
'Set the ArcMap values
Set pMxDoc = Application.Document
Set pMap = pMxDoc.FocusMap
Set pMapsActiveView = pMap
Set pEnvelope = pMapsActiveView.Extent
Set pCenterPt = New Point
Set pEnvSpatRef = pEnvelope.SpatialReference
'Get current meters per map unit
If pEnvSpatRef Is Nothing Then
MsgBox "Please set a projection for your Map", vbOKOnly, "No Projection Set"
Exit Sub
ElseIf TypeOf pEnvSpatRef Is IUnknownCoordinateSystem Then
MsgBox "Please set a projection for your Map", vbOKOnly, "Projection Unknown"
Exit Sub
ElseIf TypeOf pEnvSpatRef Is IProjectedCoordinateSystem Then
Set pPCS = pEnvSpatRef
dMetersPerUnit = pPCS.CoordinateUnit.MetersPerUnit
Else
dMetersPerUnit = 1
End If
'Set view altitude the same as the width (seems to zoom enough)
'Get width, then convert it to meters using the metersperunit value
viewAlt = Round((pEnvelope.LowerRight.x - pEnvelope.LowerLeft.x) * dMetersPerUnit)
'Create a WGS84 spatial reference for LatLong in Google
Dim pSpRef2 As ISpatialReference
Dim pSpRFc As SpatialReferenceEnvironment
Dim pGCS As IGeographicCoordinateSystem
Set pSpRFc = New SpatialReferenceEnvironment
Set pGCS = pSpRFc.CreateGeographicCoordinateSystem(esriSRGeoCS_WGS1984)
Set pSpRef2 = pGCS
pSpRef2.SetFalseOriginAndUnits -180, -90, 1000000
'Project the envelope to WGS84
pEnvelope.Project pSpRef2
'Get the Center Point: ((XMin + XMax) / 2, (YMin + YMax) / 2)
pCenterPt.PutCoords (pEnvelope.LowerLeft.x + pEnvelope.LowerRight.x) / 2, _
(pEnvelope.LowerLeft.y + pEnvelope.UpperRight.y) / 2
'Send the parameters to Google
'Note: The altitude mode - RelativeToGroundAltitudeGE = 1, AbsoluteAltitudeGE = 2
'If set the speed to 5 or more it snaps to the site (no transition), a lower number
'(i.e. 3.5) helps show movement has taken place
While (GE.IsInitialized = 0)
'In theory this waits for Google Earth to load if it isn't open already
Wend
GE.SetCameraParams pCenterPt.y, pCenterPt.x, 0, 1, viewAlt, 0, 0.01, 3.5
You can find this tool in http://arcscripts.esri.com/ i have added some minor coding to allow this tool to work with mousedown event.
All the best
الكاتب GIS Developer في الساعة ١١:٤٦:٠٠ ص 6 تعليقات
الثلاثاء، ٢٠ نوفمبر ٢٠٠٧
Sultan Qaboos Grand Mosque 3D model in Google Earth
I have managed to create a model of Sultan Qaboos Grand Mosque in Muscat. The tools I used are Google Sketchup, photoshop and google earth.
The above image shows a snap shot from google sketchup. I had some diffculties on creating the dome, google sketchup free version does not have a tool to create ready made Balls model, but I managed to bring somebody else Manarah and with some small edits I created the above Model.
This model then imported to google earth, (picture below)
I hope you like it, you can download this model by clicking the link below
http://bbs.keyhole.com/ubb/download.php?Number=1056018
you should have google earth installed with you.
الكاتب GIS Developer في الساعة ١٠:٥٢:٠٠ ص 3 تعليقات
الأحد، ٥ أغسطس ٢٠٠٧
أقرب ما يمكن وفي وسط الصحراء
السبت، ٤ أغسطس ٢٠٠٧
تحديد القبلة على الجوجل ماب
الكاتب GIS Developer في الساعة ١٢:٣٤:٠٠ م 0 تعليقات
ماذا سيحدث لمسقط أذا ارتفع منسوب البحر الى اكثر من 8 امتار
الكاتب GIS Developer في الساعة ١٠:٥٨:٠٠ ص 0 تعليقات
الأحد، ٢٩ يوليو ٢٠٠٧
تحويل قطعة أرض من الكروكي الى برنامج جوجل ايرث
في البداية يجب تحويل الاحداثيات الموجودة على الكروكي من اسقاط
كمثال نأخذ الصورة التالية من كروكي
من الصورة اعلاه, النقطة 2488273.07, 681493.18
2488273.07 + 249.385 , 681493.18 + 289.588 تصبح
يعني
2488522.455, 681782.768
UTM Flayer اذهب الى الرابط التالي ونزل برنامج
http://www.zonums.com/utmflyer.html
اختر
Zone 40
لان محافظة مسقط تقع على
Zone 40
ضع الاحداثيات
Easting, Northing
الناتجة من الخطوة الاولى في الخانتين
Easting, Northing
انسخ الارقام التي تظهر على خانة
Lat/Lon
وألصقاها في خانة البحث في جوجل ايرث
وغير قيمة
Lon
من سالب الى موجب هذه الخطوة اساسية
اعد نفس الخطوة للنقاط الاخرى في الكروكي قد تحتاج الى اربع نقاط لكي تظهر معالم القطعة