Archive for the ‘ArcGIS Server’ Category

How to convert IFields to Fields

April 15, 2008

 

I am trying connect to external database (simple standalone DBF) to one of layer dynamically using ADF. I wrote a method to connect to database and return the fields. I can able to join with database but retrieving fields seems bit tough!. The RelQueryTable class has method  getFields() which returns  IFields objects . How to convert to IFields to Fields object in com.esri.arcgisws which has getFieldArray() to obtain fields list.

 

Can anyone ping me or give me any clues? 

 

private Fields JoinTable(IServerContext pSC, IFeatureClass pFeatclass){

try{                

ShapefileWorkspaceFactory filefactory = (ShapefileWorkspaceFactory)pSC.createObject(ShapefileWorkspaceFactory.getClsid());

Workspace ws = (Workspace) filefactory.openFromFile(”C:/test/”, 0);

IRelationshipClass pRelationshipClass ;              

ITable table = ws.openTable(”1Z.dbf”);

factory = (MemoryRelationshipClassFactory)pSC.createObject(MemoryRelationshipClassFactory.getClsid());

MemoryRelationshipClass rclass = (MemoryRelationshipClass)factory.open(”test”, pFeatclass, “ZONENO”, new ObjectClass(table),”ZONENO”, “forward”, “backward”, esriRelCardinality.esriRelCardinalityOneToOne);                     

RelQueryTableFactory relQueryTableFact = (RelQueryTableFactory)pSC.createObject(RelQueryTableFactory.getClsid());

RelQueryTable relQueryTab = (RelQueryTable) relQueryTableFact.open (rclass, true, null, null, “”, true, true);

System.out.println(”After Joining total Field count::::::”+ relQueryTab.getFields().getFieldCount())                        

return  relQueryTab.getFields();        

 }

catch(Exception ex){

System.out.println(”ERROR in JOINTable Method”+ ex.toString());

return null;

}

 

SP5 offers IBM Portal Server ArcGIS Portlet development

April 15, 2008

ArcGIS Server 9.2 Service Pack 5 includes an enhancement to the ArcGIS Server Java ADF which provides support for IBM Portal Server ArcGIS Portlet development. This gives you the ability to create and publish GIS Mapping Portlets inside IBM Portal Server. In conjunction, SP5 includes a plug-in for the IBM Rational Application Developer (RAD) environment so that you can create and deploy those ArcGIS Portlets more efficiently. The following documents have been added related to this SP5 enhancement.

Install ArcGIS RAD plug-in

Developing ArcGIS portlet Applications in RAD

Will ESRI upload these plug-in s as zip file who don’t have internet connection. ESRI please awake!

Chart Renderering using Web ADF

April 8, 2008

 

These are days am working with ArcGIS Server [9.2+SP3]- Java edition. I’ve started with ESRI samples and grown up to creating tasks for my application. Task framework is handy to create our own custom business logic with rich UI. I’m trying to recreate or mimic ‘Charts’ functionality similar to Arc Map.  User can select a layer (yet to code), field(s) and chart type to draw charts.   User has option to prevent overlap, change map base symbol color, field(s) color also. It works fine. No harm, charts draws fine. 

 

While I try to remove the rendering, I couldn’t do so. Later, When I investigated, chart rendering has been applied to the map service (i.e. on server objects) since it is pooled one. I have searched in forum/developers help, I learnt that com.esri.adf.web.data.renderer package has ONLY five classes WebClassBreakInfo, WebClassBreaksRenderer, WebSimpleRenderer, WebUniqueValueInfo, and WebUniqueValueRenderer.  The Chart Rendering option is NOT available with the web ADF.  My senior colleague who attended Dev Summit has explained me that only ArcIMS has this functionality through ArcXML using Chart Symbol Object and not in 9.2. ESRI will incorporate in 9.3 ;adding charts in graphics layer or from other source. This helps me that am working in right direction.

 

As a developer, you should not expect that everything can only done thru available methods/properties, sometimes we may need to use reverse logic to obtain desired result. One of my fellow colleague suggested that before applying chart rendering to layer object, feature renderer of the layer is stored temporarily once chart renderer is applied , web context is refreshed. Then now apply the feature renderer stored in temporary object to server object so that user can see the charts whereas a server object doesn’t get changed. This is simple and better idea for time being. 

 

There are several other interesting learning’s/findings in creating this task. I’ve used custom xsl from Daniel Garcia Roman Class break rendering. 

 

I’m facing some problems like how to update overview map dynamically when rendering type is changed, while changing radio events are not firing properly (I’ve to click twice). Yet to implement normalization, exclusions, orientation, size etc. For a developer who is fairly having good understanding of ArcObjects doing task is not so tough. Here, we are working with ArcObjects remotely. I always use VBA help to understand methods/properties of classes. Then try to migrate to java. Proper casting, creating objects in server context, error handling, using appropriate packages are very vital in server app development. I strongly feel that lack of samples in Developer help for Java as in .NET is a big handicap. We have depend on forums/experts  to understand certain basic issues.

 

 

FAQ: What are the build numbers for all the recent releases of ArcGIS?

April 4, 2008

Question

What are the build numbers for all the recent releases of ArcGIS?

Answer (from ESRI Support )

Build 535 = ArcGIS Desktop 9.0 final
Build 550 = ArcGIS Desktop 9.0 Service Pack 1
Build 560 = ArcGIS Desktop 9.0 Service Pack 2
Build 580 = ArcGIS Desktop 9.0 Service Pack 3
Build 589 = ArcGIS Desktop 9.0 Service Pack 3 + ArcGIS Desktop 9.0 Map Document Performance Patch

Build 722 = ArcGIS Desktop 9.1 final
Build 750 = ArcGIS Desktop 9.1 Service Pack 1
Build 780 = ArcGIS Desktop 9.1 Service Pack 2

 ArcGIS Desktop 9.1 Service Pack 2 displays as build 766 from ArcMap Help > About ArcMap.

Build 1324 = ArcGIS Desktop 9.2 final
Build 1332 = ArcGIS Desktop 9.2 Service Pack 1

 ArcGIS Desktop 9.2 Service Pack 1 displays as build 1324 from ArcMap and ArcCatalog Help > About ArcMap/ArcCatalog.

Build 1350 = ArcGIS 9.2 Service Pack 2

 ArcGIS Desktop 9.2 Service Pack 2 displays as build 1324 from ArcCatalog Help > About ArcCatalog.

Build 1380 = ArcGIS Desktop 9.2 Service Pack 3
Build 1420 = ArcGIS Desktop 9.2 Service Pack 4
Build 1450 = ArcGIS Desktop 9.2 Service Pack 5

 ArcGIS Desktop 9.2 Service Pack 5 still displays as build 1420 from ArcCatalog Help > About ArcCatalog.

Eclipse plug-in for debugging ArcObjects code

March 27, 2008

 Intro

Finally ESRI has made Eclipse plug-in for debugging ArcObjects Code. This is great news for java devlopers who uses print line statements.  One of the most important aspect of any tool is debugging.I strongly feel that Mircosoft products brings great developer productivity.  This is also one of  reasons why many huge fans for MS products than java.  Its better late than never, ESRI shown some concern to java developers!. Kudos ESRI :)

