Monthly Archives: February 2017

Field Calculator in QGIS

In QGIS, if you want to calculate the real geometries (such as area, parameter, length etc.) of polygon/point based on the current coordinate system, we need using the field calculator.  If we use this calculator, we able to show the geometries in the features table. I list a few field calculators that may interest the QGIS user as follows:

latitude and longitude

$x or $y as a variable to get the x and y

How to export string with timeperiod to .dat file? (Re-Post)

Here a question (original link) that I ask at Matlab Community that the reader may found useful.


I have a large string that containing time period such as 23-May-2009 02:00:00 (as attached). Variable editor in Matlab is unable to display these variables, since the variables have more that 524288 elements. I want to export the variables to .dat file, so I can see the list of the variables. I try to use fopen and fprintf functions to export the variables, but unsuccessful. Any help? Thank you.


load hourlyperiod.mat
d = hourlyperiod ;
fid = fopen('iwant.dat','w') ;
for i = 1:length(d)
 fprintf(fid,'%s \n',d(i,:)) ;
fclose(fid) ;