Wednesday, July 30, 2008

Searching along routes

imageHave you ever wished that Google Maps and Virtual Earth would provide search results that were along a route that you have planned? I have! Such a feature would be great when you wish to find a business such a Wal-mart along a route that you are going to take.

Weirdly, both Virtual Earth and Google Earth dont have such a feature. (At least not as of now)

Yahoo! has released as part of its newest framework a feature that allows you to search along a route.

MetroMapr has a mash-up that uses this new feature to return only those businesses that are located along the light rail lines.


Yahoo! documentation -

Dreaded 'Sys' is undefined error when using ASP.Net AJAX

If you are using ASP.Net AJAX for the first time, no doubt you will come across the 'Sys' is undefined error while working with an AJAX control.

After a lot of scratching my head I figured out what caused it and how to fix it.

Typically you are going to be hit with this error when you are working with a plain ASP.Net website. (i.e., the project was created by selecting Asp.Net website in the New Project dialog).


Instead if you created the project by selecting ASP.Net AJAX-Enabled web site, I dont think you will see this error - as VS will setup your project correctly so that the error will not occur.

Ok - now what do you do if you have an existing project that was created by selecting just the "ASP.Net Web Site" option.

Turns out that all the errors arise from the Web.Config file not having all the correct entries required for you to "AJAXify" the web site.

Here is what you do:

(I am assuming that your project already contains a web.config file)

If you look in the ASP.Net AJAX install folder you will find a sample web.config that shows all the configuration items that you need to setup. (This is typically the folder - C:\Program Files\Microsoft ASP.NET\ASP.NET 2.0 AJAX Extensions\currentVersion)

Under <configuration><configSections> add the following text.

<sectionGroup name="system.web.extensions" type="System.Web.Configuration.SystemWebExtensionsSectionGroup, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">
      <sectionGroup name="scripting" type="System.Web.Configuration.ScriptingSectionGroup, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">
          <section name="scriptResourceHandler" type="System.Web.Configuration.ScriptingScriptResourceHandlerSection, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false" allowDefinition="MachineToApplication"/>
        <sectionGroup name="webServices" type="System.Web.Configuration.ScriptingWebServicesSectionGroup, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">
          <section name="jsonSerialization" type="System.Web.Configuration.ScriptingJsonSerializationSection, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false" allowDefinition="Everywhere" />
          <section name="profileService" type="System.Web.Configuration.ScriptingProfileServiceSection, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false" allowDefinition="MachineToApplication" />
          <section name="authenticationService" type="System.Web.Configuration.ScriptingAuthenticationServiceSection, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false" allowDefinition="MachineToApplication" />


Next under <system.web> add the following text

        <add tagPrefix="asp" namespace="System.Web.UI" assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>

