Java Visual Class facilitates a programmer specially while working with Jpanel and Java beans. Now the visualization of the map is more customized to me. I can add or delete toolbars or maps anytime.
Java visual editor has a special library 'ArcGIS Component'. 'MapBean', 'TOCBean', 'Toolbarbean' are some of these components. Now I can drag and drop these beans to the visual editor. Also can change some of their properties.
But in the case of adding event handler I found that ArcObjects are unable to deal directly with Java trivial libraries. They can access only the methods from Esri ArcGIS Engine library. Thats why I cannot use java event handlers (addActionListeners or addActionPerformed) with ArcObjects.
Fortunately ArcGIS Engine library has a some event handler named as IMapControlEvents. Now I am using this event handler for mouse click and arrowkeys. My MapControl returns (mapX, mapY) and (screenX, ScreenY) of the point mouse clicked. It also can be zoom out or zoom in with mouse scroll and Keyboard up/down arrowkeys.
Thursday, January 28, 2010
Monday, January 25, 2010
First program with ArcGIS Engine developer kit
The basic three steps of programming with ArcGIS Engine developer kit for JAVA
1: Initialize the Java Component Object Model (COM).
2: Initialize a valid License. (Need to locate the "Esri license product code" file)
3: Create visual components for the mapviewer.
It loads a .mxd file in 'Mapbean' (created using java bean) which is a class from ArcObjects library. And the 'loadMxFile' method of this class loads the entire data and represents a graphical view or map in a JFrame.
There are sample data folder given inside /java/samples/data/mxds/ directory. I tested world.mxd. It works fine showing the whole world map.
1: Initialize the Java Component Object Model (COM).
2: Initialize a valid License. (Need to locate the "Esri license product code" file)
3: Create visual components for the mapviewer.
It loads a .mxd file in 'Mapbean' (created using java bean) which is a class from ArcObjects library. And the 'loadMxFile' method of this class loads the entire data and represents a graphical view or map in a JFrame.
There are sample data folder given inside /java/samples/data/mxds/ directory. I tested world.mxd. It works fine showing the whole world map.
Thursday, January 21, 2010
Installing ArcGIS Engine plug-in for Eclipse
The SDK version of my computer is 1.6 and Eclipse version is 'Galileo'.
SDK is ok for ArcGIS but they don't have any instruction for my 'Galileo' Eclipse...
Here is the link for ArcGIS Eclipse plug-in installation:
http://resources.esri.com/help/9.3/ArcGISServer/adf/java/help/doc/6c7a7b84-5168-4843-9536-34e5ef2ec424.htm#About
Here is another one:
http://edndoc.esri.com/arcobjects/9.2/Java/java/engine/ide_integration/eclipse/EclipseInstall.html
For my Eclipse, I needed to find out an the extra plug-in Visual-Editor that helped me installing ArcGIS plug-in. I think ArcGIS has a dependency on Eclipse Visual-Editor. Here is a link for Visual editor plug-in:
http://www.rcp-vision.com/index.php?option=com_content&view=article&id=81%3Aeclipse-visual-editor-di-nuovo-operativo&catid=40%3Atutorialeclipse&Itemid=28&lang=en
At last I could run successfully a few sample ArcGIS Engine programs...
SDK is ok for ArcGIS but they don't have any instruction for my 'Galileo' Eclipse...
Here is the link for ArcGIS Eclipse plug-in installation:
http://resources.esri.com/help/9.3/ArcGISServer/adf/java/help/doc/6c7a7b84-5168-4843-9536-34e5ef2ec424.htm#About
Here is another one:
http://edndoc.esri.com/arcobjects/9.2/Java/java/engine/ide_integration/eclipse/EclipseInstall.html
For my Eclipse, I needed to find out an the extra plug-in Visual-Editor that helped me installing ArcGIS plug-in. I think ArcGIS has a dependency on Eclipse Visual-Editor. Here is a link for Visual editor plug-in:
http://www.rcp-vision.com/index.php?option=com_content&view=article&id=81%3Aeclipse-visual-editor-di-nuovo-operativo&catid=40%3Atutorialeclipse&Itemid=28&lang=en
At last I could run successfully a few sample ArcGIS Engine programs...
Wednesday, January 20, 2010
Installing ArcGIS Engine developer kit
I got the DVD of ArcGIS Engine software and ESRI authorization file from Jake. The installation procedure was not so easy as I thought :(
1. Install the ArcGIS Engine Runtime for Windows
2. Locate the authorization file as asked.
3. Install the ArcGIS Engine SDK for JAVA
4. Install the ArcGIS Help Sytem for JAVA
5. Follow the ArcGIS pre 9.3 GDB direct connect Installation guide for post installation configuration
1. Install the ArcGIS Engine Runtime for Windows
2. Locate the authorization file as asked.
3. Install the ArcGIS Engine SDK for JAVA
4. Install the ArcGIS Help Sytem for JAVA
5. Follow the ArcGIS pre 9.3 GDB direct connect Installation guide for post installation configuration
Searching for onMouseOver event
My searching of Resources.esri.com says that ArcEngine handles with some of the mouse events. Here is the definition of these methods according to ArcEngine developer tool kit.
http://edndoc.esri.com/arcobjects/9.2/Java/api/arcobjects/com/esri/arcgis/schematic/INgProjectTool.html#mouseMove%28com.esri.arcgis.schematic.INgView,%20int,%20int,%20int,%20int,%20int,%20int,%20double,%20double%29
The following link describes some parameters of a cell (I need to know what does a 'cell' mean). It also describes how to clip parameters with a cell.
http://resources.esri.com/help/9.3/ArcGISEngine/java/Gp_ToolRef/using_geoprocessing_tools/parameter_status_colors_and_messages.htm
I could meet Jake this morning. I got a copy of ArcGIS Engine software from him (I also got a returnable DVD from McKengie Hall). Now I need to install this to my computer.
http://edndoc.esri.com/
The following link describes some parameters of a cell (I need to know what does a 'cell' mean). It also describes how to clip parameters with a cell.
http://resources.esri.com/
I could meet Jake this morning. I got a copy of ArcGIS Engine software from him (I also got a returnable DVD from McKengie Hall). Now I need to install this to my computer.
E-mail from Michal
This is partly to record my own memories before they fade, and partly to communicate them ...
ArcEngine is distinct from ArcObjects. ArcObjects has a COM interface; ArcEngine is a framework with Java and .net APIs. With ArcEngine we get a lot of basic functionality for writing a GIS by modifying or augmenting what is already there in the framework. In that way, for example, we can deal with ESRI Shapefiles (the dominant data format in GIS) as well as other data formats.
Resources.esri.com is the best source for documentation in the APIs as well as introductory information.
Unknown: Does ArcEngine produce events we can hook into, as one would use an OnMouseOver handler in Javascript? If it does, then hooking into their existing graphical display and adding handlers to produce sound could be by far the easiest way to build a soundscape interface. That would, for example, take care of projecting map coordinates of a shapefile into display coordinates, with no extra programming.
If it doesn't provide events like OnMouseOver, it might still be possible (but more cumbersome) to use that framework as long as it can report current coordinates of the mouse as map coordinates (translating back through the map projection, so that it would be relatively simple to keep our own data structure to determine which shapes were under those coordinates.
(A couple of these things Jake mentioned and I just remembered as I was typing.)
ArcEngine is distinct from ArcObjects. ArcObjects has a COM interface; ArcEngine is a framework with Java and .net APIs. With ArcEngine we get a lot of basic functionality for writing a GIS by modifying or augmenting what is already there in the framework. In that way, for example, we can deal with ESRI Shapefiles (the dominant data format in GIS) as well as other data formats.
Resources.esri.com is the best source for documentation in the APIs as well as introductory information.
Unknown: Does ArcEngine produce events we can hook into, as one would use an OnMouseOver handler in Javascript? If it does, then hooking into their existing graphical display and adding handlers to produce sound could be by far the easiest way to build a soundscape interface. That would, for example, take care of projecting map coordinates of a shapefile into display coordinates, with no extra programming.
If it doesn't provide events like OnMouseOver, it might still be possible (but more cumbersome) to use that framework as long as it can report current coordinates of the mouse as map coordinates (translating back through the map projection, so that it would be relatively simple to keep our own data structure to determine which shapes were under those coordinates.
(A couple of these things Jake mentioned and I just remembered as I was typing.)
Tuesday, January 19, 2010
Subscribe to:
Comments (Atom)