About the plug-in

One of the most valuable tools that developers have at their disposal is a debugger through which they can step through code one statement at a time and inspect objects in the application. As many of you may already know, Java classes in the ArcObjects API are really only proxies to underlying COM ArcObjects. As a result, examining these proxies in the debugger only reveals their internal details and not the state of the ArcObjects. This makes it difficult to find out information such as the coordinates of a geometry, or the layers in a map service. Consequently, developers have to sprinkle their code with System.out.printlns and analyze traces on the console to get this information. This approach can be inconvenient and time consuming.

With this new Eclipse plug-in, Java developers can examine the state of the underlying ArcObjects right in Eclipse IDE’s Debug Perspective by enabling the “Show Logical Structure” option on the Expression and Variables window. Here’s an example of a Point object without the “Show Logical Structure” option enabled.

untitled.jpg

This information provides little insight into the underlying ArcObject and is not helpful in reasoning through a workflow while debugging. Now here’s the logical representation of the same object with the “Show Logical Structure” option enabled.

untitled1.jpg

The logical representation presents more comprehensible information about the underlying ArcObject’s state. This state is defined by the no-argument getter methods on it. You might sometimes see exception messages like “Exception Occurred: com.sun.jdi.InvocationException occurred invoking method” in the logical representation. This is normal and happens when some property of the ArcObject is not valid in the current context of the application.

