Friday, May 29, 2015

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

2 Comments
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 virtual box are compatible with each other.

Updated environment for Vagrant and Virtual box in Windows 7 -
http://www.gisremotesensing.com/2016/09/solution-vagrant-stopped-working-open.html

Update
Working version as of 1/27/2017:
OS: Windows 7 Enterprise
Vagrant 1.9.1
Oracle VM Virtualbox - Version 5.1.14 r112924 (Qt5.6.2)

Friday, May 15, 2015

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

Be The First To Comment
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-

For my project, I used 32 bit installers and Python 2.7. Strictly follow the python Geospatial package dependency installation orders and do not mix the 64 bit and 32 bit dependencies

STEP 2. Install the Tiler tools

Download and unzip the Tiler tool from: http://sourceforge.net/p/tilers-tools/wiki/WinInstall/

STEP 3. Set Python and Gdal path in Tiler’s bat file

Open : tilers-tools.bat from unzipped Tiler tool
         set PYTHON=C:\Python27 ( As you assigned the path in Step 1)
         set GDAL=C:\Program Files (x86)\GDAL ( As you assigned the path in Step 1)

STEP 4. Environmental variable setting on your machine

Set GDAL_DATA & path in your environmental variable setting.

                   Variable          Value

       GDAL_DATA = C:\Program Files (x86)\GDAL\gdal-data

        path = C:\Program Files (x86)\GDAL

Tuesday, May 12, 2015

Easy 5 steps to get thumbnails out of Pdf using Python

Be The First To Comment
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=fileDirectory+outFileName)  
 display(image)  



5) Let me know if you have any trouble.

 

© 2011 GIS and Remote Sensing Tools, Tips and more .. ToS | Privacy Policy | Sitemap

About Me