1 / 44

Automatic Generation of Web-Based GIS/Database Applications

Automatic Generation of Web-Based GIS/Database Applications. Nirut Chalainanont Junya Sano Toshimi Minoura Department of Computer Science Oregon State University Corvallis, Oregon, 97331-4602 minoura@eecs.orst.edu. Outline. Web-based GIS/database applications WebGD Framework

kata
Télécharger la présentation

Automatic Generation of Web-Based GIS/Database Applications

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. Automatic Generation of Web-Based GIS/Database Applications Nirut Chalainanont Junya Sano Toshimi Minoura Department of Computer Science Oregon State University Corvallis, Oregon, 97331-4602 minoura@eecs.orst.edu

  2. Outline • Web-based GIS/database applications • WebGD Framework • Automatic generation of Web-form scripts • Automatic generation of map-layer configuration files • Conclusions

  3. Capabilities of WebGD Applications • Geographical features can be inserted, queried, and deleted from a map interface. • A map interface and Web-form scripts can be automatically generated. • Dynamic switching of spatial references is supported.

  4. Capabilities of WebGD Applications (cont’d) • GIS data in an area selected by the user can be exported as a shapefile. • A treeview can be automatically created. • A PDF file containing the map image and data retrieved from the database can be created. • Photo images can be uploaded.

  5. Natural Heritage Information System

  6. Searching in a Selected Area

  7. Getting Information

  8. Inserting a New Motel

  9. Treeview

  10. PDF File Generation

  11. Uploading Photo Images

  12. WebGD Architecture PHP scripts create the map object and access the database. Web Browser Defines PHP classes for GIS objects. PHP Web Server PHP/MapScript Provides functions to manage geospatial data MapServer PostGIS Generates map images. PostgreSQLDatabase Stores geospatial and business data.

  13. PostgreSQL • The object-relational feature of PostgreSQL simplifies manipulation of geographical objects: select gid from sites where geom_col && setSRID(BOX2D(10 20, 80 90)::box2d, 6010)); select X(geom_col), Y(geom_col) from sites where gid = 100;

  14. Dynamic Switching of Spatial References • World Longitude/Latitude • North America  Albers Equal Area • California UTM 10 and 11 • Oregon  Lambert Conformal Conic

  15. World in Longitude/Latitude

  16. North America in Albers Equal Area

  17. Continental United States in Albers Equal Area

  18. Oregon in Lambert Conformal Conic

  19. Corvallis in Lambert Conformal Conic

  20. Dynamic Switching of Spatial References • The world is divided into regions with sizes ranging from the entire world to a state/province in a country. • Each region has an associated rank number. • Each time a user changes the extent by zooming or panning, many regions may cover the new map extent. The region with the largest rank number, which is normally the smallest region that includes the extent, is selected

  21. Selecting a Region Region 1 (rank 1) Region 2 (rank 11) Region 2 selected Region 3(rank 12) Region 3 selected Region 1 selected

  22. WebGD Framework • A collection of scripts common to all WebGD applications • Customizable with configuration files • Sever-side scripts written in PHP • Client-side scripts written in JavaScript

  23. Region Configuration • Map projection • Unit distance of measurement • Name of the map file for the region • Name of the map layer configuration file • Name of quick view configuration file

  24. Region Configuration

  25. Map Layer Configuration The following information is kept for each map legend entry: • Spatial reference ID • Geometry type • Icon and label for the layer • Database table associated with the layer • Actions associated with the layer

  26. Map Layer Configuration

  27. Quick View Configuration The quick view mechanism allows the user to go to a predefined area directly: • Spatial reference for each area • Extent of each area • Name of each area

  28. Quick View Configuration

  29. WegGD Application Generator • WebGD-Gen automatically generates a consistent set of Web scripts from configuration files, including those for a map interface. • Configuration files are again automatically generated from a relational database schema. • The cost of application development is greatly reduced.

  30. WebGen TreeGen Configuration Configuration File File Search Search Template Script Select Select Template Script Edit Edit Template Script Info Info Template Script Action Action Template Script TreeView TreeView Template Script Form Script Generation Process

  31. Linked Forms Department Select Form Selected ID Department Search Form Student Edit Form Department Edit Form Course Select Form

  32. WebGen Configuration File • $search_fieldsfor the search script. • $search_fields, $select_fields and$search_join_tables for the select script • $edit_fields for the edit script • $info_blocks for information script

  33. Search and Select Forms for Table students

  34. $search_fields $search_fields=array( array("column"=>"student_id", "label"=>"Student ID", "type"=>"numeric", "maxlen"=>"40", "size"=>"40"), array("column"=>"first_name", "label"=>"First Name", "type"=>"text", "maxlen"=>"40", "size"=>"40"), . . . );

  35. $search_join_tables joined_tableindicates the associated table linked to the anchor table: $search_join_tables = array( "departments" => array( "joined_table"=> "departments ON departments.department_id = students.department_id", "used"=>"false", "select"=>"true"), );

  36. Configuration Parametersfor a Map Interface • WebGD-Gen can generate the statements for inserting, searching, and deleting geographical features from the following lines in a Web-script configuration file: $web_gd = ‘MULTIPOLYGON’; $layer_name = ’grp_eo_py’; $geometry_column = ‘the_geom’; $gid_column = ‘gid’; $db_table_srid = 32119;

  37. Process of Creating Map-Layer Configuration File for Region xxx Database Map File map_mconfgen xxx_maplayer.mconfig User Customization Customized xxx_maplayer.mconfig map_confgen xxx_maplayer.config

  38. Map-Layer Meta Configuration File • The default map-layer meta configuration file is created by map_mconfgen from • table geometry_columns in the database and • the layer-group names in the map file • User can customize the meta configuration file.

  39. Meta Configuration File • Default meta configuration file • User customized meta configuration file 'grp_eo_py' => array( 'layer_selectable' => true, 'legend_label' => 'Eo Py', ), 'grp_eo_py' => array( 'layer_selectable' => true, 'legend_label' => 'EO Polygons', 'search_script' => 'forms/eo/eo_py_search.phtml', 'select_script' => 'forms/eo/eo_py_select.phtml', 'edit_script' => 'forms/eo/eo_py_edit.phtml', 'img_src' => 'images/eo_poly.png', ),

  40. Map-Layer Configuration File • map_confgengenerates the map-layer configuration file by applying customized data in the meta configuration file to the meta data retrieved from • table geometry_columns in the database and • the layer-group names in the map file

  41. Definition of a Layer Configuration 'grp_eo_py' => array( 'geom_type' => ‘POLYGON', 'table' => 'eo_py', 'layer_selectable' => true, 'legend_label' => 'EO Polygons', 'geom_col' => 'the_geom', 'gid_column' => 'gid', 'normal_layer' => 'eo_py', 'img_width' => 26, 'img_height' => 26, 'img_src' => 'images/eo_poly.png', 'data_srid' => 32119, 'search_script' => 'forms/eo/eo_py_search.phtml', 'select_script' => 'forms/eo/eo_py_select.phtml', 'edit_script' => 'forms/eo/eo_py_edit.phtml', 'searched_layer' => 'eo_py_searched', 'checked_layer' => 'eo_py_checked', 'selected_layer' => 'eo_py_selected', 'onclick' => 'activate_layer("grp_eo_py")', ),

  42. Conclusions Web-based GIS/database applications have a great potential for user-participatory applications. • Users can add geographical features and associated data with Web browsers. • The major part of creating a WebGD application can be automated. • The whole world or the entire USA can be seamlessly covered.

  43. Dileep Arur Haris Gunadi Surya Halim Hong Gyu Han Mariko Imaeda Junya Sano Akash Sharma Hiroshi Tashiro Naroot Wanalertlak Paphun Wangmutitakul Teerawat Wuttiwat Acknowledgement

  44. URL http://yukon.een.orst.edu/

More Related