The underlying ArcObjects could be running remotely in a separate process as in the case of ArcGIS Server web applications, or in the same process like in ArcGIS Engine applications. Thus, both Engine and Server developers can take advantage of this plug-in to debug their applications.

How to get the plug-in

Follow these steps to download and install the plug-in from the EDN Website:

  1. In the Eclipse workbench, go to Help > Software Updates > Find and Install
  2. Select Search for new features to install, and click Next
  3. Create a New Remote Site for the URL “http://downloads.esri.com/EDN/java/plugins/eclipse”
  4. Enable this remote site and click Finish.
  5. Expand the EDN tree in Search Results, and select the ArcGIS Debug feature.
  6. Proceed to install the plug-in, and restart the workbench when prompted.

REST: Simple Explanation

March 19, 2008

We ESRI folks hearing word ‘REST’ often when we discuss about ArcGIS Server. What is REST, how it works, what it does?. Here is a link, which gives great explanation about REST archiecture.  “How I Explained REST to My Wife” by  Ryan Tomayko. This is a wonderful post on REST.  Hope this helps you lot!

Precompile ASP.Net web application: ESRI Tech Article

March 19, 2008

 Summary

Compiling takes a long time the first time when using ArcGIS Server Manager or the ArcIMS Web Manager if you have created ASP.Net web application.Microsoft .NET Framework provides a command line tool to precompile ASP.Net applications to avoid the initial wait time.Instructions provided describe how to use the tool with respect to web applications created using the Web Manager.

Procedure

There are two options to precompile:a. Provide the virtual directory, assuming that the application has already been deployed in IIS.b. In the case that the web application is not yet deployed or if not using IIS as web server, provide the physical path to the web application.

The following procedure is for the first case since when using the manager the applications are typically deployed in the web server.

  1. Start a command prompt and navigate to the .NET Framework directory. For example:
    cd "C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727"
  2. Run the following command:
    aspnet_compiler -v /USABaseMap

 There are several useful switches that can be specified. See the links in the Related Information section below for further reference.The above example precompiles for a web application called ‘USABaseMap’ which is created using ArcGIS Server Manager at the IIS Webserver root directory, typically located at ‘c:\inetpub\wwwroot’.

Related Information

2008 ESRI Developer Summit Plenary by James Fee

March 19, 2008

Note: This article was written by James Fee and pubished in his website.

Jim McKinney opened the Plenary by introducing Jack Dangermond to welcome everyone to the DevSummit. The DevSummit has gotten much bigger over the last 3 years. It had more than doubled since the first DevSummit. The conference has changed from previous years. It is a longer a conference than before (pre-conference seminars). More sessions than before, presentations will be recorded and put up on EDN, larger community center and ESRI showcase (the server island was described as a continent). ESRI has also added the demo theaters to the showcase to augment the tech sessions. It definitely feels much larger than before. On top of it all, the plenary is much shorter (only 2 hours) than before so everyone can get right into tech sessions.

ESRI has committed to releasing service packs every quarter for 9.2. The future includes SP5 for 9.2 out soon and 9.3 in “June” (or before the User Conference) and 9.4 should arrive in “early” 2009.

ArcGIS Server

