Tool for Backing Up Your Blog or Downloading an Entire Website for Offline Browsing

I have just learned that a friend's blog site was hacked and was totally deleted. The incident alarmed me so much that the same thing could possibly happen to my blog hence I tried to look for possible means of backing it up.

An easy way to get all the posts in an XML feed. This is a better format if you intend to import it in a database.

You can also backup the comments:

Another option is to send your blogs to your e-mail for back-up.

Ultimately you may opt to use a third party software that downloads an entire site and have it saved in your local disk.

HTTrack is a free (GPL, libre/free software) and easy-to-use offline browser utility.
It allows you to download a World Wide Web site from the Internet to a local directory, building recursively all directories, getting HTML, images, and other files from the server to your computer. HTTrack arranges the original site's relative link-structure. Simply open a page of the "mirrored" website in your browser, and you can browse the site from link to link, as if you were viewing it online. HTTrack can also update an existing mirrored site, and resume interrupted downloads. HTTrack is fully configurable, and has an integrated help system.
WinHTTrack is the Windows 2000/XP/Vista/Seven release of HTTrack, and WebHTTrack the Linux/Unix/BSD release.

It pays to back things up as early as possible. An ounce of prevention is worth a pound of cure!


Run MacOS7, OpenOffice, VLC, Foxit Reader, GIMP, etc. directly from a USB drive

Now you can carry your favorite computer programs along with all of your bookmarks, settings, email and more with you. Use them on any Windows computer. All without leaving any personal data behind.

Portableapps.com provides a rich array of programs that you want included in your suite. Apart from your usual Windows Start Menu, PortableApps suite produces another sort-of start menu in your pc, that of which containing your selected portable applications.

I do not keep a printer at home, so as always, I would have to save all my stuffs on my USB drive and have the files printed at the nearest Internet Cafe. Oftentimes it annoys me that such "Internet" shops don't even have a pdf reader installed in their pc or at times didn't bother to consider installing openOffice Suite hence my .odt and .ods files can't be editted at all. But those are just simple but really very disappointing and oftentimes hopeless cases I have encountered before I discovered PortableApps. I even syndicated the site by subscribing through their RSS feeds. (boo  for so much of the reading list!)
 PortableApps.com Suite and PortableApps.com Platform V1.6 comes with the ff programs:
But ofcourse you can always choose what to include and what not to include in your array of portable programs by choosing from their download list:

Here are my picks:
1. OpenOffice.org Portable* (office suite)
2. Foxit Reader Portable (Freeware) - small and fast PDF reader
3. Mozilla Firefox, Portable Edition (web browser)
4. VLC Media Player Portable - An easy to use media player that plays most audio and video formats
5. BPBible Portable - bible study tool
6. Java Portable (Freeware) - Work with Java apps portably
7. Java Portable Launcher - Run Java JARs portably
8. PNotes Portable - sticky notes to go
9. PortableApps.com Installer - the easy way to package portable apps.
10. DownThemAll! Extension (for Firefox) - download the files and images you want faster
11. ClamWin Portable - Antivirus on the go

Its portable,it's free,it's open source ... the possibilities are almost endless! Way to go PortableApps.com.

Everything Search Engine- Lightweight Program that do search so fast.

For a work that's highly engaged in really terrible file-handling, memorizing filenames and their paths is really an oblivious task. "Everything" is the ultimate desktop search engine for me. Just pressing the hotkeys, which can be user-specified ofcourse, (it's CTRL+ALT+F for me), typing in just a few letters of the hinted file or folder name and voila the file I've been searching for  is already at my fingertips!

"Everything" is an administrative tool that locates files and folders by filename instantly for Windows.
Unlike Windows search "Everything" initially displays every file and folder on your computer (hence the name "Everything").
You type in a search filter to limit what files and folders are displayed.

What I like about Everything:
  • Boolean operators,regex and widcards can be used.
  • It loads lightning fast!
  • Can be assigned with a shortcut key
  • It monitors file system changes.
  • It opens in multiple windows.
  • It's lightweight and its FREE!
Ofcourse Everything has its own limitations: (nice status message for Facebook hah!)
  • compatible only with NTFS formatted volumes only. So if you want your external drives to be searchable by Everything just convert it from FAT-32 or FAT16 to NTFS volume.
  • works for Windows only (please tell me if there is one for Linux)
  • doesn't search file contents just files and folders only.
  • becomes so indispensable that when I don't have it I'm lost. I become so dependent with search everything that I almost don't have an idea where I save stuffs. 
Click here for free download. 

Deleting a file that can't be deleted, Removing a USB drive that can't be safely removed

I find this freeware very useful in safely removing flash disks and in deleting the cannot be deleted files! Unlocker is the ultimate unlocker assistant for me. Oftentimes it annoys me when an error message such as this appears on my screen.
It's either another program is trying to index the content of my drive or there has been a sharing violation. The clear thing is I cannot do what I'm suppose to do next. Good thing there is this Unlocker Assistant for me. It gives you the option to choose a specific program that will "Unlock" the file or "Unlock All" if you want to stop all programs from accessing your file or drive. Just right-click on the file or drive that you want to delete or remove respectively and choose from a menu for your next actions. 

