Sunday, October 20, 2013

Setting up a 3G/4G Wifi network on the GO!

I have been using the Tata Photon Plus internet dongle for quite sometime now. I have a nice and reliable network at my home, work and on the go. The difficulty is sharing the network with my other devices (phone, tab, other laptop, wife's phone). I tried the Virtual Router hotspot software, but it just didn't cut it and you will always need a laptop powered on.

I Goggle-ed  the net for a Wifi router to which I can attach my 3G dongle directly and aftersome searching I selected TP-LINK TL-MR3020 

 

The router is powered using a micro USB cable which can be attached to your laptop or a power adapter (provided with the router)

It took me under a 15 minutes to unpack and configure the router. It has a nice and simple web-based interface for configuration and monitoring. Power on and connect to the wifi router, just type 192.168.0.254 in our network browser.


The first thing you should do is change the admin password.

Then follow the Quick Setup and connect to your 3G service
Step1

Step 2
Select your location and the ISP provider. For India, aprt from Tata it includes Airtel, BPL, BSNL, Idea, MTNL, Orange, Reliance, Spice and Vodafone.

Keep the authentication to Auto. The rest of the field are populated based on your ISP.

Step 3

Enter a unique name for your Network and set a password (do not set it to 987654321 ;-)  )

Finally.

Check your 3G network Strength on the Status link
Try placing the the router at different locations so as to get good signal strength.

Now connect your devices and enjoy your new WIFI  :-)



Thursday, October 10, 2013

Creating Powershell Cmdlet fot ArcGIS!

Combining two projects
This is a exploratory post for creating a Powershell GIS Cmdlet. I have taken basic examples of Creating Powershell Cmdlet and creating a ArcGIS Console Application. I have tried to combine the code to create a cmdlet which returns the Map names and the Feature layer names.

SourceCode for the projects
Link to the tutorials
ArcGIS Console Application 
Powershell Cmdlet Tutorial  

Create a ArcGIS class library project



Follow the procedure to add references as per the Powershell tutorial
Hint: If you are on x64 machine System.Management.Automation is found under
c:\program files (x86)\reference assemblies\microsoft\WindowsPowershell\v1.0

Rename the Class1.cs file to "GetLayerName" and click on Yes when asked to update all references

Add the "LicenseInitializer.cs" from the ArcGIS Console Application Source-code to GetLayerNameCmdlet project.

Open the LicenseInitializer.cs file and update the namespace to GetLayerNamesCmdlet, click yes when asked to update references.


Lets have a look at the GetLayerName.cs file


`
We can Pipe this output to other commands.

Run Visual Studio as an Administrator and build the code.

Open the Powershell command windows. ( I am using Console2, its awesome! check out Scott Hanselman's take on Console2)

Use the Import-Module command to import the developed DLL. Use the Get-Module command to verify.


Use the command Get-LayerNames and pass the MXD file path as a parameter

The command displays the Map name as "Layers" and the Feature Layers participating in the map.

Please post your comments and ideas for new cmdlets.





Tuesday, October 8, 2013

Export To Excel Add-In for ArcGIS 10.1

Export To Excel Add-In for ArcGIS 10.1

Step 1
Add required Feature Class to ArcMap

Step II
Select required features using the select tool or selecting records in table





Step III
Click on the Export to Excel Button


Thursday, June 28, 2012

Access Bing maps service via network proxy

Yesterday we fell for a nasty trap setup by the network security team. We were adding a Bing maps service to our ArcGIS Server 10 web application using the ArcGIS manager. Sounds easy just follow the help file and your done, NAAH!

There began our excruciating journey in the Google's search valley. Searching for every possible reasons we could imagine right to the spells for getting rid of the Gremlins. As usual not much is available for ESRI. But then we stumbled upon a nifty spell called ArcGIS KB 35445, bless the soul who created it.

We cast the spell on the ProxyServer.config located in deep crevices of the install folder "C:\Program Files\ArcGIS\Server10.0\DotNet" ( for 64bit in Program File (x86)).

We followed the spell line by line and voila our problems were resolved!

Tip: Use capital case for DOMAIN\USERNAME.