2011-06-03

2011-05-25

Since QGIS has simple and poverful GRASS GIS implementation, I found that more often I`m using this Grass version, not standalone Grass GIS.
There has been some needs for my friends doing very basic and simple things, but as it takes longer if someone don`t know QGIS and Grass well, I made some tutorials.

This one explains how to define coordinate system for project for correct distance and area measurements, and correctly add scalebar.

In this next video the DEM is loaded in Grass GIS database from QGIS and visualised through NVIZ. All under windows xp.





The next video shows how to georeference an image file. I`m using very dummy image file as example... ;)



The next video shows how to rasterize vector contour lines, how to interpolate rasterized contour lines and very basic mapcalc stuff - how to get difference between two different DEM`s.



This video shows a bit complicated raster analysis example. There is a dummy JPG raster file where each cell should contain values 0 (black) and 255 (white). But because it`s compressed and it`s JPG, there are cells between defined values. With simple mapcalc usage it`s possible to define - are these cells could be counted as black or white.
of course, it`s possible to do it just writing script in shell, but Grass allows create these scripts in very user friendly way.



But sometimes there are needs to manipulate with LIDAR data. And here LAStools are very handy. LAStools could be downloaded from here. But as they are command line tools, the easiest way is to write BAT`ch file (in windows).
So here is example - how to manage it.

2011-03-09

Cannot run commands from command prompt?

Playing around with GRASS and Python, accidentally I lost environment variable resulting that some commands, like ipconfig and ping, from command promt were not running and the error was called.
Windows system32 directory should be left as one of the PATH variables.
PATH=D:\GRASS-64\etc;D:\GRASS-64\etc\python;D:\GRASS-64\lib;D:\GRASS-64\bin;D:\GRASS-64\extralib;D:\GRASS-64\msys\bin;D:\Python27;D:\Windows\System32



2011-03-02

daily data

PHP mysql database code for wells. daily results for all wells.
Sometimes there`s a need for daily data, but in database there are records only about those days, when measurements were made.
In given example, it is possible to set the start and end days, and multiple measurement points a.k.a. wells.

2011-02-25

HeidiSQL

Very nice program to access remote SQL server.
Also, I`ve learned some neat things about MySql functions and extended use.
For example, here is some code
What does it do?
It`s looking for all similar months and returns an average value from all values on given month.
In the inner "select" I`m selecting all columns and I`m adding additional column, where the each month (meneshi) is added in each row using "where"
And then in the outer query I`m gruping values by newly created month column and calling an average function. It returns all average values for each group - month.
And lastly I`m ordering results by month. Easy as pie, actually.

Only thing I need to change is "ns" in third line from end of the script.
Next challenge would be to make average results for all ns.
select avg(lim), datums, meneshi
from
( select ns, lim, datums,
CASE
WHEN datums like '19__-01-__%' THEN '01'
WHEN datums like '19__-02-__%' THEN '02'
WHEN datums like '19__-03-__%' THEN '03'
WHEN datums like '19__-04-__%' THEN '04'
WHEN datums like '19__-05-__%' THEN '05'
WHEN datums like '19__-06-__%' THEN '06'
WHEN datums like '19__-07-__%' THEN '07'
WHEN datums like '19__-08-__%' THEN '08'
WHEN datums like '19__-09-__%' THEN '09'
WHEN datums like '19__-10-__%' THEN '10'
WHEN datums like '19__-11-__%' THEN '11'
WHEN datums like '19__-12-__%' THEN '12' END as meneshi
from hmetlimeni where ns=9664 ) as tble
group by meneshi
order by meneshi