Archive for the ‘ESRI’ Category

ArcGIS 9.3 & 10 statistics

October 27, 2010

Hi All:

Asusual these days (month  or I should entire year) has been very busy with current project. So am not able to write much. Here is another statistical information from ESRI ArcGIS 10 when compared with 9.3.1. Already I have posted on 9.2 to 9.3 here is link.

Product

 

Enum

 

Struct

 

Interface

 

Coclass

 

Total 

ArcGIS 9.3

 

1195

 

51

 

5206

 

4050

 

10502

 

ArcGIS 10

 

1053

 

93

 

5555

 

4081

 

10782

 

Some useful tips from ESRI

August 16, 2010

Some useful tips which I have read from different blogs/ESRI Forums. All these items are in draft for quite some time, just publishing them today.

1) How to organize hundreds of feature classes in SDE? . This is one of the challenging job during the application design. Again it depends on the business requirement. I would say having 200+ feature class or using higher number of feature class/multiple dataset in web solution is not a correct practice. If it all required, we have to redesign data modelling for such specific requirement. Below are two ESRI Forum threads discussing  the same.

http://forums.esri.com/Thread.asp?c=2&f=59&t=221639&mc=8

http://forums.esri.com/Thread.asp?c=2&f=59&t=147917&mc=8#msgid430706

In general, it is a bad idea using FD to group FCs for two reasons (at least).

a). As you’ve already known, while accessing just one FC, the whole FD is locked. [What do they mean by FD will be locked, is that -A process accessing a feature class within a feature dataset locks all of the feature classes in the feature dataset?].

What for dataset is being used. This is an imaginary folder to store all your feature class .

  • A feature dataset is a collection of related feature classes that share a common coordinate system.
  • Their primary purpose is for organizing related feature classes into a common dataset for building a topology, a network dataset, a terrain dataset, or a geometric network.
  • All feature classes contained within a feature dataset have the same access privileges.
  • To organize feature classes for data sharing
  • Another design factor in organizing feature classes into common feature datasets is the requirement to use a spatial reference
  • Extent set for FD is same for all FC’s

b). When you use one layer in the FD, all the FCs in the FD will be cached, not just the layer you are using.

c). Don’t put any layer/feature class into a feature dataset unless you need it for geodatabase functionality (e.g. geometric network, topology, etc.)

2) How to connect to geodatabase. A quick help ESRI reference link for various type of connection. I always have this link in my favourites.

http://edndoc.esri.com/arcobjects/9.2/NET/c778d2bb-eb36-4793-9c89-20795811c5eb.htm

3) How to find windows operting system version (32/64 bit OS)

  • Click Start, and then click Run.
  • Type sysdm.cpl, and then click OK.
  • Click the General tab. The operating system is displayed as follows:
    • For a 64-bit version operating system: Windows Server 2003 Enterprise x64 Edition appears under System.
    • For a 32-bit version operating system: Windows Server 2003 Enterprise Edition appears under System.

4)  Spatial Analysis Book : A must read book for people doing research by using geographical tools

might find this geospatial analysis book extremely useful. Even if you work with the specific type of analysis by using a certain open source or a popular commercial GIS product (for example, using ESRI Geostatistical Analyst® for coverage analysis), you could get a deeper understanding of raster data properties and learn some more theory behind the interpolation methods you use.

Free online copy is avaiable @http://www.spatialanalysisonline.com/output/

Hope some of these items might be helpful to you.

Basic ArcSDE commands

August 16, 2010

Hi All,