I'm just glad someone out there took time to figure out how to solve this problem and spare me the headache on worrying much bigger problems than just safely removing my drive.

Click this link to download Unlocker Assistant

merge tabfiles and shapefiles in one single shapefile

GeoMerge is a free geoprocessing tool which combines  ESRI shapefiles into one shapefile and even merges shapefiles and MapInfo tabfiles and ESRI shapefile into a single shapefile. Files with the same column definitions in the .dbf files will be concatenated in the new shapefile.

Download GeoMerge.exe and see full details though this link.

Add Google Reader Shared Feed's Widget to Blogger

I have long been figuring out on how can I integrate my Google Reader shared feeds to my blogs.

Fortunately I came accross this link:

Just adjust some settings and  click on the icon similar to the icon below for seamless Reader-Blogger integration.

You just have to be logged in to your Blogger and Google account to enable embedding.

Creating GIS data: Importing from text files and other sources

Oftentimes we have some data begging to be included in our GIS but the file format just couldn't fit in. For example we have found the data over the internet and it is not in .dbf  or .gdb format. But as long as it has a coordinate system data (i.e. latitude, longitude) there is still a way to include that in our GIS project.

My latest GIS project is on including a delimited text layer in QGIS. QGIS supports the import of points only , while GRASS can accommodate all feature types in the GRASS vector model.

My GIS Project
What I have done is to map the location of all GPS campaign stations that our team has established since 1995. I have extracted the geographic location (latitude and longitude) information from the final coordinates file (FN*.crd) produced by Bernese 5.0 after post-processing the GPS data we have gathered on field. I have actually converted it from FILE format to .txt then imported the data in my GIS project.

The Steps
Firstly, I looked for a shapefile that covers the extent of the project. In my case, it's the entire Philippines. I have found a good site that offers free GIS data (shapefiles,.gdb, .kml etc.) and is documented in my past blog.  After loading the Philippine Administrative Boundaries layers in QGIS, my next step is to import the GPS stations data.

I have edited my GPSstations.txt file such that it will have a delimiter. I have used "|" as my delimiter. The header should include the labels for each  field:  Station |Longitude|Latitude (you can of course add some other fields if you wish to.)

In QGIS, just enable the "Add delimited text layer" in the Plugins menu.

Add your *.txt file then specify the Layer name. You should also state the delimiter. The default is \t.Specify if it is a regular expression or plain characters. In my case, "|" is a plain character. The X and Y fields are longitude and latitude respectively. Then press OK to load the layer.

In case you might want to use the delimited text layer for another project, you may opt to save the it as a shapefile by right clicking the layer in the legend choosing the "save as Shape File " option.

If you have for example some broken data where some fields or columns doesn't have any information in it, you may manually edit the blank field and include a "0" as its value. However if you know some programming, you may choose to run a script that does exactly the same task. You just have to do some tweaks on the code to enable it to fit in your delimited text layer's need. Here's a Ruby script that I have dug.

If there's no problem with the text layer that you have specified, QGIS will load it and will display a screen such as my final output below.  You may opt to save the result as an image through File< choose destination folder and type of image (*.png or *.jpg).

The campaign stations are part of the "Active Fault Deformation Project along the Philippine Fault " hence our  GPS network is concentrated along the Philippine Fault Zone.


Generating a single HTML file to download International GNSS Service (IGS) Stations via ftp

The GPS Project
I am part of the GPS-Active Fault Deformation Mapping project in the Philippines. Through GPS we are trying to study the kinematics of the Philippine Fault, the result of which aims to develop  a more comprehensive program on the evaluation of seismic hazards and risks as an essential component of earthquake disaster mitigation projects. 

Our team uses Bernese 5.0 for GPS post-processing. Bernese enables us to utilize nine (9) International GNSS Service (IGS) stations near the Philippines. Addition of these 9 IGS stations to our local campaign or continuous sites increase the accuracy and stability of our network. 
The IGS stations that we have included are the following: 
Mon. Name    Site Name      Lat        Long     Receiver
BAKO            Cibinong        -06 29   106 51   LEICA GRX1200GG
DAEJ             Taejon           36 24    127 22   Trimble NETRS
GUAM            Guam            13 26    144 48   Trimble NETR5
PIMO             Quezon City   14 38    121 05   Ashtech UZ-12
TSKB             Tsukuba         36 06    140 05  AOA BENCHMARK A
USUD            Usuda            36 08    138 22  Ashtech UZ-12
WUHN           Wuhan           30 32    114 21  Ashtech Z-XII3
SHAO            Shanghai        31 06    121 12  Ashtech UZ-12
DARW           Darwin           -12 51    131 08 LEICA GRX1200GG

