Import “starred places” into a My Map

There is a situation, you have saved several places in Google Maps and you want to display all those places in one map in Google Maps. How to do it? It is a way to do it, by using My Maps. However, there is no way to add them through My Maps directly. Here the tips from this link to do it:

  1. Export them using Google Takeout
    https://www.google.com/settings/takeout
  2. Export them from “Google Maps (My Places)”, not from “Bookmarks”. They will be downloaded as a GeoJSON file.
  3. Use this site to convert the file to KML GeoJSON
    http://nearby.org.uk/convert-saved-places.php
  4. Once download the KML file, can import it into the custom map.
Posted in Geoinformatics | Tagged , , | Leave a comment

Using HEC-GeoRAS for the HEC-RAS modelling (Videos Expired!)

Note: All video tutorials have been expired!. I will make the videos to replaced expired videos soon. Sorry for the inconvenience caused. – zulkarnain

If you do HEC-RAS for the flood or water quality modeling, HEC-GeoRAS may help you. In general, HEC-GeoRAS is a plugin in ArcGIS, to help to process geospatial data from the raster image. 1) It is very helpful that allows the preparation of geometric data for import into HEC-RAS and 2) helps to display the GIS outcome, based on the outcome of HEC-RAS. This software can be download from this link.

Preparation of geometric data for import into HEC-RAS

To create the import file, the user must have an existing digital terrain model (DTM) of the river system in the ArcInfo TIN format. The user creates a series of line themes pertinent to developing geometric data for HEC-RAS. The themes created are the Stream Centerline, Flow Path Centerlines (optional), Main Channel Banks (optional), and Cross Section Cut Lines referred to as the RAS Themes.

These are the best tutorial that I obtained from youtube:

Part 1

https://www.youtube.com/watch?v=kM2XWb5dNoQ

Part 2

https://www.youtube.com/watch?v=36wdta8JGbU

Part 3

https://www.youtube.com/watch?v=aziti65d21E

Part 4

https://www.youtube.com/watch?v=EBh_lGLZU7w

Helps to display the GIS outcome

Water surface profile data and velocity data exported from HEC-RAS simulations may be processed by HEC-GeoRAS for GIS analysis for floodplain mapping, flood damage computations, ecosystem restoration, and flood warning response and preparedness.

The tutorial to export the data from HEC-RAS to GeoRAS as follows:

https://www.youtube.com/watch?v=khBl8kK0E2A

Credit: Yasir A. for the good tutorials.

Posted in Geoinformatics | Tagged , , | Leave a comment

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

Posted in Geoinformatics | Tagged , | Leave a comment

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.


Question:

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.

Answer:

load hourlyperiod.mat
d = hourlyperiod ;
fid = fopen('iwant.dat','w') ;
for i = 1:length(d)
 fprintf(fid,'%s \n',d(i,:)) ;
end
fclose(fid) ;
Posted in Code | Tagged , | Leave a comment

Menukar sistem koordinat menggunakan ArcGIS

Bila dapat shp files dari client dalam sistem koordinat kertau, mesti pening kepala. Mananya tidak, saya adalah pengguna QGIS dan function “on the fly” CRS transformation dalam QGIS sangat tidak membantu, berbanding function yang sama dalam ArcGIS. That why, ArcGIS sangat disukai oleh ramai orang sebab lebih muda berbanding QGIS. Tetapi, since ArcGIS perlu dibeli dan license sangat mahal, ini menyebabkan saya lebih suka menggunakan QGIS.

Berbalik kepada masalah saya, saya perlu ubah sistem koordinate kertau kepada WSG84, since default sistem QGIS adalah WSG84. Tambahan, kalau import files dari Google Earth, WSG84 akan digunakan. Dengan basic knowledge dlm QGIS dan ArcGIS yang sangat shallow, google lah cikgu saya. Saya terjumpa satu link orang Melayu yang ajar step by step macam mana hendak tukar. Saya repost balik post dia disini untuk rujukan saya dan pembaca disini.

Post beliau seperti berikut:


Di sini saya akan tunjukkan cara-cara menukar sistem koordinat tu menggunakan ArcMap. Contoh yang akan saya berikan ialah menukar data dari RSO ke WGS84.

1. Pastikan sistem koordinat sumber data

Mula-mula anda perlu pastikan apakah sistem koordinat yang digunakan oleh data yang ingin anda tukarkan sistem koordinat tu. Contohnya katalah saya ingin menukar data mukim saya ke WGS84. Saya perlu pastikan apakah sistem koordinat yg digunakan oleh mukim tu. Katakan saya tahu data mukim tu adalah data RSO,.. saya perlu pastikan pada ruangan XY Coordinate data tu tertera Kertau_RSO_Malaya_Meters dan bukannya Unknown.

Sekiranya nilai yang dipapar adalah Unknown, anda perlu define dahulu sistem koordinat pada data tu sebelum proceed langkah seterusnya. Contoh, kalau data mukim saya tu adalah data RSO, saya perlu define dahulu data tu sebagai RSO. Proses ni anda perlu buat dalam ArcCatalog ataupun Catalog Window.


Klik butang Select.. untuk define sistem koordinat sumber data
2. Set sistem koordinat untuk Data Frame.

Kemudian setkan sistem koordinat Data Frame mengikut sistem koordinat apa yang anda hendak convert. Macam contoh saya ni, saya nak convert mukim tu dari RSO ke WGS84, jadi sistem koordinat Data Frame tu saya perlu set dahulu sebagai WGS84.

3. Pastikan adakah terdapat perbezaan datum antara sistem koordinat.

Step ni agak penting juga untuk pastikan ketepatan data yang akan anda hasilkan nanti. Anda perlu tahu apakah datum yang digunakan antara sistem koordinat yang terlibat. Contohnya data mukim saya adalah RSO. RSO untuk Semenanjung menggunakan datum Kertau. WGS84 pula menggunakan datum WGS84…. bermaksud kedua-dua sistem koordinat menggunakan datum yang berbeza.

Sekiranya terdapat perbezaan datum, proses Datum Transformation perlu dilakukan. Mudah saja, klik saja butang Transformation pada dialog Data Frame Properties dan setkan transformation seperti gambar kat bawah ni.

4. Export data menjadi layer baru.

Kemudian export saja sumber data tu menjadi layer baru. Tapi jangan lupa, pastikan anda pilih option Use the same coordinate system as : the data frame. Kalau tak pilih option tu, nanti data yang dihasilkan tetap tak berubah, masih lagi sistem koordinat yang asal. Dalam contoh di bawah ni, data mukim tu saya convert menjadi shapefile dan saya namakan sebagai MukimWGS.shp.

OK …selesai sudah proses. Data mukim saya telahpun diconvert daripada RSO menjadi WGS. Secara ringkasnya, anda bolehlah rujuk gambarajah bawah ni untuk step-step yang telah saya huraikan tadi.

Kredit:www.sukagis.com

Posted in Geoinformatics | Tagged , | Leave a comment

Protected: Hydrology and Hydraulics Software

This content is password protected. To view it please enter your password below:

Posted in Geoinformatics, Hydraulics, Hydrology | Tagged , | Enter your password to view comments.

Example of Bootstrapping

In a statistical analysis, bootstrapping is a popular technique, especially useful when the sample size is small. It is involved with resampling and the technique is assume nothing about the distribution of our data. It is noted that a small sample (<40), we can assuming a normal or a t-distributions.

Bootstrapping can be run in many statistical software in the market. For me, I like to use SPSS, since the software has integrating bootstrapping in each analysis. Many codes that implementing bootstrapping can be found in Matlab and R-language.

The following example is how this technique works that been obtained from this source:

Example Sample

We begin with a statistical sample from a population that we know nothing about. Our goal will be a 90% confidence interval about the mean of the sample. Although other statistical techniques used to determine confidence intervals assume that we know the mean or standard deviation of our population, bootstrapping does not require anything other than the sample.

For purposes of our example, we will assume that the sample is 1, 2, 4, 4, 10.

Example – Bootstrap Sample

