1 / 24

DATABASE SPASIAL DENGAN POSTGRESQL

DATABASE SPASIAL DENGAN POSTGRESQL. GALIH WASIS WICAKSONO TEKNIK INFORMATIKA UMM. PENGANTAR. PostGIS adalah extensi spasial untuk PostgreSQL PostGIS bertujuan untuk menjadikan OpenGIS menjadi fitur yang mudah dan sederhana bagi SQL dalam database spasial. TUJUAN POSTGIS.

Download Presentation

DATABASE SPASIAL DENGAN POSTGRESQL

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. DATABASE SPASIAL DENGAN POSTGRESQL GALIH WASIS WICAKSONO TEKNIK INFORMATIKA UMM

  2. PENGANTAR • PostGISadalahextensispasialuntukPostgreSQL • PostGISbertujuanuntukmenjadikanOpenGISmenjadifitur yang mudahdansederhanabagi SQL dalam database spasial.

  3. TUJUAN POSTGIS • Database spasial yang Open source • Database denganfiturspasialsangatmahal ex oracle • Memilikibanyakfitur – fitur/fungsispasial • Mengembangkanfungsispasialcukupsulit. • Mendukungfungsispasialuntukberbagaitujuan. • Mendukungorganisasiinformasi, visualisasi, dananalisaspasial.

  4. MODEL DATA SPASIAL • Jalandirepresentasikandengangaris • kotaksuratdirepresentasikandengantitik.

  5. MODEL DATA SPASIAL • Landusedirepresentasikanpoligon

  6. MODEL DATA SPASIAL • Kombinasi data spasial (point, line, poligon)

  7. RELASI SPASIAL

  8. DISTANCE

  9. DISTANCE TO VARIOUS POINT

  10. KEDEKATAN / ADJACENCY

  11. KONEKTIVITAS

  12. CONTAINMENT/KANDUNGAN

  13. CONTAINMENT & ADJACENCY

  14. PENGGUNAAN DB SPASIAL • Geocodable addresses • Customer location • Store locations • Transportation tracking • Statistical/Demographic • Cartography • Epidemiology • Crime patterns • Weather Information • Land holdings • Natural resources • City Planning • Environmental planning • Information Visualization • Hazard detection

  15. KEUNTUNGAN DB SPASIAL • Dapatmemperlakukan data spasialdengan model apapundalam database : • transactions • backups • integrity checks • less data redundancy • fundamental organization and operations handled by the Database • multi-user support • security/access control • locking

  16. KEUNTUNGAN DB SPASIAL • Mengatasitugas – tugasbesardari db server • organisasidan indexing • tidakperlu re-implementasibagi operator • tidakperlu re-implementasibagifungsi • Waktu yang dibutuhkanuntukmengembangkanaplikasi database disisi client lebihmudah

  17. KEUNTUNGAN DB SPASIAL • Query spasialuntukrelasi • distance • adjacency • containment • Query spasialuntuk operator • area • length • intersection • union • buffer

  18. QUERY OPERATOR SPASIAL Original Polygons Intersection Union

  19. QUERY OPERATOR SPASIAL Buffered rivers Original river network

  20. CONTOH SQL • Membuat table pubs create table pubs name varchar,beer_price float4); addgeometrycolumn(‘beer_db’,'pubs','location’,2167,'POINT',3);

  21. CONTOH SQL • Insert data insert into pubs values( 'Garricks Head‘, 4.50, GeometryFromText( 'POINT(1196131 383324)’, 2167 ) );

  22. CONTOH SQL Insert data

  23. PERFORM QUERY select name, beer_price, distance(location, GeometryFromText('POINT(1195722 383854)',2167)) from pubs order by beer_price; name | beer_price | distance ---------------+------------+------------------ Fireside | 4.25 | 1484.10275160491 The Forge | 4.33 | 1533.06561109862 Rumours | 4.46 | 2042.00094093097 Garricks Head | 4.5 | 669.389105609889 Slap Happy | 4.5 | 1882.31910168298 Old Bailys | 4.55 | 1147.20900404641 Black Sheep | 4.66 | 536.859935972633 Big Bad Daves | 4.75 | 907.446543878884

  24. PERFORM QUERY select name, beer_price + 0.001 * distance(location, GeometryFromText('POINT(1195722 383854)',2167)) as net_price from pubs order by price; name | net_price ---------------+------------------ Garricks Head | 5.16938910560989 Black Sheep | 5.19685978338474 Big Bad Daves | 5.65744654387888 Old Bailys | 5.69720919478127 Fireside | 5.73410275160491 The Forge | 5.86306553480468 Slap Happy | 6.38231910168298 Rumours | 6.50200097907794

More Related