Fear of change

“It takes courage to let go of the familiar and embrace the new”.

Recently I talked to one of my close friends who was asked to resign for no valid reason. When I dug deep, he
accepted the fact that it may be due to conflict between his push to adopt new learning and the fear of change in the mindset of one senior manager. This guy is leading the software division and happily claims to be a non- technical resource in a technology company.                                                                                                                                                 Quite surprising! Isn’t it.
More surprising was I, when my friend told me that this guy stopped him to impart advanced Python training by quoting directly that “this is not a training institute”. These words were from this guy, as my friend completed beginners level Python training to 30-40 personnel. The feedback was satisfactory.
My friend was pursuing part time MBA from a reputed management institute and his endeavor to change and adopt new technologies like Python, R and Data Sciences had actually worked against his image. This senior manager  was fearful of change. He was unable to accept the initiatives by his junior.
Sadly this may be a common situation in some companies.
It is therefore high time that upper management of these so called best place to work for companies wake up  and analyze the mindsets of senior managers.

It’s the high time and in future there will be ‘No Time’.

Posted in Management | Leave a comment

ESRI ArcGIS Server Java Script API, Geoenrichment

It’s not hard to create a map and overlay one set of data on it – well, at least not with ArcGIS Online. But what if your users really want to see several types of data, such as demographics, just around particular spots on the map, so they can easily hone in on what matters and compare apples to apples from one spot’s data to another? They could be kind of stuck without a developer like you.

http://blogs.esri.com/esri/arcgis/2013/09/03/javascript-developers-meet-geoenrichment/

| Leave a comment

Switch on labels

Here is a small piece of code, which can be used to switch on labels. Why do I feel it to be on the post?  Well, due to its simplicity. Have a look: –

Public Sub SwitchOnLabels(pFeatLayer As IFeatureLayer, DisplayField As String)

Dim pGFLayer As IGeoFeatureLayer
Set pGFLayer = pFeatLayer

Dim pLabelEngine As ILabelEngineLayerProperties
Set pLabelEngine = New LabelEngineLayerProperties
Dim pAnnoLayerProps As IAnnotateLayerProperties

Set pAnnoLayerProps = pLabelEngine
Set pAnnoLayerProps.FeatureLayer = pGFLayer

Dim exp As String
exp = "[" & DisplayField & "]"
pLabelEngine.Expression = exp
pLabelEngine.IsExpressionSimple = True
pGFLayer.AnnotationProperties.Clear
pGFLayer.AnnotationProperties.Add pLabelEngine
pGFLayer.DisplayAnnotation = True
End Sub

Posted in ArcObjects with Visual Basic | Leave a comment

Dissolve

The following VB 6.0 sub- procedure can be used to dissolve features based upon desired attribute fields: –

Public Sub GPDissolve(strIn, strOut, disField As String)

On Error GoTo EH
Dim GP As IGeoProcessor
Set GP = New GeoProcessor

GP.OverwriteOutput = True

Dim GPU As IGPUtilities
Set GPU = New GPUtilities

'Declare and set a variant array to hold the parameters
Dim parameters As IVariantArray
Set parameters = New VarArray

'Populate the variant array with the parameters
parameters.Add strIn '(in_features)
parameters.Add strOut '(out_feature_class)
parameters.Add disField '(dissolve_field)
parameters.Add "AREA SUM"

'Now execute the Dissolve tool
GP.Execute "Dissolve_management", parameters, Nothing

Exit Sub
EH:
'Show all application errors, and severe GeoProcessor messages
MsgBox "A Runtime Error Occured. Error Number: " & CStr(Err.Number) & _
vbCrLf & "Error Description: " & Err.Description & vbCrLf & vbCrLf & "GP Message: " & GP.GetMessages(2), vbExclamation + vbOKOnly
End Sub

Posted in ArcObjects with Visual Basic | Leave a comment

KML Network Link

Network Links are great ways to reference KML or KMZ files archive on a local or remote location. You can use the element to specify the location of the KML file. Within that element, you can define the refresh options for updating the file, based on time and camera change. NetworkLinks can be used in combination with Regions to handle very large datasets efficiently. Following is a code snippet in C# : –

public void AddSensorNetworkLink(XmlDocument doc, XmlNode DocumentNode, string sensor, string URL)
{
XmlNode NetworkLinkNode = doc.CreateElement("NetworkLink");
DocumentNode.AppendChild(NetworkLinkNode);
XmlNode nameNode = doc.CreateElement("name");
nameNode.AppendChild(doc.CreateTextNode(sensor));
NetworkLinkNode.AppendChild(nameNode);

XmlNode LinkNode = doc.CreateElement("Link");
NetworkLinkNode.AppendChild(LinkNode);
XmlNode hrefNode = doc.CreateElement("href");
hrefNode.AppendChild(doc.CreateTextNode(URL));
LinkNode.AppendChild(hrefNode);
}

Posted in ArcObjects with Visual C# .NET | Leave a comment

Create polygon in a KML file

Folks
The following C# code will help you in creating a polygon for Google Earth based KML file. Have a look: –

public void AddPolygon(XmlDocument doc, XmlNode DocumentNode, int lat, int lon, int gridsize, string name, string id)
{
XmlNode PlacemarkNode = doc.CreateElement("Placemark");
DocumentNode.AppendChild(PlacemarkNode);
XmlNode nameNode = doc.CreateElement("name");
nameNode.AppendChild(doc.CreateTextNode(name));
PlacemarkNode.AppendChild(nameNode);
XmlNode StyleNode = doc.CreateElement("styleUrl");
StyleNode.AppendChild(doc.CreateTextNode(id));
PlacemarkNode.AppendChild(StyleNode);
XmlNode PolyNode = doc.CreateElement("Polygon");
PlacemarkNode.AppendChild(PolyNode);
XmlNode tessNode = doc.CreateElement("tessellate");
tessNode.AppendChild(doc.CreateTextNode("1"));
PolyNode.AppendChild(tessNode);
XmlNode altNode = doc.CreateElement("altitudeMode");
altNode.AppendChild(doc.CreateTextNode("clampToGround"));
PolyNode.AppendChild(altNode);
XmlNode BoundNode = doc.CreateElement("outerBoundaryIs");
PolyNode.AppendChild(BoundNode);
XmlNode LineNode = doc.CreateElement("LinearRing");
BoundNode.AppendChild(LineNode);
XmlNode coordinateNode = doc.CreateElement("coordinates");

string coord = lon.ToString() + "," + lat.ToString() + ",0," + Convert.ToString(lon + gridsize) + "," + lat.ToString() + ",0," + Convert.ToString(lon + gridsize) + "," + Convert.ToString(lat + gridsize) + ",0," + lon.ToString() + "," + Convert.ToString(lat + gridsize) + ",0," + lon.ToString() + "," + lat.ToString()+ ",0";

coordinateNode.AppendChild(doc.CreateTextNode(coord));
LineNode.AppendChild(coordinateNode);
}

Posted in ArcObjects with Visual C# .NET | Leave a comment

ArcHydro

Arc Hydro has been designed to represent data from hydrography and hydrology, thereby creating a basis for obtaining a deeper understanding of surface water systems. The Arc Hydro tools are a set of utilities developed on top of the Arc Hydro data model. They operate in the ArcGIS environment. Some of the functions require the Spatial and 3D Analyst extensions. More on this in a technical paper presented on the occasion of Map India 2004: –

http://www.gisdevelopment.net/application/nrm/water/watershed/mi04069.htm

Posted in Technical Papers | Leave a comment