Its been long time am writing a post on technical side. Yes, these days (actually months) were very busy with the current project.  Not enough time for personal work even. :( . OK. Let me share some basic ArcSDE commands that every developer should aware of.  As a GIS developer (or any developer/programmer) should know atleast one database. Though this is not a mandatory but in GIS context, knowing ArcSDE is very much essential. You cannot claim yourself a spatial developer (a.k.a ESRI Developer) if you are not knowing some basics of ArcSDE (in terms of ESRI).

I just wanted to write share the most useful and often used ArcSDE administration commands . Parameters embraced in <> are defined by user; so, if we have “<servicename>” that would result to “esri_sde”.

To show all SDE instances:

Sdeservice -o list

To show status of a specific sde instance including the number of accepting connections:

Sdemon -o status -i <servicename>

To show who is connected to an ArcSDE service:

Sdemon -o info -I users -i <servicename> -p <sdepassword>

To stop an sde service:

Sdemon -o shutdown -i <servicename> -p <sdepassword>

To start an sde service:

Sdemon -o start -i <servicename> -p <sdepassword>

To start an sde service remotely:

sdemon -o start -p <sdepassword> -s <servername> -i <servicename>

NOTE: ArcSDE administrator should be in the Windows admins group/power users group on the remote server.

To kill all connections to an sde service:

Sdemon -o kill -t all -i <servicename>

To kill a direct connect to an sde database:

Ths can be done either by restarting SQL Server database engine or by using SQL Server Activity Monitor, tracing the locked processes, and killing those processes. These things are being done on the SQL Server level, because direct connection has nothing to do with sde services – all users connect directly to the SQL Server database engine bypassing sde.

To shut down a stalled giomgr process (go to %sdehome%\tools and then run):

Killp <giomgr_process_ID>

NOTE: Process ID (PID) can be seen in the Windows Task Manager. Click Select Columns button on the Processes tab from the View menu. Then select properties you want to appear as column headings and then click OK.

To get list of layers and their properties from a specific sde service:

Sdelayer -o describe -i <servicename>

To get the list of current locks for a certain sde service:

sdemon -o info -I locks -i <servicename>

For further references : You can visit ESRI ArcSDE Manual  and many useful blogs like

http://bingluo.blogspot.com  [Spatial DBA] lot of useful tips and tracks.

Hope this helps you.

Submit your Idea

April 30, 2010

I’m stumbled on seeing the ideas posted on ESRI site http://ideas.arcgis.com/.  One of the reason why ESRI products rule the geospatial industry they care of their customers and listen them .  When I read the ideas, I wanted to add my view point on them.

1. Providing GUI for ArcSDE – This is one of the top most ideas on the list. Yes, I completely agree with this, still we are using old command line for creating views etc.  This SDE UI or call it dashboard is much essential for a developer/admin. List of current users, roles, permissions, locks, no of versions are minimal information required every time. 

2. Print Operation via REST API :  The long standing request/ehancement from many web developers around the world. Ablity to add custom graphics similar to SOAP is required. Without out of box print functionality in any client side API is waste. Though we have several work arounds but ‘Print’ functionality is most common used one by every user. Hence this occupies prime importance

3.  Automate Clearing the REST cache :  This is very important atleast for me, why so?. If you have ever developed Geoprocessing services and publish them, you can feel my pain. Whenever service is updated or changed, REST cache needs to be cleared, we need automated cache clearing techniques .  Presently, ESRI provides admin login with predefined clearing cache option but does not works out well.  Most of times I have faced issues because of rest cache.  I see this REST cache as GHOST.  You will not be know what is happening/happened. I suggest ESRI to come with simple and neat REST implementations atleast.

4. Table of Contents, Scale, Labelling using REST API:   ESRI REST API is simple and fine but it is not consumable. Not every one develop big enterprise application with all functionalities but basics like legend, whenever layer is toggled on/off updating TOC on client side, scale dependent rendering, labelling from client side are few basic functionalities required by common end user. If REST API is updated for this then it will be great

5. Spatial Operations using REST API :  Though it looks like I am asking more, but few basic geospatial operations can be given in REST like “Intersection” (mother of all geospatial operations) .

6.  Better Caching Process:  Here is the link about my adventures on caching . I want ESRI to come with best caching process with UI .

7.  REST API Error Logs:  REST API throws hidden errors like 500, 400 etc. This does not help developer any way. We need to have a look at server logs and arrive at probable cause. I want better error message from REST API. If you develop Geoprocessing service, error handling is critical task.

8.Ability to control which SOC machine runs a service: When working with a distributed installation, it would be ideal to control which services run on a specific SOC Machine. This would allow certain, more robust machines to run only Geoprocessing or Geodata Services. It would be good to even specify which Map Services will run on a SOC to better balance resources across the system. I completely support this idea. Great!

9. ESRI Licensing System :  I want ESRI simplify their licensing system. Unless if you are experienced professional, ESRI licensing is always confusing.  I want write a seperate post on ESRI licensing system.  Licensing system is complex, I have seen many managers/sales people difficult to understant what is required for them. I would suggest ESRI to come with simple license plan.  There should be seperate section/web page to provide support/help on products .

10. Other general  :

  1.  Recyle bin for Arccatalog,
  2.  Editing column names and resizes after creation,
  3.  Allow privledges to be set for feature classes within a feature dataset
  4. Adding extent operation on client API,
  5. Better control of feature layer labeling through REST
  6. others

ArcGIS Web ADF, JavaScript, and REST

September 25, 2009

Repost from Rex Blog

Currently the Web ADF does not include an ArcGIS Server data source that supports consuming ArcGIS Server services via REST. Instead, the pre-packaged ArcGIS Server Internet data source uses the SOAP API to consume ArcGIS Server services. From a platform perspective, this makes sense because the Web ADF is founded in a rich, server-side ASP.NET development environment where SOAP provides some clear benefits. Let’s look at this topic in more detail…

REST is a lightweight, non-standard format which can be used to request data over HTTP. REST is especially attractive to browser developers because it can be leveraged with JavaScript, JSON, and HTML to create an efficient, pure client solution – namely one that uses only browser logic and can initiate cross-domain requests for data. In general, requests contain a manually concatenated string of argument-value pairs and responses consist of standard content types, such as JSON (text) and images. While the benefits of using REST in a browser context with JavaScript are clear, other application environments present some hurdles. Since REST is not founded on a public standard, a developer needs documentation to learn how to interact with a REST service. This may suffice when working with client script, but developers working in an IDE with object-oriented languages like C#, VB.NET and Java often demand more. Why parse strings when you can work with explicit service types, discover parameters using intellisense, and utilize a proxy to manage requests\responses? This is where SOAP comes into the picture. SOAP is a standard W3C procotol which defines the XML message format for requests to and responses from a SOAP service. WSDL, another W3C standard language, provides the contract for how a consumer can interact with a SOAP service. While a SOAP message is an XML formatted string, a developer does not need to construct and parse it manually. Since SOAP is based on standard protocols and languages, toolkits for specific development environments are available to automatically construct native types. More specifically, the WSDL is used to construct a proxy class and a set of supporting types for use in an specific object-oriented environment. The proxy class exposes a set of operations (methods) which initiate Web requests. The supporting types are used to define inputs as value objects (termed ‘value objects’ because they only store values), which the proxy uses to construct a SOAP message. The response from a service can be deserialized by the proxy into one or more value objects. The benefit here is clear; a developer is able to use complex service-specific types native to their development environment to interact with a service.

The key difference between the use of REST and SOAP lies in the WSDL. The WSDL provides a central, language agnostic means for defining how to interact with a SOAP service. Different development environments can use the WSDL to construct the same set of types on-the-fly using a SOAP toolkit. REST does not define a compliment to the WSDL. As a result, documentation must be used to determine request and response content. Technically, you can manually construct a proxy and set of types to interact with a REST service, but without a central definition or standard (provided by a WSDL) the API structure will likely differ between developers.

So where does it make sense to leverage REST services in the Web ADF? REST services should be utilized in the browser, thus integrated with the Web ADF using the ADF JavaScript library. In this capacity, REST services may be used to enhance Web ADF application behavior and performance. One such area involves simply adding non-cached map services using pure client logic, something the Web ADF does not provide out-of-the-box. Currently non-cached map services use the AdfMapHandler class in ADF JavaScript to generate dynamic map images. This class requires Web-tier components; namely a map resource associated with a MapResourceManager and Map server control. It uses the ADF MapHandler to generate dynamic maps. The same applies for the Toc; it still relies heavily on Web-tier manipulation. You can, however, extend the ADF JavaScript DynamicLayer class to work with a non-cached service via REST.

The sample is available here.

There are a few caveats:

1) The layer (i.e. resource) is only available on the client; server components do not know about it. As a result, any requests to the server that work with map resources will not include this layer. In addition, most ADF controls require modification on the server to change their rendered content. This includes the Toc, so if you want the pure client layer to show up in an ADF Toc, you’ll need to customize Toc content using code on the server.