Ismael Chivite, the ArcGIS Server product manager, lead the talk on ArcGIS Server. The tag line that ESRI has been using is “Making GIS Knowledge Available To Anyone…”. This aligns with what was send at the FedUC and the BPC. Putting GIS into consumer clients (Google Maps, Google Earth, Virtual Earth) is clearly a huge change for ESRI. ArcGIS Server 9.3 performance is improved because of improved caching workflows (partial cache and on demand cache). This means you don’t need to create map tiles for the world, but pick areas you feel are important. The areas that are not tiled, can be created on demand as users view the world. The “simple” javascript API will speed development over “traditional” .NET or Java ADFs. Security can now be managed from within the Server Manager on each service. Much like the ArcGIS Explorer resource center that everyone can see, there will be a detailed ArcGIS Server 9.3 resource center (only available for Beta users at this point) that will aggregate the documentation and other documents in one place. ESRI is committed to delivering more code samples and web tasks for developers to use. (I can confirm that there are more samples available than I’ve ever seen for an ESRI release)

Web ADFs (.NET and Java)

Rex Hansen demonstrated how you can quickly take code samples out of the Resource Center and create WebADF and ASP.NET AJAX applications quickly and easily. The sample Rex demonstrated was simple and valuable which is definitely something that has been missing on ESRI samples from before. Rex showed how you can quickly take the ESRI sample and create a Sharepoint Web part using your own data. Hopefully this will improve usability of creating quick WebADF applications that leverage Microsoft development tools.

Rex apparently lost his mind and started talking about Java and AGS 9.3. The Java example was very similar in the sense that the code was simple and any Java developer should be able to customize it to work with their own data and projects. Rex looked pretty familiar with Eclipse so maybe he’s been cheating on us .NET folks.

Javascript API

The ArcGIS Javascript API is probably the biggest new feature of ArcGIS Server at 9.3. Now instead of being limited to .NET or Java, you can now pick a simple Javascript API to publish to ESRI’s Javascript API, or Virtual Earth and Google Maps.

Jeremy Bartley demonstrated the new Javascript API by visiting the Javascript API section of the ArcGIS Resource Center. Javascript API resource center allows you to interactively explore the API. Much like how Google has described the Google Maps API, ESRI has really taken the time to explain their Javascript API (Now I’m sure it isn’t as detailed at Google’s Docs, but the change from previous ESRI documentation is very noticeable.) The Javascript API reference is clean and easy to use and there are even plans for a “community” section where developers will be able to upload their own code or tricks that they have for the Javascript API (this will also be available for the .NET and Java sections as well). The speed that you can add ArcGIS Server services to your maps is just slick. One line of Javascript code and a url to the service and you are running. Many have already browsed the Services Explorer on the demos that ESRI has posted and have been able to see the capabilities of the service.

Jeremy also demonstrated the Google Maps and Virtual Earth extenders. Seeing ArcGIS Server being leveraged in Google Maps really gives developers the ability to take classic GIS analysis and put it in a context that “ordinary” users can work with. I will say when Jeremy was done, the crowd really gave ESRI a good cheer. I think that proves that this Javascript API is going to be used quite a bit moving forward. One point about the Javascript API’s is that no development or deployment license is required on the Web server hosting your application.

ArcGIS Mobile

Developers I’ve talked with this week have really been interested in what ESRI has been doing with ESRI Mobile solutions. What is interesting at 9.3 is that ESRI includes ArcSDE SQL Express with ArcGIS Engine. You can do both one and two way replication with ArcGIS Server. ArcGIS Mobile integrates deeply with Visual Studio and enables quick development and deployment. Being able to develop a mobile application on Windows Mobile and Smartphone with a couple lines of code should increase Mobile usage among ESRI Developers.

ArcGIS Desktop/Engine

Euan Cameron talked about changes to ArcGIS Engine 9.3. The biggest news I think was the ability to include SQL Server Express Support with deployments. At 9.3 ESRI increased the amount of documentation and code. Desktop now allows the ability to have “Z Aware” editing, HTML popup windows (like what you are seeing with ArcGIS Explorer), more online support content and VBA 6.5 (thus Vista and Office integration).

Bernie Szukalski started to demo some 9.3 enhancements (the new “left hand tool”), and ArcGIS Desktop 9.3 crashed. We got to see the error detection and debugging tools. Crash dumps created automatically and ESRI will use these to help track down crashes. This should result in Service Packs addressing problems quicker than before.

ArcGIS Explorer