Also under <system.web> make sure that you have the following entry (which goes under <system.web><compilation><assemblies>:

<add assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>

Also make sure that <system.web> has the following entries for httpHandlers and httpModules

      <remove verb="*" path="*.asmx"/>
      <add verb="*" path="*.asmx" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
      <add verb="*" path="*_AppService.axd" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
      <add verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" validate="false"/>

      <add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>

And that should be it. You should be in business and your web site should be AJAXed.

Final word, after googling this error - I found that there might be many different reasons for this error. This one is the most rudimentary and worth testing out first, before going down a more in-depth path in trying to determine the source of this issue.

Here is an excellent blog post that goes into the depths about this error -

Sunday, July 27, 2008

trueSpace for Virtual Earth 3D Development

trueSpace, which has been around for 23 years is a 3D modeling tool developed by Caligari. Last year Caligari was acquired by Microsoft, and last week they released trueSpace as a free product. trueSpace is similar to SketchUp, in that, SketchUp is used to create building models for GoogleEarth and Microsoft intends users to use trueSpace to create models for Virtual Earth. trueSpace seems to be more similar to tools such as Maya then to SketchUp, which kinda intimidates me. Traditionally 3D tools have a very steep learning curve. Where-as SketchUp had extremely intuitive and easy to learn tools that made it a breeze to build models. (But it is this simplicity that also makes its feature set a lot more limited when compared to trueSpace).

Read Announcing trueSpace for Virtual Earth 3D Development, to see what features of trueSpace make it a great tool for creating models for Virtual Earth. Also check out the very cool video in that blog post, which show cases what is possible using trueSpace.

My only gripe with the tool at this point is that it does not support the Collada file format. Because if it did, then it would mean that you could create models that could be used in Google Earth, as well as import models from GoogleEarth for editing in trueSpace.

Overwatch to Host Free Software Training At ESRI User Conference

imageOverwatch Geospatial Systems, an operating unit of Textron Systems, a Textron Inc. (NYSE: TXT) company, will provide free geospatial data production training for “Building 3-D City Models from Imagery and LIDAR.” The training is scheduled for Friday, August 8, 2008 at San Diego State University and space is limited to the first 20 registered attendees.

The training will develop feature extraction skills to build, analyze and publish a 3D city model from satellite imagery and airborne LIDAR data using the Feature Analyst®, LIDAR Analyst® and Urban Analyst™ software.  Seats are limited, and registration is needed prior to attendance.  Those who would like more information can email Marilyn Lee at

Overwatch Geospatial Systems will also host a user group meeting on Wednesday, August 6, 2008 from 1:00 to 2:30 p.m. in room 23 C of the San Diego Convention Center.  The meeting will showcase feature extraction projects using the Feature Analyst, LIDAR Analyst and Urban Analyst software as well as preview new tools planned of the 5.0 release.  Attendees are welcome to bring questions and provide input during the session.

Ignore your assets and they could disappear.

FYI! - From a recent ING Direct mailing.

So you've put some money away. And you're just letting it sit there and grow. Or maybe you've stashed away some valuables in a safe deposit box. If you haven't touched either in three to five years, you may never touch them again. It's all because of state laws - called escheatment or unclaimed property laws - that require banks and brokerages to turn over unclaimed property, including un-cashed payroll checks, stock, bank deposits and more, to the State. Property is classified as "unclaimed" when a Customer doesn't contact the bank where his/her money is held over an extended period of time and there has been no activity.

The State government is then supposed to identify and contact the rightful owners, and reunite them with their property; however, each State has a "who's who" list of people who "couldn't be found" and whose property has been seized. For more info, visit

Thursday, July 24, 2008

LASIK - results so far

If you have been reading my blog, you by now know that I have had LASIK surgery done on both my eyes (my LASIK posts).

Its been a really long while since I last posted about my post surgery results - almost four months. Right after my surgery I was having dry eyes and it was reducing. But over the last 3 months - I have had chronic dry eyes and my eye-sight hadn't yet reached 20/20. After waiting for 3 months to pass after my LASIK surgery, the doctor decided to put in some "Punctal" plugs - which block the lower eye lid tear ducts. This was in the hope of reducing the dry eyes that I was experiencing.

Your eye doctor can insert punctal plugs into your tear ducts, to keep eye moisture from draining too fast.


I have had the punctal plugs in my eyes for about 2 weeks now. The dry eyes are still there, but my eye-sight is improving.... (in my last check up - I had gotten close to 20/15).

At this point this is what I can recommend to you:

If you are following my LASIK experience to decide if you should also get LASIK done - then wait a little while longer - to see if my dry eyes syndrome gets any better. I work for 8 to 10 hours a day on the computer and on some days when the dry eyes are bad, I really wish that I hadn't gotten the surgery done.

At this point - I am hoping that with time the dry eyes will get better and my eyes will stabilize at 20/20. Until then I will be praying and hoping and waiting.

As shown here, dry eyes can become red and irritated.The biggest take away for you - would be, these posts are my experiences with LASIK. Yours might be vastly different depending on your eyes and possibly the LASIK machine that you use (I used ICON LASIK, which uses NIDEK machines and I wonder sometimes, if I had used VISX customVue, if my results would have been different).

At the end - LASIK is a surgery, an irreversible one and comes with risks that you have to weigh before undertaking the surgery.


Wednesday, July 23, 2008

Getting started with MS SQLServer Express - The first thing to do

Update: Rick pointed out to me that there is a better version of SQL Server Express that you can install, which comes with SSMSE and some other advanced tools and services. Check it out at Microsoft SQL Server 2005 Express Edition with Advanced Services (SP2).

Also, I found "SQL Server Migration Assistant for Access", which makes it extremely easy to port your existing Access databases into SQL Server 2005. (More migration tools available at

In my opinion the first thing one should do after installing SQLServer Express is to go and download and install "Microsoft SQL Server Management Studio Express".

SQLServer Express does not come with any tools that allow you to work with the database directly. The only method of interacting with the system is using the command line tools OSQL and SQLCmd. But for some reason I just could not get anything done using these 2 command line tools. Finally I found "SSMSE" a great little visual tool - that allows you to connect and interact with the database engine.

Finally I can get some testing done! Not sure why Microsoft does not include it with their SQLExpress install.


And if you are having connectivity issues - then check out this post - which has tons of useful information to debug that sort of a problem.

Tuesday, July 22, 2008

Using the Stopwatch Class for performing timing

images Previously I used to use the DateTime structure to determine elapsed time, especially for performance timing. DateTime is extremely easy to use but cannot be used to measure small spans of time.

With .NET 2.0, MS released the Stopwatch class. The main reason that this class is superior for performing really small measurements of elapsed time is that the Stopwatch class will use the hardware's high resolution performance counters if one is available. In addition the Stopwatch class counts the ticks that have elapsed, instead of the actual time. If a high resolution counter is not available - then the class will default to using the system's timer.


Here is how you can use it:

   1:  long ticks, totalTime;
2: long timeInMicroSeconds = 1000000L;
3: long timeInNanoSeconds = 1000000000L;
4: Stopwatch sw = new Stopwatch();
5: long freq = Stopwatch.Frequency;
6: sw.Start();
8: //////////////////////////////
9: //Code that needs to be timed
  10:              //////////////////////////////
12: sw.Stop();
13: ticks = sw.ElapsedTicks;
14: totalTime = timeInMicroSeconds * ticks/freq ; // use timeInNanoSeconds, if you want the elapsed time in Nano seconds

Read more at MSDN - Stopwatch Class (System.Diagnostics)

Some stuff that you did not know about Strings in .NET

  1. Did you know that all literal strings (string values known at compile time)  that have the same values will point at the same location.
    1. The reason for this is a .NET optimization called Intern Tables
  2. All strings created at run-time will be stored at separate memory addresses.
  3. Strings created at run-time can be interned too.
    1. var s1 = String.Format("{0} {1}", "Hello", "World");
    2. var s2 = String.Format("{0} {1}", "Hello", "World"); //s1 and s2 are stored at separate memory addresses
    3. var internedS1 = String.Intern( s1 ); 
    4. var internedS2 = String.Intern( s2 ); //internedS1 and internedS2 point to the same memory
  4. You can determine if a string is interned using the IsInterned method.


String Comparison

Different ways available to compare strings:

1. The String class’s instance Equals method

Calling convention: sLHS.Equals( sRHS)

Checks the values of the strings

Does not check for reference equality

2. The String class’s static Equals method

Calling convention: String.Equals(sLHS, sRHS);

First checks for reference equality and then performs the same checks as the instance Equals method.

Potentially faster than option 1, especially if many interned strings are present

3. The equality operator (==)

Calling convention: sLHS == sRHS

Uses the String class's static Equals method

Faster than 1 but slower than 2, as an extra call has to be made from the == method

4. The String class’s instance CompareTo method

Calling convention: sLHS.CompareTo(sRHS)

This is slow as it performs a much more indepth comparison of the the strings, taking into account information about culture, etc.

5. The String class’s static Compare method

Calling convention: String.Compare(sLHS,sRHS)

This too is much slower than options 1 to 4 as it uses a much more in-depth checking mechanism similar to the instance CompareTo method. Also provides useful overloads that allow you to perform comparisons that ignore case, etc.

6. .NET’s Regular Expression static RegEx.IsMatch method

This uses .NET's Regular Expression mechanism to compare and match strings. Certainly the slowest of all the available comparison methods.

Take away:

If performance is critical - then use either the instance or static Equals methods.If versatility is important and you want comparisons to work on strings originating from different cultures than stick to CompareTo or the static Compare methods.

More in-depth information is available at Stringing along in .NET… « akutz’s blog

Can You Spot the Chinese Nuclear Sub? | Weapons & Security | DISCOVER Magazine

Here is a good article on the history and current state of satellite imagery.

Can You Spot the Chinese Nuclear Sub? | Weapons & Security | DISCOVER Magazine

Output Fil

Satellite image of Area 51, captured by one of GeoEye's satellites.

Did you know...

There is one residence on the planet famously obscured by Google Earth: the Naval Observatory, official home of the vice president of the United States. Yet even Dick Cheney can’t escape the long arm of the Internet—a clear image of the Naval Observatory is available on Yahoo.

Sunday, July 20, 2008


The latest music video by RadioHead was made with LIDAR data. They used the mobile Velodyne system for the portions that show complete environments. For 3D plots of the singers a system from GeoMetric Informatics was used. The Velodyne system was the same system used by the top 2 robot cars in the DARPA Urban challenge (link).

And if you don't know what LIDAR is - it stands for LIght Detection And Ranging. It works on a similar principle as RADAR and SONAR, except instead of radio waves or sound waves - it uses light to determine distance between the sensor and the reflecting surface. And as it is using light (typically lasers), it has a very high resolution.

In what is probably a first for a music group, RadioHead has open sourced their 3D data used in the video. Check it out at RA DIOHEA_D / HOU SE OF_C ARDS - Google Code

The making of the video, video has some in-sights into the technology used.

Finally, as you can see from the video - LIDAR data is just a point cloud. It is too fragmented and abstract to be of any real use without any sort of post-processing.


VLS is currently developing the Urban 3D modeling toolkit that will allow one to extract 3D models from point clouds such as those collected by the Velodyne system. (Shameless self plug - I was the lead engineer on the LIDAR based automated feature extraction software that VLS is working on). Keep track of the VLS website to see when they release a commercial version of the tool-kit which will allow you to go from point cloud to fully rendered 3D models with just a click.

And as always there is always the trusty old LIDAR Analyst application that can be used to make sense of 3D point clouds extracted from airborne vehicles.

Also here is a good article that goes into the latest advancements in LIDAR and features that you might see in a future version of LIDAR Analyst. Imaging Notes Magazine - LiDAR Advances & Challenges

And here is one of the papers that I co-authored on AFE from terrestrial LIDAR systems. AUTOMATED 3-D FEATURE EXTRACTION FROM TERRESTRIAL AND AIRBORNE

As a final thought - I never expected to see a video completely made with 3D point cloud data, at least not as early as this RadioHead video. Very cool!

DSLR Shootout: Five Top Cameras Compared - - PopPhotoAugust 2008


Popular Photography has released it's top 5 Digital SLR cameras for under $1000 .

And here are the results:

1 Canon EOS Rebel XSi 23 points

2 Nikon D60 17 points

3 Pentax K200D (tie) 15 points

3 Sony Alpha 350 (tie) 15 points

5 Olympus E-520 10 points

DSLR Shootout: Five Top Cameras Compared - - PopPhotoAugust 2008

Which one do I have? I bought the Nikon D40 about 6 months ago. It is about $300 cheaper than the D60 (but only has a 7mp sensor compared to the D60s 10mp sensor). But I rather spend the savings on an extra lens. So I bought a Nikon 55mm - 200mm VR lens for about $225. And I am really happy with my setup.

Checkout pictures taken with the Nikon D40 -

And here is a link to my photostream - which has pictures taken from 3 different cameras, most of the newest ones are with my D40.


Created with Admarket's flickrSLiDR.

A word that is worth $10. SnagIt Coupon Code

snagit-box SnagIt is probably the best screen capture utility that I have ever come across. But it is not free. So if MWSnap or one of the other free tools don't cut it for you - at least save yourself $10 and use the coupon code SNUG. (It last worked on July 14th, 2008).

SnagIt 9.0 is the most current version of this screen capture tool.

I have a license for 6.3 and I am eligible to upgrade to this latest version - so I am going to save myself $30 and go get it for $19.95.

Saturday, July 19, 2008

YAAOSCS - Yet another article on Spatial Coordinate Systems

And we return to regular programming..... (after a couple of off-topic posts)

SQL 2008 is spatially enabled and hence to educate the masses, MS has released an article that tries yet again to explain Spatial Coordinate Systems. Oh! the bother of having a spherical planet that needs to be displayed on flat-screens.

Introduction to Spatial Coordinate Systems: Flat Maps for a Round Planet

This one is pretty good too.


City of Chennai Park

One of the sister cities of Denver is Chennai, the city I was born in. I found out that Denver has also dedicated a park to her sister city and today I found it and took this picture of it.

City of Chennai Park

It is located at the intersection of S.Quebec st and Iowa Ave.

View Larger Map

And here is more information about the Sister Cities program and about the park itself.

Friday, July 18, 2008

White crosses along Montana's highways

I had lived in Montana for almost 7 years. In all that time, I had seen many white crosses erected along roads. I assumed that the crosses marked fatal accidents, but like many others, I too wondered about who put them there. I was wrongly even told that it was a Native American tradition to mark fatal accidents with these crosses.

On my last trip to Billings, MT, while driving on the Bear-tooth highway, I finally found out the truth behind these crosses:

  • The crosses do represent highway fatalities
  • Each cross represents one fatality
  • They are a program of the American Legion of Montana and has been in existence from 1953, at which point it became an approved program of the Department of Transportation of Montana.
  • The markers can be erected only along Montana highways, as a Federal court ruled that they were illegal along InterState highways (bet you didn't know that)

Read more about the program at "White Cross Information"

I am not sure if such a program exists in other states. I have not seen these in Colorado. I think that they are a very good way to remind road users of slowing down and driving more carefully. More states should definitely adopt such programs.

Here are some pictures from "The Adventure Rider"

33866033-M 33866041-M

 33867161-M 33867142-M

And from Tim Traveler's Blog


On a side note, Montana has always done well with road side messages. They currently have a series of signs created by high-school students that attempt to dissuade teens from trying it even once. ( The program is called "Paint the State"

main_image08 main_image8

Useful Developer Tools - Free Screen Shot tool

Here is a great little free screen capture tool called MWSnap. It has very similar capabilities to SnagIT. Try it out.


Selected features (from Mirek's site)

  • 5 snapping modes.
  • Support for BMP, JPG, TIFF, PNG and GIF formats, with selected color depth and quality settings.
  • System-wide hotkeys.
  • Clipboard copy/paste.
  • Printing.
  • Auto-saving, auto-printing.
  • Auto-start with Windows.
  • Minimizing to system tray.
  • An auto-extending list of fixed sizes, perfect for snapping images for icons and glyphs. 
  • A zoom tool for magnifying selected parts of the screen.
  • A ruler tool for measuring screen objects lengths.
  • A color picker showing screen colors with separated RGB parts.
  • Fast picture viewer.
  • Adding frames and mouse pointer images.
  • Multilevel configurable undo and redo.
  • Multilingual versions.
  • Configurable user interface.
  • And more...

Where do you insert the serial number for TFS?

Where do you you insert the serial number for Team Foundation Server?

This is not answered in any of the documentation that is provided for TFS nor could I find any online forum. It certainly is not through the products supported by TFS (Visual Studio or Team Explorer).

Here is how you insert your serial number (product key) to upgrade from trial to fully licensed installation.

Go to Add/Remove Programs and select "Change/Remove".


The next screen will allow you to insert the product key.


Wednesday, July 16, 2008

Conditional Compilation in ASP.Net WebSite projects

In ASP.Net 2.0 if you create a Web-Site project, then you don't have a way to specify "Conditonal Compilation Constants" as Web Site projects don't have a properties page. So what do you do if you need to use Conditional Compilation Constants such as DEBUG, RELEASE, etc to perform conditional compilation?

Here is the only way I found out how to do this:

You need to edit the Web.Config file for the project and add the following section under Configuration:

               language="c#;cs;csharp" extension=".cs"
               type="Microsoft.CSharp.CSharpCodeProvider, System, Version=, Culture=neutral, PublicKeyToken=b77a5c561934e089" />


If you already have a system.codedom section (which is the case with Visual Studio 2008), then just copy the compiler section from above into your Web.Config file.

The following is how the system.codedom section looks in VS 2008.

        <compiler language="c#;cs;csharp" extension=".cs" warningLevel="4"
                  type="Microsoft.CSharp.CSharpCodeProvider, System, Version=, Culture=neutral, PublicKeyToken=b77a5c561934e089">
          <providerOption name="CompilerVersion" value="v3.5"/>
          <providerOption name="WarnAsError" value="false"/>
        <compiler language="vb;vbs;visualbasic;vbscript" extension=".vb" warningLevel="4"
                  type="Microsoft.VisualBasic.VBCodeProvider, System, Version=, Culture=neutral, PublicKeyToken=b77a5c561934e089">
          <providerOption name="CompilerVersion" value="v3.5"/>
          <providerOption name="OptionInfer" value="true"/>
          <providerOption name="WarnAsError" value="false"/>
               language="c#;cs;csharp" extension=".cs"
               type="Microsoft.CSharp.CSharpCodeProvider, System, Version=, Culture=neutral, PublicKeyToken=b77a5c561934e089" />


Finally to add your own Conditional Compilation Constants, add it to the compilerOptions line, seperating each constant with a semi-colan (;).

Unable to view Team Foundation Server Install Guide

Recently I downloaded the Team Foundation Server Install Guide from Microsoft's website and I was unable to use it. The guide is in CHM format and when I double click it I get the following message "Do you want to open this file?" and when I click Open, this is what displays.


Basically I am unable to view the contents of the CHM file, even though the table of contents shows up correctly.

This problem could occur with any CHM file that you might have downloaded of the internet and the solution is pretty simple.

Right click on the CHM file and open the File Properties Dialog. Click on the Unblock button and then hit OK. You should be able to read the CHM file after that.


Sunday, July 13, 2008

Virtual Earth Demo

In this demo, the VE team shows how they can use geometric models with geo-referenced images to do some cool things like

1. remove haze from images

2. extrapolate image onto the surrounding terrain of the geometric model (2.30 minutes into the video, this is very cool)