Posts

Capitalize each word after forward slash in Java Script : Code snippet

function getFormattedText() { var formattedString= capitalizedTextAfterBackslash("Red spruce / balsam fir/tamarack"); alert(formattedString); }; function capitalizedTextAfterBackslash(str){ var temp= str.split("\/"); for(var i=0; i<temp.length; i++) { temp[i] = temp[i].trim(); temp[i] = temp[i].substr(0,1).toUpperCase() + temp[i].substr(1,temp[i].length-1); } return temp.join(' / '); }

Building ArcMap’s Add-in using command line

Image
Couple of days I have been spending on creating a build automation for ArcMap’s Add-in using Jenkins . In order to accomplish that I need to able to build my visual studio add-in solution using MSBuild.exe . When I try to build the solution using via command line – msbuild.exe MyArcMapAddin.sln /t:Clean,Build The console throws the following error-   (PrePackageArcGISAddIn target) ->   C:\Program Files (x86)\MSBuild\ESRI\ESRI.ArcGIS.AddIns.targets(37,5): error MSB4062: The "ValidateAddInXMLTask" task could not be loaded from the assembly ESRI.ArcGIS.AddIns.SDK, Version=10.0.0.0, Culture=neutral, PublicKeyToken=8fc3cc631e44ad86. Could not load file or assembly 'Microsoft.VisualStudio.Shell.9.0, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified. Confirm that the <UsingTask> declaration is correct, that the assembly and all its dependencies are avail...

[SOLVED] Vagrant & Virtualbox - The guest machine entered an invalid state while waiting for it to boot....

Last couple of days I was running a Virtualbox issue "The guest machine entered an invalid state while waiting for it to boot. Valid states are 'starting, running'. The machine is in the 'poweroff' state. Please verify everything is configured properly and try again." I had not clue how to fixed that and I have tried several versions and several installation. Then, then installation of Virtualbox 4.3.12 is working fine so far. If you are running into similar issue get  rid of all new Virtualbox versions and try with version 4.3.12,  VirtualBox-4.3.12-93733-Win.exe , that might helps you solve the problem. This version can be downloaded from:                                                http://dlc-cdn.sun.com/virtualbox/4.3.12/ Similarly, if you are using vagrant I recommend to use Vagrant 1.7.2. Please note that not all versions of vagrant and virtua...

Tiler tools, an alternative scripts to Gdal2tiles.py for creating raster tiles from digital maps

Image
Other day I was working to generate the Google Map based raster tiles using Gdal2tiles for a large raster file, 30GB in size. Gdal2tiels complains about the following error, which I had no clue. Then fiddling with others tilers available I played with the Tilers-tools , python Scripts for raster tile sets from digital maps with GDAL dependency. After spending few days hit and trial, finally I am able to generate raster tiles compatible with Google Maps. Here I am sharing the steps that I follow to produce tiles using the Tiler tool. Hope it will help some of the OSGeo users. I have divided tile generation steps into two groups, dependency installation and data preparation with a presumption that you are already familiar with GDAL . A] DEPENDENCY INSTALLATION STEP 1. Install Python geospatial packages Install the dependencies as described- https://github.com/GitHubRGI/geopackage-python/wiki/Installing-dependencies-on-Windows For my project, I used 32 bit inst...

Easy 5 steps to get thumbnails out of Pdf using Python

1) Install Ghost script before python dependencies installation from: http://www.a-pdf.com/convert-to-pdf/gs.exe 2) Make yourself familier with Wand , a  ctypes -based simple  ImageMagick  binding for Python. 3) Install Wand - pip install wand 4) Use the following script.. #Install Ghost script before python package's installation #from: http://www.a-pdf.com/convert-to-pdf/gs.exe   from wand.image import Image from wand.display import display fileDirectory = "D:/files/" inFileName="myInputfile.pdf" outFileName="myOutputfile.png" imageFromPdf = Image(filename=fileDirectory+inFileName) pages = len(imageFromPdf.sequence) print(pages) image = Image( width=imageFromPdf.width, height=imageFromPdf.height * pages ) for i in range(pages): image.composite( imageFromPdf.sequence[i], top=imageFromPdf.height * i, left=0 ) image.format="png" image.save(filename=f...

Plan for Future Landsat Program: NASA, USGS Begin Work on Landsat 9 to Continue Land Imaging Legacy

NASA and the U.S. Geological Survey (USGS) have started work on Landsat 9, planned to launch in 2023, which will extend the Earth-observing program’s record of land images to half a century.  The year 2023 seems like a long way off, however.   The Landsat program has provided accurate measurements of Earth’s land cover since 1972. With data from Landsat satellites, ecologists have tracked deforestation in South America, water managers have monitored irrigation of farmland in the American West, and researchers have watched the growth of cities worldwide. With the help of the program’s open archive, firefighters have assessed the severity of wildfires and scientists have mapped the retreat of mountain glaciers. The President’s fiscal year 2016 budget calls for initiation of a Landsat 9 spacecraft as an upgraded rebuild of Landsat 8, as well as development of a low-cost thermal infrared (TIR) free-flying satellite for launch in 2019 to reduce the risk of a data gap in this i...

How to remove twitter headers and footer from twitter widget?

There are two ways to remove twitter headers and footer from the widget: Method 1: Add data-chrome attribute to anchor tag <a class="twitter-timeline" href="https://twitter.com/TWITTER_ID" data-widget-id="YOUR_WIDGET_ID" data-chrome="nofooter noborders transparent" >Tweets by @TWITTER_ID </a> Method 2: Using CSS .timeline-header, .timeline-footer {           display:none ; } More customization on Embedded timelines :  Customization Options