We now resample with replacement from our sample to form what are known as bootstrap samples. Each bootstrap sample will have a size of five, just like our original sample. Since we randomly selecting and then are replacing each value, the bootstrap samples may be different from the original sample and from each other.

For examples that we would run into in the real world we would do this resampling hundreds if not thousands of times. In what follows below, we will see an example of 20 bootstrap samples:

2, 1, 10, 4, 2
 4, 10, 10, 2, 4
 1, 4, 1, 4, 4
 4, 1, 1, 4, 10
 4, 4, 1, 4, 2
 4, 10, 10, 10, 4
 2, 4, 4, 2, 1
 2, 4, 1, 10, 4
 1, 10, 2, 10, 10
 4, 1, 10, 1, 10
 4, 4, 4, 4, 1
 1, 2, 4, 4, 2
 4, 4, 10, 10, 2
 4, 2, 1, 4, 4
 4, 4, 4, 4, 4
 4, 2, 4, 1, 1
 4, 4, 4, 2, 4
 10, 4, 1, 4, 4
 4, 2, 1, 1, 2
 10, 2, 2, 1, 1

Example – Mean

Since we are using bootstrapping to calculate a confidence interval about the population mean, we now calculate the means of each of our bootstrap samples. These means, arranged in ascending order are: 2, 2.4, 2.6, 2.6, 2.8, 3, 3, 3.2, 3.4, 3.6, 3.8, 4, 4, 4.2, 4.6, 5.2, 6, 6, 6.6, 7.6.

Example – Confidence Interval

We now obtain from our list of bootstrap sample means a confidence interval. Since we want a 90% confidence interval, we use the 95th and 5th percentiles as the endpoints of the intervals. The reason for this is that we split 100% - 90% = 10% in half so that we will have the middle 90% of all of the bootstrap sample means.

For our example above we have a confidence interval of 2.4 to 6.6.
Posted in Mathematics | Tagged , | Leave a comment

What is the difference between Fanning and Moody friction factors?

Which is a correct equation of head loss, Equations 1 or 2?

hL = 4fLV2/2gD         (Equation 1)
hL = flv2/2gd         (Equation 2)

Equation 1 is applied Fanning equation and Equation 2 is applied Moody equation. For old books and tutorial, they like to use the Fanning equation. But, the recent books, they love to applied Moody equation. 😉

A good explanation for this issue as follows (source):

What is the difference between Fanning and Moody friction factors?

Many folks calculate 4 times greater head loss (or 4 times less) than the actual friction loss. This comes from confusion between Moody and Fanning Friction factors. Some friction factor graphs are for Moody Friction factor, which is 4 times Fanning friction factor. That is, f = 64/Re is Moody and f = 16/Re is Fanning.

Be careful with your hydraulic calcs. It is easy to mix the two and calculate 400% greater (or 25% less) head loss. The calculation for head loss in feet is:

using Moody Friction factor -
 h(friction) = f(M) * (L/D) * v^2 / (2 * g)

using Fanning Friction factor -
 h(friction) = 4*f(F) * (L/D) * v^2 / (2 * g)

where,
 h(friction) = head loss by friction in feet
 f(M) = Moody Friction factor
 f(F) = Fanning Friction factor
 L = length in feet
 D = pipe inside diameter in feet
 v = velocity in ft/s
 g = 32.174 ft/s^2, acceleration due to gravity

The Colebrook-White equation is an iterative method that calculates Fanning friction factor.
 f(F)^2 = 1 / ( -4 * Log(eps / (3.7 * D) + 1.256 / (Re * √f(F) )

where,
 eps = pipe roughness in feet
 Re = Reynold's number
Posted in Hydraulics | Tagged , | Leave a comment

Climate Extremes Indices (Re-post)

I obtained a good post (link) on the climate extremes indices. The post as follows:

Currently, the ET recommends 27 core indices (the ‘ETCCDI’ indices) that are calculated for the globe using the  RClimDex/FClimDex software.

Continue reading

Posted in Climate Change | Tagged , , | Leave a comment

Protected: R Programming (Code and Tutorial for Beginner)

This content is password protected. To view it please enter your password below:

Posted in Code | Enter your password to view comments.