The GPS Data Downloading
We download the daily GPS data from ftp://cddis.gsfc.nasa.gov/pub/gps/data/daily/. For campaign data, which usually lasts for more than 10 days, we are suppose to download 90+ data,the manual downloading is quite a problem because of the mechanical click and save for all the needed sites.
We devised a plethora of schemes to have an efficient downloading routine. We tried the batch download of Flashget. But we still have to manually define the nine stations and their respective interval dates of download and include wild cards(*) for the downloading of their respective dates. Quite tedious still. Next option is to make an HTML file that lists all the dates and all IGS stations in one file and using the DownThemAll add-on of Mozilla. That's more efficient than the first one. But the macros we have created in Notepad++ are still irritating. You have to specify the initial line including the dates, stations and interval before finally coming up to an HTML file.Until I had the time to create a small JAVA program that will output the same  HTML file. 
My JAVA programming project for the day
The getIGS.jar that I have created needs only three user inputs in one Message Dialog : year of observation, start day of the year of campaign and end day of the year of campaign. I have already incorporated the nine(9) IGS stations along with the HTML tags in the program. The program ends after asking for the path where to save the output HTML file. Presto our HTML file is ready for another DownThemAll job but less of the hassle on manual href tags editing and manual input!

Sadly I can't include my codes for now because the HTML tags in the code are jamming with the HTML code of this blog.

For a copy of the source code or the .jar file, just contact me: Its melanie.abuel@gmail.com or maybe I'll upload it in my DropBox some other time.



 +63-9175160785 / melanie.abuel@gmail.com

OBJECTIVE  Project Manager for GIS, GPS, Geodesy , Remote Sensing and Surveying fields

2010 to present College of Engineering, University of the Philippines - Diliman
                              Master of Science in Geomatics Engineering, major in Geoinformatics
·         Consistent University Scholar standing, GWA=1.31
·         Scholar, ERDT (Engineering Research and Development for Technology)
2002 to 2009      College of Engineering, University of the Philippines - Diliman
                              Bachelor of Science in Geodetic Engineering
·         College scholar for 2 semesters
·         Consistent Geodetic Engineering Study Grant Scholar
1992 to 2002      San Agustin Elementary School and Novaliches High School
·         Elementary and High School Class Valedictorian
Licensed Geodetic Engineer (Registration No. 8432)
9th placer in September 2009 Philippine Geodetic Engineering Licensure Exam


2011 to Present                Graduate Student at the University of thePhilippines, Diliman
                              THESIS: Synergistic Use of Geographic Information and Remote Sensing for the Hydrological Assessment of Impervious Surfaces in a Frequently-flooded Urban Environment
• Investigates on the effect of varying land uses a frequently flooded urban environment, differences in land used was characterized by variable degree of imperviousnesswithin and its relation to flooding.
• Major portion of the research has been dedicated for the accuracy assessment and generation of  a high-accuracy DEM extracted from LIDAR device. I have programmed the conversion from raw LIDAR data packets to a Binary LIDAR exchange format using Python and Matlab programming from scratch.

June 2009 to January 2012 Research Assistant for the Crustal Deformation Mapping of the Philippine Fault Project, Philippine Institute of Volcanology and Seismology (PHIVOLCS)
• Handles the GPS data processing of all campaigns from 1995 to 2010 as well as continuous site data from local and international partners while making sure that all operations involved in data processing are well implemented and results fall within the standards set on a millimeter-level accuracy.
• Speeds up the processing workflow by creating macros, windows batchfiles and programs that will aide in the automation of the entire GPS processing scheme using Bernese 5.0.
• Executes final quality control and evaluation of preliminary project results by plotting and analysis of post processed GPS data in MATLAB and GMT.
• Works with very minimal supervision since project leader is always out for fieldwork and the first and only female to be a part of the GPS team.

An assessment of the current GIS workflow of a government office as well as feasibility analysis for the use of free and open source WebGIS software as compared to commercial counterparts.

A geo visualization class project utilizing the Virtual Terrain Project, ArcScene and Google Earth that aims to create an initial database and interface in 3D that incorporates different layers of information that will identify crop suitability for certain locality. The database is designed to be populated and improved though participatory GIS and mapping. A comparative analysis of the different geoviz softwares has also been conducted in this project.

• Using statistical techniques, a regression analysis was conducted utilizing temperature, rainfall and relative humidity to identify its correlation with solar radiation. It was concluded that the most influential factors to predict solar radiation are mean temperature and solar duration. These two factors has a 94.4% capability to predict solar radiation.

An evaluation on the validity of published ASTER and SRTM DEMs in the Philippine setting. Discrepancies between different statistical measures of accuracy (RMSE, mean and standard deviation) are evaluated using differential GPS points as check points. Research proved that both ASTER and SRTM DEMs fall within specified published accuracies and SRTM is more accurate than ASTER DEM.
June to September 2010 CONSIDERING GEOGRAPHIC LOCATION IN THE DIAGNOSIS OF DISEASES (A case study of Dengue in Quezon City, Philippines from 2003-2010)
A geodatabase for dengue cases per barangay in Quezon City from 2003 to 2010 along with other five criteria for a weighted overlay in GIS created a final risk map for dengue. The study identified twenty-one barangays as dengue hotspots.

                An image processing software with man-machine interface was written using JAVA.Histogram equalization, High pass, low pass, Butterworth, Maximum, Mean, Median, MMSE and Rank Filtering, Gaussian Blur, Grey mapping, Laplace transform and Sobel Filtering are some image processing options available in the application.