2) Using services secured with token-based authentication requires a proxy. Here’s a link to step on how to set this up: http://resources.esri.com/help/9.3/arcgisserver/apis/javascript/arcgis/help/jshelp_start.htm#jshelp/ags_proxy.htm. Using a proxy is a popular solution for working around cross-site scripting restrictions in a browser. Abe Fettig has researched a number of these solutions and presented them in a blog post. Note, you can use a proxy even if authentication is not required.

In the sample I provided, if a proxy (via the proxyUrl property) is defined when creating a new DynamicRestLayer, the proxy will be used. In this case, a POST request is always generated to guarantee that all the input arguments are passed to the remote site. The response is JSON and contains the properties of the generated map image, including the url and extent. If no proxy is specified for the DynamicRestLayer, a simple GET request for a map image is made via a dynamic image tag. The image tag source is not subject to cross-site scripting restrictions in the browser, so we don’t need a proxy. Both IE7 and FireFox 2+ work great with the no proxy solution. Unfortunately IE6 is somewhat problematic (e.g. triggers erroneous requests). If you need to support IE6, you may want to go the proxy route.

This brings up an interesting point – the ADF JavaScript Map component is designed to render and blend maps using dynamic image tags. The image tag source is not subject to cross-site scripting restrictions. Since a REST map service can return the raw map image, the sample included with this post merely builds on REST capabilities and ADF JavaScript architecture. Another option involves using dynamic script tags whose source references a REST endpoint that generates JSON. The data returned from the REST service is evaluated as a JavaScript object when the tag is loaded or inserted in the page. This could also work with ADF JavaScript, but would require more implementation code. Interestingly, dynamic script tags are leveraged by the ArcGIS JavaScript API.

