Computer Science Mojo

~ David's Notes on coding, software and computer science




Tag: Python

My pelican setup

Category: Web     Tag: Pelican   Python  
By: David     On: Sat 09 July 2016      Pageviews: 35
Document some of the useful changes that I made to my pelican setup. Might be helpful for newcomers ;)

Continue reading »

How to use GDAL Python to transform geotiff pixels to lat lon real-word coordinates

Category: GDAL     Tag: GDAL   Linux   Python  
By: David     On: Thu 06 August 2015      Pageviews: 182
GDAL gdaltransform is a easy way to transform a pixel of a tiff image to its corresponding lat/lon coordinate.

Continue reading »

How to check all files and find a file type in all directories in Python

Category: Python     Tag: Linux   Python  
By: David     On: Thu 06 August 2015      Pageviews: 5
Going through all the directories to find the path of a specific type of file is easy in Python. This helps with mass processing files.

Continue reading »

How to check tag exists when parsing XML in Python

Category: Python     Tag: Coding   Errors   Python   XML  
By: David     On: Tue 28 July 2015      Pageviews: 148
When using Python minidom to parse XML it is easy to encounter an "IndexError: list index out of range" if the tag does not exit. An easy fix is to check the size of "doc.getElementsByTagName".
Alt Text

Continue reading »