Now ther real reason that Bernie Szukalski was up on stage (no he wasn’t there to crash ArcGIS Desktop) was to demonstrated ArcGIS Explorer The future releases of ArcGIS Explorer include 480 will be released in May and followed by releases 600 and 700 by the end of th year. Bernie was demonstrating how you can include ArcGIS Server Globe Services, ArcIMS Services, WMS Services, local imagery, file geodatabases and KML. The new icon symbols really look great and very sharp (and will be available with ArcGIS 9.3 Desktop for use in any ArcMap or ArcGIS Server production). Bernie even when to the Google 3D Warehouse to grab a KMZ of a 3D building. Bernie also demonstrated how you can even embed YouTube videos right into the info bubbles. Any HTML content can be used, there is no limits so you can put any web content into ArcGIS Explorer.

ArcGIS Explorer 480 will increase performance (multi-threaded), Direct Connect to SDE!!!!!, GPX support, GeoRSS, improved task framework and popups and ability to load AGX in your web browser. The future moving forward includes a new user interface, integrated 2D and 3D display, markup and collaboration and a Map Control to embed Explorer objects. You’ll be able to take the map display and use it in your applications.

ESRI demonstrated build 600 (which isn’t the next version) and it has the new “ribbon” interface that you’ll recognize from Microsoft Office. Now tasks aren’t hidden in the table of contents, but available quickly and easily. It really does look like a Microsoft Office application which should help with its adoption. The usability of build 600 is really striking compared to the existing ArcGIS Explorer builds and even Google Earth. Another key feature of build 600 is the ability to view maps in 2D. The enhanced Explorer SDK which will be available with either build 600 or 700. Embedding AGX inside your applications will be big for many developers.

Lastly Scott Morehouse discussed where the ArcGIS Platform is going. ESRI is at the “envisioning” stage with 9.4 so the User Conference will be where we’ll see what will be part of the release. It will build upon what happened in 9.2 and 9.3 so it shouldn’t rock the boat and will probably be a nice stable release. The release schedule of ArcGIS Explorer will be adopted by the Server and Desktop teams so we’ll be seeing more and quicker releases of software, rather than these big Service Packs and large jumps in technology we have been getting. There will be more support for standards, much improved Linux support, faster services in ArcGIS Server and more stability. 9.4 will also see Flex and Silverlight be part of the Server platform. Desktop will continue to be improved with stability/performance and new editing tools showing up. ArcGIS Online is now an integral part of ArcGIS and is not a separate product. More online documentation, best practices and code galleries will also begin to show up with 9.3 and on to 9.4.

Jim Barry described where EDN was heading including more blogs coming online in the next few months (Desktop Developer and Engine) as well as highlighting some of the improved online support tools at 9.3. Also the forums are being updated as part of the 9.3 beta program and when 9.3 is released, will replace the old forums that have existed for years.

That ended the plenary and we will move on to the “super sessions”.

Publishing KML Services with ArcGIS Server 9.3

March 13, 2008
Publishing KML Services with ArcGIS Server 9.3
ArcGIS Server 9.3 provides rich support for KML and enhancements for creating and working with KML services. This seminar shows how to author, publish, and use KML services using ArcGIS Server 9.3.
Thursday, March 20, 2008
9:00 a.m., 11:00 a.m., & 3:00 p.m. Pacific Time (US & Canada)
12:00 p.m., 2:00 p.m., & 6:00 p.m. Eastern Time (US & Canada)
4:00 p.m., 6:00 p.m., & 10:00 p.m. UTC/GMT

ArcGIS Server on ICEFaces Technology

March 3, 2008

Hello,

Here is latest development on developing ArcGIS Server Applications on Java by integrating ICEFaces Technology. My friend (see photo below) is working on this new model and details can be found here.

 Guide : http://www2.pch.etat.lu/pchViewer/guide.pdf

Download Script : Script submitted to code Challenge contest

URL : http://www2.pch.etat.lu/pchViewer/

I wish him all the very best for this efforts!.

 dsc03334.jpg

 Tom Cruise :)-

Cheers