Note, the sample also shows how to use REST to access tiles in a cached map service with a pure client layer. It may be of interest since the url is standard across sites (e.g. you don’t need to know the virtual cache directory).

MXD Path update

August 8, 2009

Many times  I have faced same problem as described in this post. During application deployment phase of we may need to change all the data-source path to prod database.  Usually we dont have luxury of having ArcGIS Desktop/Catalog for updating the path or do some modifications on production environment. This is primarily because of additional license is required or production server will be entirely on other network or domain.  Due to security reasons also ESRI ArcGIS is not allowed on prod environment.  This becomes annoying when client wants to change the symbology or change the data source for some reasons.

One way to get rid of this issue is maintaining relative path on the mxd.  If you want all your new maps to be stored with relative paths, go to the File > Document Properties dialog box and click the Data Source Options button. Check the option to make relative paths the default for new map documents. This setting is stored in the registry. If this box is not checked, the default is absolute paths.  This will definitely save your effort.

You can still change the path if you have ESRI .NET assemblies installed and you need to write some scripts to achive the same.

If you are working with ArcEngine Java then you can use this tool .   Here is link for MXD Path editor for Java on linux / Solaris OS.

But issue here is whenever you change the connection properties of SDE i.e. if you want to change password alone. Then it hurts more. Reading .sde file to get connection properties using AO is a not possible. You can get connection properties straight a way.

A simple way to get the connection properties that it contains is to use it to open the SDE workspace. Once the workspace is opened, you’ll be able to access the connection properties. Note, the password will remain encrypted – you won’t be able to see it in plain text. ESRI is NOT providing option to decrypt the password since by design as it as for security reason.

Long back I have faced one issue when I saved some layers for which the datasource is SDE  feature classes. I ‘ve used  an SDE connection without save password option. But still I got SDE Connection prompt when I open a map using IMapDocument interface.  I could not supress this prompt programmetically, am not sure whether this issue is solved now.

You can click below link for read on usage of relative paths on MXD. Save a layers using relative path is optimal solution I would suggest for a developer for hassel free deployment.

How to use relative path

Flex API 1.2 Released

May 26, 2009

ESRI has released Flex version 1.2 on few days back. Here is link to download the latest API.

# New features:

* Routing using ArcGIS Server (requires ArcGIS Server 9.3.1).
* Microsoft Virtual Earth mapping
* Microsoft Virtual Earth geocoding
* Renderers [Class break, Unique and Simple]
* GraphicUtil.getGraphicsExtent() from Util returns the extent for an array of graphics. [ No need of
looping and get the extent]
* WebMercatorUtil projects coordinates between 4326 (lat/long returned by Virtual Earth geocoding)
and 102113 (Web Mercator – used by Virtual Earth tiled layer).- Straight punch
* Text wrap function and some bug fixes.

This is really great news that ESRI heading towards Microsoft Virtual Earth. Download and enjoy the new flavour.

ESRI Microsoft Silver Light API Beta

March 21, 2009

I have been chatting with my friend who works for Microsoft India. We discussed lot about security and domain and finally I asked about Virtual Earth.  He said there is team working on this  in his office.  ESRI also released The ArcGIS API for Microsoft Silverlight™/WPF™ beta release on March 20th. Here is the link for more details on their API and samples to get start with.

I believe that all core MS fans will be very happy to work Silver light API  from now on. ESRI has announced long back but before their dev summit they have released this . I’, m  indeed happy on looking at their API.  When I writing this post, am downloading Silverlight on my lappy. Hence  I have to wait for couple of mintues to have look in and start play with.

These days I primarily work with Flex API. But am very eager to know on the SL API. Many of colleagues where keep watching on this.   Let us cheer ESRI for another flavour of their API to their clients/developers. Kudos!

I’m waiting for Monday on Developer summit and videos to catch up the action. I remember Jim mentioned that this ESRI will upload their session videos in one hour after the session is over. This is very glad news for people like me and working late night to see action.

ESRI Promotional Offer

March 8, 2009

ESRI India Special Software Promotional Offer for Universities/Academics Institutions. This offer is valid till 25th March 2009. If you are studying in a university or academics institutes here is the promotional offer from ESRI India on various packages.

  • Getting Started with GIS

ArcView – Desktop GIS for Mapping, Data Integration and Analysis for everyone to use geographic data to make better decisions. ArcGIS Spatial Analyst – provides a broad range of advance & powerful spatial modeling and analysis tool.

  • Academic Value Pack

ArcInfo Lab Kit – ArcInfo is the most complete desktop GIS. It includes functionalities to create, edit, and analyze Spatial & Non-Spatial data and include advanced Geo-processing tools for performing extensive spatial analysis, data manipulation and high-end cartography.

Available in Single user pack and Multi-user Pack (5 or 10)

  • GIS Developers Pack

ArcGIS Engine – A standard framework for developers to create custom GIS and mapping applications. Cross-platform components compatible with multiple programming languages that enable developers to build GIS Solutions

ArcGIS Server – A complete and integrated server based GIS. It’s a out-of-the-box Web mapping applications and delivers Web services that support spatial data management, spatial analysis and 2D & 3D visualization.

For further information: (Link not working :( )

http://www.esriindia.com/ESRI%20Education%20Flier%208.pdf


I suggest ESRI to publish the course fee for their courses and do lot more advertisement to bring awareness to many GIS professional/others, who is willing to do GIS course.

First Anniversary !

January 23, 2009

Happy Anniversary to gisprog.wordpress.com

Dear All:

I am extremely happy that I have crossed one year in blogging.   I have started blogging Jan 21,2008 , its been a fantastic journey throughout.   Nearly 48000+ hits in one year and lot of appreciation and comments from many . I never thought my blog would reach these many people. I am happy that my posts were useful for the readers.

I take this opportunity to thank all readers who appreciated and encouraged me all the time. I place my sincere thanks to ESRI Folks, Jim Barry, Dave and my friends . I wish to write more useful contents on GIS programming and other topics as well.

I welcome your suggestions and comments to improve my blog further!.  Drop your comments!

Happy reading!

Cheers
Lakshmanan

Jim Barry (ESRI)….

“Congrats Lakshmanan on your blog’s one year anniversary!  I only discovered it several months ago, but it quickly became one of the few “go-to” blogs for GIS developers on my short list.  Not only to hear about your experience and insights, but you do a great job keeping the pulse of other technical content out there.  I’m sure it takes a lot of work on your part, but it’s greatly appreciated.  Keep it coming!”



Follow

Get every new post delivered to your Inbox.

Join 155 other followers