Using GeoDjango for user participation in enriching web GIS systems Bo Zhao University of Florida July 15 th, 2009.

Slides:



Advertisements
Similar presentations
.NET 3.5 SP1 New features Enhancements Visual Studio 2008 SP1 New features Enhancements Additional features/enhancements.
Advertisements

1.  Understanding about How to Working with Server Side Scripting using PHP Framework (CodeIgniter) 2.
Unleashing the Power of Kinetic Bridging Ben Christenson Kinetic Data.
Flood Map Library MD. M. HAQUE DWR-HYDROLOGY. Building a Flood Map Library Indexing existing flood maps and geospatial data for search and retrieval Separate.
Planned Title: Review of Evaluation of Geospatial Search Allan Doyle.
EE-Video Yossi Biton Nir Yakobovski Outline  The concept  Main functionality  Challenges & Solutions  Design considerations Layers Class diagram.
Week 2 IBS 685. Static Page Architecture The user requests the page by typing a URL in a browser The Browser requests the page from the Web Server The.
Lecture 4: Introduction to PHP 3 PHP & MySQL
EE-Video Yossi Biton Nir Yakobovski Outline  The concept  Main functionality  Challenges & Solutions  Design considerations Layers Class diagram.
LHCbPR V2 Sasha Mazurov, Amine Ben Hammou, Ben Couturier 5th LHCb Computing Workshop
Today’s Agenda Bill Presentment Overview Demo. Tailoring Your Invoices with Oracle’s Bill Presentment Architecture March 7, 2005.
Session-01. Hibernate Framework ? Why we use Hibernate ?
User Group 2015 Version 5 Features & Infrastructure Enhancements.
Geographic Web Applications for Perfectionists with Deadlines
Web Development Methodologies Yuan Wang(yw2326). Basic Concepts Browser/Server (B/S) Structure Keywords: Browser, Server Examples: Websites Client/Server.
OMap By: Haitham Khateeb Yamama Dagash Under Suppervision of: Benny Daon.
RUBY ON RAILS It’s so rad. What we’ll cover  What is Ruby?  What is RoR?  Why RoR?  Developing with RoR  Deployment  Demo  Questions.
Database Application Security Models
1 Web Developer & Design Foundations with XHTML Chapter 6 Key Concepts.
Dj(T)ango with Python Ritika Virmani. What is Django? It’s not a Hawaiian dance Developed by Adrian Holovaty and Simon Willison Rapid Web Development.
UVa cs1120 David Evans Lecture 34: Djustifying Django.
CIS 375—Web App Dev II ASP.NET 2 Introducing Web Forms.
Entity Framework Code First End to End
건전지로 달리는 쟝고 세미나. 파트2 Last time MVC Views and URLconfs.
Server-side Scripting Powering the webs favourite services.
NHibernate in Action Web Seminar at UMLChina By Pierre Henri Kuaté 2008/08/27
Codeigniter is an open source web application. It occupies a very small amount of space in the memory and is most useful for developers who aim to develop.
Sir Tim Berners-Lee (1955-) British computer scientist Inventor of the World Wide Web in 1989 (developed the first HTML protocol and sent the first messages.
Lecture 19 Web Application Frameworks Boriana Koleva Room: C54
SQL Queries Relational database and SQL MySQL LAMP SQL queries A MySQL Tutorial and applications Database Building Assignment.
Best Practices for Designing Effective Map Services Tanu Hoque.
CakePHP is an open source web development framework. It follows Model-View- Controller and is developed using PHP. IT is the basic for user to create.
Fall CIS 764 Database Systems Design L8. Web ….
Who uses it? MichaelMoore.com What's it all about? Rapid Development Clean, Pragmatic Design.
Lap Around Visual Studio 2008 &.NET 3.5 Enhancements.
MVC Design Pattern Web Developer at Crimshield, Inc Application Developer at IBM Present - Delta Developer at Tides.
First Indico Workshop WEB FRAMEWORKS Adrian Mönnich May 2013 CERN.
Domain and Persistence Patterns. Fundamental Pattern Types Design Patterns Business Logic Patterns.
MVC Concepts Basics Model-View-Controller (MVC) Concepts for Web Developers SoftUni Team Technical Trainers Software University
Experts Workshop on the IPT, v. 2, Copenhagen, Denmark The Pathway to the Integrated Publishing Toolkit version 2 Tim Robertson Systems Architect Global.
Django 101 By: Jason Sumner. Django Overview Django was started in 2003, released under BSD in 2005, and the Django Software Foundation was established.
Building Secure Web Applications With ASP.Net MVC.
CSE 154 LECTURE 5: INTRO TO PHP. URLs and web servers usually when you type a URL in your browser: your computer looks up the.
Module 8 : Configuration II Jong S. Bok
 Registry itself is easy and straightforward in implementation  The objects of registry are actually complicated to store and manage  Objects of Registry.
CD Collection Hector Urtubia Fall Summary Motivation and Objective Technologies Used Project Design Database Design and Integration Demo.
WalkLite in Mobile GIS: A Schema to Extend and Symbolize SpatiaLite Dr. X. Chen Walkinfo Tech. Co. Ltd.
© FPT SOFTWARE – TRAINING MATERIAL – Internal use 04e-BM/NS/HDCV/FSOFT v2/3 JSP Application Models.
Google Map Engine Can export images to Map Engine from Earth Engine
ASSIGNMENT 2 Salim Malakouti. Ticketing Website  User submits tickets  Admins answer tickets or take appropriate actions.
Publishing GIS Services to ArcGIS Server
Introduction to ORM Hibernate Hibernate vs JDBC. May 12, 2011 INTRODUCTION TO ORM ORM is a programming technique for converting data between relational.
ORM Basics Repository Pattern, Models, Entity Manager Ivan Yonkov Technical Trainer Software University
CS520 Web Programming Object-Relational Mapping with Hibernate and JPA (I) Chengyu Sun California State University, Los Angeles.
CS 440 Database Management Systems Stored procedures & OR mapping 1.
Submitted by: Moran Mishan. Instructed by: Osnat (Ossi) Mokryn, Dr.
The Django Web Application Framework zhixiong.hong
Esri UC 2014 | Technical Workshop | Administering ArcGIS for Server with Python Jon Bodamer.
Flood Map Library MD. M. HAQUE DWR-HYDROLOGY. Building a Flood Map Library Indexing existing flood maps and geospatial data for search and retrieval Separate.
Videolösungen © DResearch 2009 The web framework for perfectionists with deadlines Pony Logo credits: Bryan Veloso;
The Holmes Platform and Applications
Deploying Web Application
What is Laravel ? By Georgi Genov.
Haritha Dasari Josue Balandrano Coronel -
Multitier Architecture, MySQL & PHP
Django in the real world
Robotics Website By Andy Kelley.
Best Practices for Designing Effective Map Services: Case Studies
Combining ArcGIS for Server & ArcGIS Online
Query Interface using Django
Presentation transcript:

Using GeoDjango for user participation in enriching web GIS systems Bo Zhao University of Florida July 15 th, 2009

Requests IDFunctionItem 1CGA assigned logins authentication & Permissions 2User login ability 3User uploads shape file to server shapefile uploading 4User specifies layer symbology spatial data customizing & management 5User populates Layer List tab 6User defines layer searchability 7User defines attributes returned 8Files that are generated if adding new layer Spatial Crud & related operation 9Files effected when layer is removed

So we need… Web Framework – PHP, ASP, Python, Java Geospatial libraries – Commercial Geospatial libaries, Open Source libaries.

Why Python Matters? Glue Language Dynamic script Language

Open Source Geospatial Libs Pros – Open source is very competitive for geospatial server software – Reduced total cost of ownership – Possibility that you own your own software – Better preparation for computing trends. Cons – Limited technical support. – Adding Patches or updating might render to crash. – Possibility that you own your own software

Why Geodjango?

“Django is a high-level Python web framework that encourages rapid development and clean, pragmatic design.”

Features of Django Framework Object-relational mapper: Define your data models entirely in Python. You get a rich, dynamic database-access API, unnecessary to write SQL for query. Template system: Use template language to separate design, content and Python code. Automatic admin interface: Django does that automatically, and it's production-ready. Elegant URL design: Design pretty URLs with no framework-specific limitations. Be as flexible as you like. Cache system: cache frameworks for super performance. Internationalization: Django has full support for multi- language applications.

Design Pattern MTV Model Template View

Model

Object-relational mapping Object-relational mapping (ORM) – a programming technique for converting data between incompatible type systems in relational databases and object-oriented programming languages. – ORM creates, in effect, a "virtual object database" that can be used from within the programming language.

CREATE TABLE “hug_layer_world" ( "id" serial NOT NULL PRIMARY KEY, "name" varchar(300) NOT NULL, "geom" geometry NOT NULL, CONSTRAINT hug_layer_world_pkey PRIMARY KEY (hug_fid), CONSTRAINT enforce_dims_geom CHECK (ndims(geom) = 2), CONSTRAINT enforce_geotype_geom CHECK (geometrytype(geom) = 'MULTIPOLYGON'::text OR geom IS NULL), CONSTRAINT enforce_srid_geom CHECK (srid(geom) = 4326) );

Scary Quirky Language SQL knows no version control Can be dangerous DRY(Don’t Repeat Yourself.)

from django.contrib.gis.db import models class LAYERS(models.Model): id = models.AutoField(primary_key=True) name = models.CharField(max_length=20) geom = models.MultiLineStringField(srid=4326) objects = models.GeoManager()

SELECT "hug_layer_world"."id", "hug_layer_world".“name", "hug_layer_world".“geom" FROM ""hug_layer_world" WHERE "hug_layer_world"."name" = "China"; WORLD.objects.filter(title='China')

Template DRY(Don’t repeat yourself)

index.html {% block title %}{% endblock %} {% block content %}{% endblock %}

tilecache.cfg [{{layer.name}}] url = {{layer.mf_url}} layers = {{layer.name}} spherical_mercator = {{layer.tc_spherical_mercator}} extension = {{layer.tc_extension}} metatile = {{layer.tc_metatile}} srs = EPSG:{{layer.tc_srs}} type = {{layer.tc_type}} searchable = {{layer.tc_searchable}} …

dataLayer.js amTemplates.{{layer.name}} = ' ' + {% for item in layer.alias %} {% ifnotequal item.name 'geom' %} ' {{item.alias}} {{layer.left}}{{item.name}}{{layer.right}} ' + {% endifnotequal %} {% endfor %}' ';

View

URLs

/export.php?id=2&type=tilecache /upload.aspx?filetype=shapefile /export/tilecache/world/ /upload/shapefile/

url.py (r'^admin/upload/', 'upload_zipped_shapefiles.upload_zipfile'), (r'^admin/export/$', 'export_config_files.index'), (r'^databrowse/(.*)', databrowse.site.root), (r'^map/(?P.*)$', 'django.views.static.serve', {'document_root': settings.MAPS_DIR, 'show_indexes': True}),

View functions def index(request): all_layers = LAYER.objects.all() all_maps = MAP.objects.all() return render_to_response('export.html', {'layers': all_layers, 'maps': all_maps, 'user': request.user})

App

world/ __init__.py admin.py models.py views.py templates/ layer_javascript.html layer_tilechache.html layer_mapfile.html

Hands-on demo

Thanks, any questions?

References Justin Bronn, Web Applications for (Neo)Geographers with Deadlines, Oct