Archive for the ‘GIS’ Category

  • instalasi ka-map di ubuntu

    Date: 2008.02.23 | Category: GIS | Response: 10

    Langkah-langkah di bawah ini dibuat dengan asumsi anda sudah menginstal mapserver dengan baik, kalau belum menginstal bisa dilihat di sini atau di sini jika anda menggunakan fgs

    1. Instal library phpGD : sudo apt-get phpGDini
    2. Download ka-map di sini
    3. Download gmap di sini untuk contoh aplikasinya
    4. Ekstrak ka-map ke /var/www dan rubah namanya menjadi kamap jangan lupa ubah permissionnya lalu ubah nama file /var/www/kamap/include/config.dist.php menjadi config.php kemudian buat folder tmp di /var/www/kamap/htdocs/ menjadi /var/www/kamap/htdocs/tmp
    5. Ekstrak gmap ke /var/www dan rubah namanya menjadi gmap jangan lupa ubah permissionnya
    6. Setelah itu buka browser anda test dengan ketik http://localhost/kamap/htdocs/

    Ada tips tambahan :

    Masalah permission sangat vital, saya melakukan copy paste dan setelah melakukan pengaturan… ka-map tidak bisa muncul di browser… untuk mengurangi kesalahan alangkah baiknya kalau proses ekstraksi langsung di /var/www
    referensi :
    wiki kamap

  • Aplikasi map Server pertama

    Date: 2008.02.23 | Category: GIS | Response: 4

    Pertama-tama buat file halo.html berikut ini :

    <html>
    <head><title>MapServer Hello World</title></head>
    <body>
    <form method=POST action="/cgi-bin/mapserv">
    <input type="submit" value="Click Me">
    <input type="hidden" name="map" value="/var/www/mapData/hello.map">
    <input type="hidden" name="map_web_imagepath"
    value="/var/www/tmp/">
    </form>
    <IMG src="[img]" width=400 height=300 border=0>
    </body>
    </html>

    letakkan pada /var/www/ kemudian buat folder mapData dan tmp pada /var/www, kemudian buat file hello.map :

    # This is our "Hello World" mapfile
    NAME "Hello_World"
    SIZE 400 300
    IMAGECOLOR 249 245 186
    IMAGETYPE png
    EXTENT -1.00 -1.00 1.00 1.00
    WEB
    TEMPLATE "/var/www/halo.html"
    IMAGEPATH "/var/www/tmp/"
    IMAGEURL "/tmp/"
    END
    LAYER
    STATUS default
    TYPE point
    FEATURE
    POINTS 0.0 0.0 END
    TEXT "Hello World"
    END # end feature
    CLASS
    STYLE
    COLOR 255 0 0
    END
    LABEL
    TYPE bitmap
    END
    END
    END
    END

    sebelum menjalankan di browser ketikkan sudo chmod 777 /var/www/mapData/hello.map setelah itu baru ketikkan http://localhost/halo.html,program ini

    referensi :
    Beginning MapServer.Open Source GIS Development

  • Install mapserver menggunakan FGS

    Date: 2007.12.18 | Category: GIS | Response: 2

    Beberapa hari yang lalu coba instal kamap tapi tidak berhasil… akhirnya baca-baca di website kamap, dalam dokumentasi tersebut hanya ditunjukan proses instalasi kalau kita instal mapserver menggunakan FGS akhirnya instal mapserver sekali lagi..

    1. Download FGS di sini
    2. Jalankan FGS dengan cara buka terminal lalu ketik sh fgs-mapserver_phpmapscript_4.8.2-1.2-linux-i386.bin
    Note : pada waktu tulisan ini di buat versinya adalah fgs-mapserver_phpmapscript_4.8.2-1.2
    Pertama kali saya instal mapserver menggunakan fgs ini di /usr/share tapi harus menggunakan hak akses root setelah berhasil terinstal entah kenapa start apachenya gagal… ada kemungkinan ada masalah dengan hak aksesnya… karena default ubuntu harus login menjadi user biasa… nah ketika saya ganti user menjadi root ada terjadi error “! Cannot create user ‘apache’, could not start apache as root.” bingung… dan akhirnya saya instal mapserver di /home/freddy/fgs
    3. Nanti akan ditanyakan dimanakah tempat instalasinya, saya memilih di /home/freddy/fgs/
    4. Kemudian Disuruh memilih port saya memilih port 8000 kurang lebih tampilannya seperti ini :

    ***** Welcome to the FGS Installer v0.1 *****

    This script is meant to make installing FGS components as easy as possible.

    THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
    IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
    FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
    COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
    IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
    WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

    Please send any questions to <fgs@dmsolutions.ca>.

    To install the FGS suite, press ENTER.

    To cancel, press Control-C.

    [: 75: ==: unexpected operator
    Where do you want to install the FGS suite [/home/freddy/fgs] ? /home/freddy/fgs

    + Extracting fgs-base.tar.gz from /tmp/fgs-selfextract.DJ7082…ok
    + Running base’s installer
    + module : base
    * FGS runtime ready in ‘/home/freddy/fgs’, use fgs command.
    + Running fgs install mapserver-php
    * Probing last version of module ‘mapserver-php’… 4.8.2
    + Installing mapserver-php:
    + Getting and extracting module ‘mapserver-php’… ok
    + Getting and extracting module ‘mapserver-base’… ok
    + Getting and extracting module ‘apache-base’… ok
    + Getting and extracting module ‘expat-base’… ok
    + Getting and extracting module ‘gd-lib’… ok
    + Getting and extracting module ‘jpeg-lib’… ok
    + Getting and extracting module ‘freetype-lib’… ok
    + Getting and extracting module ‘libpng-lib’… ok
    + Getting and extracting module ‘curl-lib’… ok
    + Getting and extracting module ‘proj-lib’… ok
    + Getting and extracting module ‘postgresql-lib’… ok
    + Getting and extracting module ‘gdal-base’… ok
    + Getting and extracting module ‘tiff-lib’… ok
    + Getting and extracting module ‘libgeotiff-lib’… ok
    + Getting and extracting module ‘netcdf-lib’… ok
    + Getting and extracting module ‘openssl-lib’… ok
    + Getting and extracting module ‘xerces_c-base’… ok
    + Getting and extracting module ‘unixODBC-base’… ok
    + Getting and extracting module ‘libungif-base’… ok
    + Getting and extracting module ‘libiconv-base’… ok
    + Getting and extracting module ‘proj4_epsg42xxx-support’… ok
    + Getting and extracting module ‘php-base’… ok
    + Copying all files into FGS environment… ok
    + Running apache-base’s installation script :
    * *** Apache installation ***
    * Selecting TCP port… Example: 80, 8080, 8000
    ? What TCP port do you want to use [8080] : 8000
    + Port selected : ‘8000′
    * You can start apache with : fgs start apache
    * *** End of Apache installation ***
    + Running gdal-base’s installation script :
    + Running libgeotiff-lib’s installation script :
    + Running mapserver-base’s installation script :
    + Running php-base’s installation script :
    + php.ini file installed in /home/freddy/fgs/www/conf/php.ini.template
    + Running proj-lib’s installation script :
    * Module ‘mapserver-php’ installed with success.
    ! You need to reload setenv.sh, run : cd /home/freddy/fgs ; . setenv.sh
    + Starting FGS’s daemon:
    * FGS runtime ready in ‘/home/freddy/fgs’, use fgs command.
    + Starting ‘apache’:
    Processing config directory: /home/freddy/fgs/www/conf.d/*.conf
    Processing config file: /home/freddy/fgs/www/conf.d/gdal.conf
    Processing config file: /home/freddy/fgs/www/conf.d/mapserver.conf
    Syntax error on line 1 of /home/freddy/fgs/www/conf.d/mapserver.conf:
    Invalid command ‘-e’, perhaps mis-spelled or defined by a module not included in the server configuration
    /home/freddy/fgs/etc/init.d/apache start: httpd could not be started

    111111111111111111111111111111111111111111111111111111111111111

    To start installed FGS’s daemon at boot time, do (as root) :

    $ echo “su freddy -c \”( . /home/freddy/fgs/setenv.sh ; fgs start )\”" >> /etc/rc.d/rc.local

    222222222222222222222222222222222222222222222222222222222222222

    Before using the FGS environment, you need to set some
    environment variables (each time you login) :

    $ cd /home/freddy/fgs
    $ . setenv.sh

    OR you can do it automatically each time you log in by doing :

    echo “. /home/freddy/fgs/setenv.sh” >> ~/.bashrc

    ****************************************************************

    5. Nah… setelah selesai proses instalasi maka saya melakukan cd /home/freddy/fgs kemudian saya ketik . setenv.sh pertama kali saya menjalankan ini muncul tulisan ini :

    Processing config directory: /home/freddy/fgs/www/conf.d/*.conf
    Processing config file: /home/freddy/fgs/www/conf.d/gdal.conf
    Processing config file: /home/freddy/fgs/www/conf.d/mapserver.conf
    Syntax error on line 1 of /home/freddy/fgs/www/conf.d/mapserver.conf:
    Invalid command ‘-e’, perhaps mis-spelled or defined by a module not included in the server configuration
    /home/freddy/fgs/etc/init.d/apache start: httpd could not be started

    6. Lalu saya buka /home/freddy/fgs/www/conf.d/mapserver.conf lalu saya hapus -e
    7. saya ulangi lagi . setenv.sh lalu muncul tulisan ini : * FGS runtime ready in ‘/home/freddy/fgs’, use fgs command.
    8. saya ketik fgs start apache lalu mucul tulisan :

    Processing config directory: /home/freddy/fgs/www/conf.d/*.conf
    Processing config file: /home/freddy/fgs/www/conf.d/gdal.conf
    Processing config file: /home/freddy/fgs/www/conf.d/mapserver.conf
    Processing config file: /home/freddy/fgs/www/conf.d/php.conf
    Processing config file: /home/freddy/fgs/www/conf.d/proj.conf
    [Mon Dec 17 23:22:11 2007] [warn] NameVirtualHost *:8000 has no VirtualHosts
    /home/freddy/fgs/etc/init.d/apache start: httpd started

    9. Kemudian silahkan di test dengan membuka web browser favorit anda kemudian ketikkan http://localhost:8000/ jika keluar tulisan index Of berarti anda sukses menginstalnya :)

  • Instalasi mapserver di window dan ubuntu

    Date: 2007.12.10 | Category: GIS | Response: 3

    Kemaren coba instal mapserver di komputer… saya baru saja migrasi dari window ke linux(Ubuntu) lalu mencoba instal mapserver karena ada kerja buat Sistem Informasi Geografi (SIG) beberapa bulan lalu coba instal di window cukup gampang…

    1. Tinggal download ms4w
    2. Kemudian setelah download selesai tinggal extract di C:/
    3. Jalankan apache-install.bat yang terleletak dalam direktori C:/ms4w/apache-install.bat
    4. Buka browser anda, kemudian ketik http://localhost, jika sudah benar maka akan muncul halaman perkenalan mapserver

    Gampang :)

    Pertama kali migrasi ke Linux ubuntu agak bingung… cara instalasinya agak beda… Langkah yang saya lakukan :

    1. Klik System >> Administration >> Synaptic Package Manager lalu klik Search apache2,cgi-mapserver, mapserver- bin, php5-mapscript dan php5 setelah itu klik apply.
    2. Setelah itu saya buka browser dan ketik http://localhost dan yang terjadi adalah… tidak keluar halaman pengenalan mapserver… saya langsung bingung… karena berbeda dengan di window… bingung lalu search di google dengan kata kunci mapserrver instalation lalu keluar beberapa link.. salah satunya blog milik Bayu Kurniawan kemudian baca-baca di sini, untungnya dia lagi online… lalu chat sama dia… agak lama… kemudian ketemu solusinya
    3. Ketik http://localhost/cgi-bin/mapserv lalu jika keluar tulisan “No query information to decode. QUERY_STRING is set, but empty” berarti anda sukses menginstalnya :D

    Special Thank’s to Bayu Kurniawan :D