Tasks include triangulation network planning , field reconnaissance using Garmin GPS, establishment and densification of GPS control point by Differential GPS using Epoch receiver ,GPS data processing using Ashtec Software and GNSS Studio and comparison of GPS heights with that of orthometric heights obtained by spirit leveling. Final mapping of UP Geoid Model using Surfer8.

Leads the group in data gathering, encoding, mapping and analysis of 2004-2008 UPCAT results and identified regions of interest based on a 15-parameter test executed in ArcGIS 9.1.

                “The Inventive Engineer: Patents and Commercialization” The 1st Engineering and Research for Technology Congress, Philippine International Convention Center, February 24, 2012

Short Course on Basic and Advanced GPS Data Analysis and Modeling for Scientific and Practical Applications”. November 28-December 2, 2011, National Engineering Center at UP Diliman.  
                “Sustainability through ERDT: Towards a Carbon-Neutral Economy” -Engineering Research and Development for Technology 7th Conference, Manila Hotel, September 16, 2011

“InSAR (Interferometric Synthetic Aperture Radar) Technical Training- 2011 Sentinel Asia Success Story in the Philippines” September 5-6, 2011, PHIVOLCS Auditorium

• March 8, 2011- 2nd Workshop and Joint Coordination Committee Meeting
February 23-24, 2010 - Kick-off Workshop and the 1st Joint Coordination Committee Meeting of Philippine Institute of Volcanology and Seismology (PHIVOLCS) , Japan International Cooperation Agency (JICA), Japan Science and Technology Agency (JST), National Research Institute of Earth Science and Disaster Prevention (NIED)

“ADDRESSING THE GRAND CHALLENGES THROUGH ENGINEERING INNOVATIONS” - The 6th ERDT Conference “- February 18, 2011, Diamond Hotel, Manila


“ACTIVE FAULT DEFORMATION MAPPING OF THE PHILIPPINE FAULT (Masbate Segment) PHIVOLCS GPS-GIA Project Fieldwork: September 12-24, 2009 - Assigned on setting up and operating Trimble 5700 and 4000 SSi receivers, recording field data and in conducting reference point mapping of newly established GPS campaign stations. Post processing and analysis was conducted after the field work.

“Web GIS, ENVIRONMENTAL ISSUES AND MULTI-AGENT SYSTEM CRASH COURSE”February 18, 2009 (Remote sensing and Image Analysis Laboratory, UP Diliman).

GIS – ArcGIS 10.0, QGIS,
GeoVisualization - Virtual Terrain Project, Google Sketch-up, Terragen, ArcScene
Remote Sensing – ENVI, SIGMA-SAR
Photogrammetry – LISA
Surveying – Autodesk Land Desktop, Trimble Geomantics Office, Bernese 5.0, Ashtec Software, Surfer 8.0, Generic Mapping Tools (GMT), Matlab 2009
Programming – J2SE on Netbeans IDE, C language on Dev C++ compiler or gcc on Linux, Python, Matlab
Statistical Analysis - Minitab, Design Expert

WORDLE: create artworks from a word cloud

Wordle is a toy for generating “word clouds” from text that you provide. The clouds give greater prominence to words that appear more frequently in the source text. You can tweak your clouds with different fonts, layouts, and color schemes. The images you create with Wordle are yours to use however you like. You can print them out, or save them to the Wordle gallery to share with your friends. 

I tried to input my resume and here's how it looked like: 
I tried experimenting on some designs and got this:

 It's also a good check if your resume are in good shape or are you sending the impression that you want your employer to catch based on your resume. I just realized herein that I have been so much into GPS than my first love... GIS. So I have to do some minor revisions then.

Try Wordle too by clicking this link : http://www.wordle.net/create

GeoGREETINGS: How Geeks show they care.

Out of the very busy day, I still have time to send my husband sweet regards. Just discovered the site and really had fun!
What the program does is to let you enter a random phrase and the program automatically designates a structure found in the world map that would resemble the letters that you have typed. More interestingly, it has ♥ and smileys in it which makes it really cool.
Here's my geoGreeting card and is animated through this link.
Try showing how much you care too by clicking this link: http://www.geogreeting.com/main.html


Free Philippine Administrative Boundaries shapefile

Free Administrative Boundary shapefile can be downloaded here.

The coordinate reference system is latitude/longitude and theWGS84 datum.

Other file formats such as ESRI geodatabase (.gdb), Google Earth (.kmz), and RData for RProject.
Geospatial data from other countries are also available for download here.

File Formats

A "shapefile" consist of at least three actual files. This is a commonly used format that can be directly used in Arc-anything, DIVA-GIS, and many other programs. Unfortunately, non-latin characters are garbled.

