What is the cause for the degradation of environment?
Capitalism, corruption, consuming society? - OVERPOPULATION!
Please, save the Planet - kill yourself...

Wednesday, June 27, 2012

Conference Announcement: Open GIS!

Open GIS! is a conference for users and developers of open-source GIS. It will take place on November 17-18, 2012 in Moscow, Russia. The really cool thing is that participation in this crowd-source conference is free of charge!!! Of course modest donations will be appreciated and a sponsorship as well, but it is not mandatory - we want this event to be available for everyone who are interested in open geospatial software and data. Download leaflet!

A call for papers will be opened in August but already now you may propose topics of your talk or master-class to the committee.

Please, spread the word!

P.S. If you are (a rear) person who interested in illegal dumping research (from geospatial point of view) - come to this conference to hear my talk on it!

Wednesday, June 20, 2012

How To Get Rid of Needless SRTM Files Fast

It is quite annoying to download the whole 1Gb archive of SRTM30 DEMs when you need only couple of dozens of them. In case of Leningrad region for example I had to download 4 archives and face necessity of finding needed DEMs amongst several thousands(!!!) of files and deletion the rest... Too tedious and too long task to do it manually. Lets optimise it!

We will use QGIS and Linux (I prefer openSUSE) console (and a text editor of your choice). The algorithm is applicable to other similar issues too.

Firstly we will get the list of names of files that we need to save (for our actual project). Collect all DEMs from archives in a single folder. And use Image Boundary plugin (or Raster tile index from "Raster" menu) to create a polygon shp-file with borders of all the DEMs from the folder and corresponding file name and path.

Open this layer in your canvas and select polygons that intersects your area of interest:

Now you can either to "save selection as" CSV from the layer menu or "copy selected rows to clipboard" from attribute table and paste it to the empty text-file. In LibreOffice Calc (or use other text editor for this) delete all columns exept that which contains file names and add to the list name of the text-file itself (lets name it FILELIST). NOTE: this file should contain ONLY NAMES without paths. Place this file to the directory with DEMs.

We are ready for the final step - deletion of a thousands of DEMs that we are not going to use. A recipe I found here: using console go to the folder with DEMs and execute following command:
ls -1 | sort FILELIST FILELIST - | uniq -u | xargs rm
Where FILELIST is our text-file containing names of files that we need to KEEP. This command will delete all files from the folder except files which names are listed in FILELIST.

Saturday, June 16, 2012

About On-line Education

Recently I've accomplished 2 of the on-line courses provided by Coursera

A "Model Thinking" course provided a nice overview of the existing approaches to model creation. Despite oversimplified maths (that I tried to compensate by using R-scripting where it was applicable) I liked this course for covering a wide range of real world implementation of different types of models.

A "Game Theory" course was quite nice, but had a lack of the real world implementation examples (there were a couple of them). And it was quite disappointing because that was what I hoped to learn about. I've already studied Game Theory in my University 7 or 8 years ago and since then was curious in seeing the theory in action. Unfortunately all the examples I've encountered were either oversimplified or far too complicated. The good thing was that the statement of accomplishment of Game Theory course was much fancier then that of Model Thinking.

Friday, June 8, 2012

A Bit More on Ignorance

Occasionally I found an article that have some relation to my previous post. The article has an intriguing name: "The Influence of Map Design on Resource Management Decision Making". Unfortunately it is not in open access, so I wasn't able to read it. Also abstract omits conclusions... And I would prefer to see study of the real cases... Nevertheless here you are:

The popular use of GIS and related mapping technologies has changed approaches to map-making. Cartography is no longer the domain of experts, and the potential for poorly designed maps has increased. This trend has raised concerns that poorly designed maps might mislead decision makers. Hence, an important research question is this: Can different cartographic displays of one data set so influence decision makers as to alter a decision that relies on the mapped data? This question was studied using a spatial decision problem typical for decision makers in a resource management agency in the United States (the USDA Forest Service). Cartographic display was varied by constructing three hypothetical map treatments from the same data set. Map treatments and other test materials were mailed to Forest Service District Rangers. All District Rangers received the same decision problem, but each received only one of the three map treatments. The participants were asked to make a decision using the decision problem and map treatment. Information about the decision and the influence of each map treatment was obtained through a questionnaire. The research and its implications for map-based decision making are presented and discussed.

Monday, June 4, 2012

About Spatial Ignorance

There is one question about spatial technology that bothering me for a couple of years. 

Is anyone suitable for working with GIS and spatial data or one should be a professional?  

Well that's a tough question. But in general it depends on conditions. 

Lets ask ourselves two more other questions.
  1. Is anyone suitable to operate PC, printer or database?
  2. Is anyone suitable to be system administrator in your office?
Obviously it is "yes" for the first question and "no" for the second. Anyone can ride a bicycle but one need license to drive a bike.

So my answer for the given question is - one need to learn a lot to understand how to work with spatial data. Anyone willing to learn theory is suitable to work with spatial data.

Tonight one smart ass (or should I write "cat"?) asked me why in the hell I suggest to calculate distances (when using PostGIS) in the corresponding zone of Pulkovo-42 for Russia (EPSG:28403 for example) when possible? The motivation of the question was based his statement that one will need far shorter SQL-query for distance measurement if the geometry would by casted to geography type and distance would be calculated with EPSG:4326. Like: "Eah, ST_Distance will return meters even for ellipsoidal calculations! Did you know it, dumb ass?! Admit, you suck!"

Well, kind reader, can YOU see the GLOBAL difference between  EPSG:28403 and EPSG:4326 (it is not about projection)? The answer is "reference ellipsoid" (or "geodetic datum" or just "datum"). This reference ellipsoid defines the Earth shape model parameters for all the calculations that one would perform with spatial data.

Well, kind reader, if you were (are) a good student then you should understand, that if reference ellipsoid defines the MODEL of the shape, then it also defines the BIAS of this model from the true value at any given location.

The next questions you may ask: 

Q: Does this bias matters?
A: Well, it depends on your goal requirements and the answer will be "NO" or "YES". So you may ask me here if in doubt. 

Q: How big is the difference between measurements using different datums?
A: Well, it depends ;-) ... depends on datums compared as well as locations compared - from centimeters to hundreds of meters. 

Q: Will 1 meter difference make your day?
A: Absolutely! Do you have a land parcel in your possession? Imagine that tomorrow some people from the municipality will came to you and demand to move you fence, because it is build on the adjusted road land parcel. They show you a digital map where your fence is 1 meter on the adjusted parcel. And this shit happened because of 1 meter bias! 

Instead of conclusion

If you're a cat - grab a handbook on geodesy and become a human being, or... just keep licking your balls and quit work with spatial data before you'll ruin something.