Jan 17, 2011

ka-map

This is a techie post. You have been warned.. :P

On the past few weeks, I have been engaged to a GIS project. The requirement is to develop a web-based GIS system using full open-source technology, namely PostGIS (database), PHP (language) and Apache HTTP (server). Although the system comes with several other modules (management and business processes), I was in-charge to handle the GIS module (yay!!). This is indeed a blessing to me as I had been trying to jump into the GIS field for quite some time with no success. As such, I will keep on posting my progress on the project. Apologize on the non-frequent update as I was (and will be) very busy from now on :)

Tools/Things needed:
1) Apache HTTP server. Google it and get the latest version.
2) PHP 5.2 specifically. Explained below why this version is needed.
3) PostGIS
4) MapServer (get from www.mapserver.org)
5) Quantum GIS
6) Shapefile(s)

I don't think a tutorial of how to install Apache and PHP is needed to be drawn here. Google has plenty of this tutorial and I find it more than enough. Once you've done installing the server and PHP (and PostGIS), install MapServer. Ensure to set the mapserv binary file as CGI in your Apache environment. There are sets of required files with the CGI. Not sure which is which, so I just chuck the whole thing in the folder. You may use Dependency Walker to check the required library files though if you have plenty of free time.

Once done installing, test the CGI by going to http://your-CGI-path/mapserv.exe. This should return some error message stating no query string set or something similar. If this message is returned, then you have successfully installed MapServer.

For mapserv to display a map, it requires 2 things, namely shapefile(s) and map file. What it does is the map file acts as the gate between a shapefile and the mapserv, which will control how the map is presented (color, label and so on). The map file also tells the mapserv where the shapefile is (in our case, the PostGIS database). Plenty of tutorial available on the Net on how to configure a  map file. To view a map, simply browse to http://your-CGI-path/mapserv.exe?map=map-file-path&mode=map. If all things are correctly defined, a map will be drawn based on the shapefile (or database) specified in the map file.

Below is a sample of map that I generated.

Majlis Bandaraya Petaling Jaya :)

Dec 18, 2010

+1 in a Different Context

Yesterday, 17th Dec 2010.

I am now a proud owner of a unit of Casa Idaman.

note: skang suka plak nak buat update pendek-pendek..

Dec 10, 2010

+1

Thank you Izma, Jobstreet, Utopia Temple, Mak, Nana, Adik, Along, Razman and several others (in no particular order).

Dec 8, 2010

Un'sangka'rable

Sila lihat ini..

(klik gambar untuk full view)

Dec 2, 2010

Accident: Chronology

Aku rasa korang tau aku penah eksiden tahun lepas. So untuk mengelakkan aku lupa apa yang perlu dibuat in the event of accident lagi skali (hopefully not *touch wood*), entry ini ialah list down apa yang perlu dibuat etc.

1. Jot down nombor kenderaan yang terlibat
2. Kalau dapat, jot down jugak no IC pihak yang terlibat
3. Jot down masa, nama jalan & kilometer berapa kejadian berlaku
4. Gi balai polis, buat report. Report tu normally dah ada template, just follow & tukar mana yang patut (no kenderaan, masa, tempat, detail kejadian etc)
5. Polis akan assign sorang IO (Investigation Officer) untuk kes ni, so bawak-bawak la berbaik dengan dia untuk memudahkan keje
6. Selang 2-3 hari (atau dalam kes aku, 2 minggu!) korang akan dapat salinan report, gambar etc. Bawak mende-mende ni untuk claim insurans.

Based pada pengalaman aku, kalau korang dilanggar dari belakang memang confirm korang tak salah. Polis akan claim kete belakang salah, even though korang buat emergency brake. Antara ayat standard IO tu, "yang awak tak follow 4-second rule tu kenapa? kalau follow, orang emergency brake pun awak mesti sempat elak". Then kalau kete korang bawah dari 5 tahun usianya, better antar repair kat manufacturer sebab barang yang korang dapat adalah sure ori. Kalau lebih, buat bengkel biasa-biasa pun tak kisah dah. Then bengkel manufacturer ni pulak agak malas nak layan kes-kes repair yang claim insurans ni, sebab lambat dapat payment. So kena la push sket bagi diorang bergerak.

Kalau kes dilanggar dari belakang, kete korang lebih 5 tahun & kete yang melanggar tu pulak kete mahal, boleh jugak kalau korang settle kat situ. Menyenangkan keje korang dan owner kete tu plak lagi suka sebab tak affect NCD dia. Tapi make sure jumlah yang korang dapat dari si pelanggar tu berpadanan dengan kerosakan. Pastu, biasa jugak aku dengar kes si pelanggar ni kata nak antar kat bengkel yang dia pilih. Atas sebab tu bengkel kawan dia so maybe boleh dapat murah (ye ke, tah-tah sebab dia pakat ngan kawan dia nak buat keje sambil lewa..). Jangan ikut rule camni, korang dah dilanggar so korang patutnye yang decide nak pegi bengkel mana. Kalau dia tak setuju, then settle kat balai jela (which is, lagi merugikan dia sebab affect NCD).

So, tu serba sedikit hal accident. Kalau ada mende tertinggal nanti aku tambah lagi.