An "ESRI geodatabase" is an MS Access fole that can be opened in ArcGIS (an expensive but powerful program). One of its advantages, compared to a shapefile, is that it can store non-latin characters (e.g. Cyrillic and Chinese characters).

A "Google Earth .kmz" file can be opened in Google Earth.

A "RData" file can be used in R (with the sp package loaded)

Some files have been compressed and grouped in ZIP files. You can use programs such as 7-zip, PKZIP or StuffIt to decompress the files.


How to Transfer Certificate of Title after buying a property in Metro Manila,Philippines

How to Transfer Certificate of Title after buying a property in Metro Manila,Philippines: "

If someone wants to buy a lot, his first notion was to get a real estate broker to do all the processing. But if the buyer has ample time, with just a few knowledge and some resourcefulness, he can surely do all the processing without having to throw-off some extra bucks for service charges.

Here are the few easy steps to transferring your newly acquired lot under your name:

Summary of requirements

1. Preparation of the deed of sale and ratification by notary public. 2. Obtain a certified true copy of latest tax declaration from the Assessor’s Office of the city where the lot is located. 3.Payment of Documentary Stamp Tax and Capital Gains Tax at an authorized bank. 4. Obtain tax clearance (or Certificate Authorizing Registration(CAR)) from the Bureau of Internal Revenue 5. Obtain a tax clearance certificate of Real Estate Taxes from the Treasurer’s Office of the city where the lot is located. 6. Payment of transfer tax at the Treasurer’s Office of the city where the lot is located. 7. A..."



Creating a Standalone GIS Application

In this example we are going to begin to build a standalone GIS application using Python and the QGIS libraries. We'll start simple by creating an application to load and display a shapefile. In later posts we'll enhance the application to provide some map tools and other features.


To build the application we need the following tools installed:
  • QGIS 1.0
  • PyQt4
  • Qt 4.3 or higher and the development tools (Designer)
  • Python 2.3 or better

Testing the Environment

