Category: Command line Fu

  • Checking for disc overload on linux

    The trick is to use vmstat and look at the number for “wait on acknowledge”. vmstat -S m 1 100 Look under “cpu” and the “wa” column. If this number is high, it is bad. It should be zero. Some sample output from vmstat looks like this: procs ———–memory———- —swap– —–io—- -system– —-cpu—- r b […]

  • OpenStreetMap tiles in EPSG:25832 projection using GeoServer

    Warning: This is a description of how to create a OpenStreetMap WMS with GeoServer. It works fine up to the point where the layers published as an unstyled WMS. This is where I’ve not been able to produce a good result, because of lack of a good Styled Layer Descriptor (SLD). If you have hints […]

  • Reprojecting shapefiles with ogr2ogr

    If you have an ESRI Shapefile (.shp) that you want to reproject, you can use ogr2ogr ogr2ogr -t_srs newfile.shp oldfile.shp The EPSG code could be for instance epsg:28532.

  • Creating a word cloud from PDF documents

    Warning: This is not the hardest way to create a word cloud from pdf-documents, but it’s up there. Say you have directory containing pdf documents: $ ls a.pdf b.pdf c.pdf …

  • Show system info on a Mac

    SYSTEM_PROFILER Show a very long list of details about your machine and kernel (verbose output) system_profiler

  • How to monitor system stuff on Mac

    Found this nice post on good commands to know appart from the obvious top Basically they are top and vm_stat 5

  • Finding the most quoted main author using linux command line

    I have a text file containing article references. It looks like this – Miller HJ (2004) Tobler’s First Law and spatial analysis. Ann Assoc Am Geogr 94:284–289. – Onsrud H, ed (2007) Research and Theory in Advanced Spatial Data Infrastructure Concepts (ESRI Press, Redlands, CA). – Egenhofer M (2002) Toward the geospatial semantic web. Advances […]

  • How to create JSON data from a text file on the internet

    The following assumes a linux command line to be present (or Mac OS X terminal in my case). I want to wrangle text from the internet, turn it into JSON data, and ultimately stick it in CouchDB. Here I’m trying to turn a random text file containing prime numbers into structured JSON data that looks […]

  • Using shp2geocouch to push OSM data into geocouch

    Today I installed the utility shp2geocouch on Mac OS X 1.6. First I needed to update RubyGems… sudo gem update –system Then I could install shp2geocouch sudo gem install shp2geocouch Next I downloaded OSM data for Copenhagen, Denmark wget unzip cd copenhagen.shapefiles Finally I used shp2geocouch to upload one of the shape files […]