05-29-2018 04:10 AM
Is there any command that allows to open Google Earth as an external application?
Customer needs the capability to have Google Earth opened in a coordinate point previously selected in GeoMedia.
Customer would also need that when moving to another coordinates in GeoMedia , Google Earth window moves to same coordinates
Customer has Google Earth Pro
Does anybody know if it will be difficult to develop ? Any ideas about how to do it ?
Thanks in advance and best regards
05-29-2018 09:25 PM
This is a lot easier to do if you want an Image as background to use Goggle Maps
Create a Hyperlink attribute, which you can build with a Functional Attribute to get latitude,longitude location to substitute ifn following syntax example.
With Google Earth Pro there only appears to be executable googleearth.exe followed by a kml file
ie "C:\Program Files\Google\Google Earth Pro\client\googleearth.exe" C:\GeoWorkspaces\MapWindow3.kml
The problem is you would have to build a kml for all locations, plus this syntax will not run as a hyperlink unless you put it in a bat file. Else it interprets the string as two files and fails to locate in Google Earth.
In GeoMedia Professional , I built a Spatial Model to pass a query of a point location i place and have it build and execute a batch command opening Google Earth Pro at that location. Did this on Windows 10 with GM 16.5 and it works
If you have ERDAS Imagine, you may be able to do something with a link to geomedia and use its google earth api functionality.
05-30-2018 03:58 PM
Here's what i did for Google Earth Pro (See Attachments)
Google Earth location from GeoMedia
Create a point feature. ie Google_Point with ID(autonumber)
Place a single point anywhere in GWS
Create a query using Analyse Geometry of the Geographic Coordinates(deg decimal) of the Google point
This will compute Latitude and Longitude when location of point changes
Create a Spatial Model with GeoMedia Professional or Imagine Professional which will pass that point location. The spatial Model will extract the Latitude and Longitude and pass it to a .bat command file which creates a kml file (the complexity of the kml is up to you). The .bat also Starts Google Earth Pro with the kml and drives to that location.
The google_kml.bat is configured to pass two parameters. The output kml is called C:\GeoWorkspaces\MapWindow3.kml and is overwritten each time the Spatial Model (google.gmdx) is rerun.
Run the Spatial Model, Analysis > Spatial Models > Run
Select the google.gmdx
Select the Google_Point_Geometry query
Ok, will then run the Model , open Google Earth and move to the point location.
If you leave Google Earth Open , the in GeoMedia open the Explorer view. Refreash and expand to see the Google Query. By Right clicking on the query you can Rerun the query without entering the parameters above. Simply select your point in GeoMedia and do a Vector > Move and Rerun and Google Earth will move to new location.
In my kml is an ‘X’ as identifier next to point location.