Before getting started we need to test our development environment to make sure everything is in place. First we need to make sure Python can find the QGIS bindings.
From a terminal or command shell on Linux or OS X:
export PYTHONPATH=[path to]/share/qgis/python 
From a cmd shell on Windows:
set PYTHONPATH=[path to QGIS]\python 
If you are using the OsGeo4W install of QGIS, all you need to do is start the OsGeo4w shell. No setting of the PYTHONPATH is required.
Start Python from a shell and test the import of the needed components:
mizpah:~ gsherman$ python
Python 2.5.1 (r251:54869, Apr 18 2007, 22:08:04)
[GCC 4.0.1 (Apple Computer, Inc. build 5367)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import PyQt4.QtCore
>>> import PyQt4.QtGui
>>> import qgis.core
>>> import qgis.gui
If there are any errors you may have to set the path to the QGIS libraries using the LD_LIBRARY_PATH on OS X and Linux.
Now we are ready to get started.

Creating the Main Window

First create a directory for developing the application and change to it.
Now run Qt Designer. The New Form dialog should appear. If it doesn't, choose New Form... from the File menu.
We want to create a Main Window so choose it from the templates/forms list. Click "Create" to create the window and then resize it as you see fit.
Now we need to add a frame to hold our map control. Find the Frame widget in the list of widgets (under Containers) and drag it to the main window.
The last thing is to tell Designer that we want a grid layout. Click outside the frame you just added to select the main window area. Now click on the "Lay Out in a Grid" tool. in the toolbar. When you do, the frame will expand to fill your entire main window.
We are done in Designer. Save the form as shapeviewer_gui.ui in the project directory you created earlier.
In order to use the form we just created, we need to compile it using the user interface compiler. Open a shell and change to your project directory. Then compile the form:
pyuic4 -o shapeviewer_gui.py shapeviewer_gui.ui 
Now we have a Python script (shapeviewer_gui.py) that implements our form.

Creating the ShapeViewer Class

Now we need to create the class that will do the work of loading and displaying a shapefile.
We begin with some imports:

1 from PyQt4.QtCore import *
2 from PyQt4.QtGui import *
3 from qgis.core import *
4 from qgis.gui import *
5 import sys
6 import os

We need the PyQt and QGIS imports, as well as the Python sys and os modules.
In order to use our form, we need to import it next:

7 # Import our GUI
8 from shapeviewer_gui import Ui_MainWindow

To make things simple in our script, we are going to use an environment variable to locate the QGIS install:

10 # Environment variable QGISHOME must be set to the install directory
11 # before running the application
12 qgis_prefix = os.getenv("QGISHOME")

We'll set the environment variable later, right before we run the application.
Now the class definition---we'll call it ShapeViewer. ShapeViewer must inherit from two classes: QMainWindow and Ui_MainWindow:

14 class ShapeViewer(QMainWindow, Ui_MainWindow):
16 def __init__(self):
17 QMainWindow.__init__(self)
19 # Required by Qt4 to initialize the UI
20 self.setupUi(self)
22 # Set the title for the app
23 self.setWindowTitle("ShapeViewer")
25 # Create the map canvas
26 self.canvas = QgsMapCanvas()
27 self.canvas.useImageToRender(False)
28 self.canvas.show()
30 # Lay our widgets out in the main window using a
31 # vertical box layout
32 self.layout = QVBoxLayout(self.frame)
33 self.layout.addWidget(self.canvas)
35 # layout is set - open a layer
36 # Add an OGR layer to the map
37 file = QFileDialog.getOpenFileName(self,
38 "Open Shapefile", ".", "Shapefiles (*.shp)")
39 fileInfo = QFileInfo(file)
41 # Add the layer
42 layer = QgsVectorLayer(file, fileInfo.fileName(), "ogr")
44 if not layer.isValid():
45 return
47 # Change the color of the layer to gray
48 #symbols = layer.renderer().symbols()
49 #ymbol = symbols[0]
50 #ymbol.setFillColor(QColor.fromRgb(192,192,192))
52 # Add layer to the registry
53 QgsMapLayerRegistry.instance().addMapLayer(layer);
55 # Set extent to the extent of our layer
56 self.canvas.setExtent(layer.extent())
58 # Set up the map canvas layer set
59 cl = QgsMapCanvasLayer(layer)
60 layers = [cl]
61 self.canvas.setLayerSet(layers)

Let's take a look at the class definition in a bit more detail. In line 14 we declare the class and indicate that it inherits from both QMainWindow and Ui_MainWindow. Next is the __init__ function (line 16) which is called whenever you create an instance of ShapeViewer.
This is where the real work begins. The first thing we need to do is call init on the parent QMainWindow class to make sure things are initialized properly (line 17). In order to initialize our GUI, we call setupUi(self) in line 20. As you may have guessed by now, Ui_MainWindow is the class we created with Designer and pyuic4; and yes, setupUi is a function in our Ui_MainWindow class. If you like, you can change the name of the GUI class to something more appropriate when you create it in Designer by setting the objectName in the propery window.
In line 23 we set the title of the window to "ShapeViewer" using the setWindowTitle method.
Next we create the map canvas and set it to visible by calling its show() method (lines 25-28).
Eventually we'll want to add a toolbar to our application so we create a vertical box layout on our main window frame (line 32) and then add our map canvas onto the vertical box layout in line 33. That completes the setup of the layout for the application.
To add a layer to the application we are going to immediately open a file dialog from which a layer can be selected. Normally you would assign this to a menu and/or toolbar item. In lines 35-39 we open a file dialog and get the file name selected by the user. In line 39 we create a QFileInfo object from the full path of the file. We'll use this to get just the file name from the path and use it as name of our added layer in the application.
The layer is created in line 42, by passing the full path name (file), the file name (fileInfo.file), and the name of the data provider, in this case "ogr". The last thing to do is make sure the layer is valid and if it's not, we just exit the application using a return in lines 44-45. Of course a real application would handle this differently.
To get the layer ready for display, we add it to the QGIS layer registry in line 53. The registry keeps track of all loaded layers---if we don't add our layer to the registry we won't see it. We also need to set the extent of the map canvas to the extent of our layer (line 56). The last bit of housekeeping is to create the actual map canvas layer and add it to the layer set for the canvas (lines 58-61). Now we have a map canvas configured with one map canvas layer and ready for display.

Setting Up to Run

Next we need to setup the application so we can run it. In a real application, you would likely separate the following code from the class definition by putting it in a separate Python script.
Here is the application setup code:

63 def main(argv):
64 # create Qt application
65 app = QApplication(argv)
67 # Initialize qgis libraries
68 QgsApplication.setPrefixPath(qgis_prefix, True)
69 QgsApplication.initQgis()
71 # create main window
72 wnd = ShapeViewer()
73 # Move the app window to upper left
74 wnd.move(100,100)
75 wnd.show()
77 # run!
78 retval = app.exec_()
80 # exit
81 QgsApplication.exitQgis()
82 sys.exit(retval)
85 if __name__ == "__main__":
86 main(sys.argv)

Lines 63-82 setup the main method and contain the code needed initialize and run our application. In line 65 we create a QApplication (a Qt class). In lines 68 and 69 we setup the QgsApplication object by setting the path to the QGIS installation and initializing QGIS.
Next we need to establish the main window for our application. In our case this is our ShapeViewer class. Lines 71-75 create the main window and move it a bit from the upper left of the screen, then show it with wnd.show().
Lastly we enter the event loop by calling app.exec() in line 78. This starts the application and continues until the main window is closed. When closed lines 81 and 82 are executed to tidy things up and make a clean exit.
The last line (85) is a Python mechanism to allow our code to behave either as a module or as a script that can be executed. Since our source file contains the ShapeViewer class definition with methods and the main method, nothing would happen if we tried to execute it without having lines 85-86 in place. Well actually some things happen but nothing that we can see. When we run ShapeViewer.py as a script, "__name__" is set to "__main__" by the interpreter, thus causing the script to execute our main method. If you import ShapeViewer.py as a module in another script or interactively, "__name__" is set to the name of the module, i.e. "ShapeViewer".

Running the Application

On Linux or Mac OS X you need to set the QGISHOME directory to the location where QGIS is installed. On Linux this will be the directory containing the bin, lib, and share subdirectories of the QGIS install (possible locations include /usr and /usr/local):
export QGISHOME=/usr/local
On Mac OS X, a likely location (depending on where you installed QGIS) will be:
export QGISHOME=/Applications/Qgis.app/Contents/MacOS
On Windows, set it to the top level of the QGIS install:
If using the OSGeo4W install of QGIS, use:
Once QGISHOME is set, we need to set the PYTHONPATH as well. On Linux or OS X:
export PYTHONPATH=$QGISHOME/share/qgis/python
On Windows:
set PYTHONPATH=%QGISHOME%\share\qgis\python
If using the OSGeo4W install of QGIS, start an OSGeo4W shell---you don't need to set the PYTHONPATH
(To make things easier, you could set these environment variables for your operating system in a script and run the application)
To run the application after your environment is set use:
python ShapeViewer.py
When we run the application and choose the world_borders shapefile (available from this site) we get:

Tweaking the Result

The result, although impressive, is not very attractive. The black background of the map canvas coupled with the random blue chosen by QGIS for the countries is rather ugly.
We can fix the background by adding the following to our code, right after we create the map canvas (line 26):
#Set the background color to white
This sets the background color to white using the setCanvasColor method of the map canvas object. Running the application again gives us:

This is a much better result. You can also change the color of the layer but we'll leave that for another time, or for you to sort out if you wish.

Panning and Zooming

Although we didn't create any map navigation tools, with the QGIS map canvas we get that for free. To zoom the map, roll the mouse wheel in or out while holding down the space bar. To pan the map, hold down the space bar and move the mouse.

Source Code

The source code for the ShapeViewer application can be downloaded here:


This is a simple example of what you can do with Qt and the QGIS python bindings. Very sophisticated, custom applications can be created using these tools.
NOTE: The indentation of the Python code shown in this post may not be correct. Downloading the source code is the best way to examine the code.

from Gary Sherman Blogs: http://desktopgisbook.com/Creating_a_Standalone_GIS_Application_1


Add Google Reader Shared Feeds Widget in Blogger

Add Google Reader Shared Feeds Widget in Blogger


Most IGS* stations archive data in compact rinex format.

I have had a hard time figuring out how to decompress this files.

Just follow the following steps:
1. Download RNXCMP_4.0.4_Windows.tar through this link:

2. Extract the bin folder contains the following files:

2. Save the following scripts as Windows batch file (example: 00D_00o.bat) to the same folder where you have saved the compact rinex files and the extracted bin files from RNX 4.0.4 Windows tar file above.

@echo off
REM  decompressing the *.99e to *.99o automatically:
REM  decompressing     *.99e to *.99d
REM  restore           *.99d to *.99o
     del  crz2x.tmp
     del  crz2x.bat
     for %%f in (*.9?d) do ECHO call crz2rnx1 %%f >> crz2x.tmp
     for %%f in (*.0?d) do ECHO call crz2rnx1 %%f >> crz2x.tmp
     for %%f in (*.9?z) do ECHO call crz2rnx1 %%f >> crz2x.tmp
     for %%f in (*.0?z) do ECHO call crz2rnx1 %%f >> crz2x.tmp
REM  c:\pe2\pe2 crz2x.bat
     call crz2x.bat
REM  for %%f in (*.9?z) do ECHO call crz2rnx1 %%f >> CRZ2X.BAT
REM  decompressing the *.99z to *.99o automatically:
REM  decompressing     *.99z to *.99o

 3. Click on the batch file that you have created. Converted RINEX observation files will be saved within the same folder.

 *IGS (International GNSS Service) Stations 

Additional Links for GPS processing:

Link to the GPS Calendar:

Link to download daily rinex data (GPS daily data) from IGS stations:

Link to download rapid and static daily ephemeris data (.sp3) :

Link on data and resources for GPS antenna calibartion:

Link to pole file (orbit data) C04 *.erp:

Trimble Configuration Utility for update of DAT2RIN converter:


The Volcano and the Buffer

Here in Alaska we have over 130 volcanoes with more than 50 being active in about the last 250 years. Presently Mt. Redoubt is in an eruptive phase and has been since March 22. Ash from the volcano has fallen in a number of communities and areas throughout the state. A couple of weeks or so ago the reports from the Alaska Volcano Observatory indicated the ash was falling within 30 miles of the volcano. I decided to do a quick analysis to see what areas might be affected.
This is an example of simple analysis with GIS. We just get the location of the volcano and create a 30 mile buffer and then visually determine the affected areas. To do this we need data for towns and the location of the volcano. We could use a volcano layer if we had one, but in this case I'm going to use a simple method to create a point shapefile from text data.
The AVO website indicates that Mt. Redoubt is located at
Latitude: 60.4852° N
Longitude: 152.7438° W
To create a shapefile we start with a plain text file named redoubt.csv containing:
60.4852,-152.7438,"Mt. Redoubt"
Next we use the VRT facility of GDAL/OGR to create a virtual data set from the CSV file and save it in redoubt.vrt:


Our towns and base data are in an Albers Equal Area projection. To use the volcano location we need to transform it from WGS84 (as specified in the VRT file) to the Albers projection. There are a number of ways to specify the output projection—in this case we will look it up on the Spatial Reference website and use the proj4 format:
+proj=aea +lat_1=55 +lat_2=65 +lat_0=50 +lon_0=-154 +x_0=0 +y_0=0 
+ellps=GRS80 +datum=NAD83 +units=m +no_defs
To create the shapefile, we use ogr2ogr, transforming along the way:
ogr2ogr -t_srs "+proj=aea +lat_1=55 +lat_2=65 +lat_0=50 \
+lon_0=-154 +x_0=0 +y_0=0 +ellps=GRS80 +datum=NAD83 \
+units=m +no_defs" redoubt.shp redoubt.vrt
Now we are ready to create the buffer. Starting QGIS and loading our base data and the towns, as well as the newly created volcano shapefile gives us this:

Using the fTools plugin we choose Buffer from the Geoprocessing Tools menu and set the parameters:

Note that we specified the buffer size in meters since our data is in meters not feet (30 miles ~= 48293 meters).
After the buffer is created and added to the map, a bit of symbolization tweaking to make it transparent gives us:

Looking at the resulting buffer we can see that no major communities were in the potential ash fallout area.
This simple example illustrates using an OGR command line utility to create some data needed for our analysis using QGIS and the fTools plugin. It's worth taking a look at fTools—it provides a nice selection of tools for working with your spatial data within QGIS.
In case you are wondering, Mt. Redoubt seems to be taking it easy and just puffing along as of late:

(Image courtesy of AVO)

Re-post from Gary Sherman's Blog



common formats

other vector formats

other raster formats

Note: use an OSGIS software that uses GDAL/OGR for accessing raster and vector data (GRASS and QGIS)

data format deliverable over the web: Open Geospatial Consortium website http://www.opengeospatial.org

-Creating a POSTGis-enabled database:


    -provid a metadata that will document our assets
    - convert data into standard format for better functionality (i.e. shapefile into PostGIs or GRASS layer with geoprocessing capability, ex. in buffering)

Buffering in PostGIS- simple SQL Query
    in GRASS - use v.buffer command or buffer module in QGIS-GRASS toolbox.
for PostGIS conversion: improve data management by givng a "portal" to our data, but also being OGC compliant
            - provides spatial functions in Simple Features Specification for SQL
            - getting a whole batch of spatial functions for querying relationships between features, transform between projections and create new features.

GRASS - various vector-and-raster-processing tools

Line of Sight Analysis
    - you need a DEM for height.
    - r.los in GRASS doesnt work for geographic coords so use Albers Projection instead.
    - r.mapcalc command allows you to do arithmetic operations on the cells in raster layers
    - use gzip -d to unzip files

    - r.lake
    - r.out.mpeg

    - use a DEM and GRASS r.shaded.relief module
    - a 4x exaggeration is better than defaul 1x exaggeration
    - colorizing the hillshades:
        - use r.patch command (use g.region first to set GRASS region)

        ex project: melting the ice sheets and determining sea level rise by r.lake
    The steps to clip a raster are as follows:
        1.Create a vector map to be used as the area of interest.
        2.Convert the vector map to a raster map.
        3.Use the new raster map as a mask for clipping.
        4.Create the newly clipped raster using raster algebra.
        5.Clean things up

- GRASS conversion: page 96
- PostGIS conversion:
- GDAl/OGR utilities

OpenSource Spatial Database : PostgreSQL with PostGIS - more mature and feature-rich, for spatial processing and queries
                MySQl -for storing spatial features

            *both complies with OGC, but most fully implemented in PostgreSQL/PostGIS

MBR- minimum bounding rectangle or BBOx(bounding box), extent

PosGIS- creating template using commandline tools

Using PostGIS and QuantumGIS

Projection DATA problems
- big difference in alignment, PROJECTION PROBLEM
- small difference - (500m) - DATUM PROBLEM

Creating Data
1. Digitizing p. 122 - heads-up digitizing, needs to georeference image after digitizing to have it belong to a fix geographic coordiante system and avoid overlapping.
            -easy digitizing using r.to.vect, clean up to many vectors with v.clean with tool=rmarea to clean up noise in the image.

2. Importing text from files - use a delimited text and get it easily imported in GRASS and QGIS
                QGIS - supports import points only
                GRASS - all feature types in GRASS vector model.
        - PREPROCESSING TEXT FOR INPUT, using a ruby script for creating a delimited file.
            -E00 interchange file to GRASS to all other format or use GDAL/OGR suite of tool


Click here for more details about the book