Your SlideShare is downloading. ×
Introduction to GeoDjango
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×

Introducing the official SlideShare app

Stunning, full-screen experience for iPhone and Android

Text the download link to your phone

Standard text messaging rates apply

Introduction to GeoDjango

529
views

Published on

Published in: Technology

0 Comments
2 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
529
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
18
Comments
0
Likes
2
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. Introduction to GeoDjango David Wilson
  • 2. An Outline: • Who am I? • What is GeoDjango? • A Tour of GeoDjango • Example: Colorado Geology
  • 3. Who Am I?
  • 4. Who Am I? ● Full time Java developer ● Love Python and the web ● Degree in Geophysics ● Some GIS background, actively working to improve knowledge ● Travel, weight lifting, cycling, and skiing
  • 5. What is GeoDjango?
  • 6. GeoDjango = spatial toolbox
  • 7. Spatial?
  • 8. Not Spatial
  • 9. Spatial!
  • 10. A Tour of GeoDjango
  • 11. Tour: Backends
  • 12. Tour: Backends Use this one!
  • 13. Tour: Models from django.contrib.gis.db import models
  • 14. Tour: Models
  • 15. Tour: Model Fields ● GeometryField ● PointField ● LineStringField ● PolygonField ● MultiPointField ● MultiLineStringField ● MultiPolygonField ● GeometryCollectionField
  • 16. Tour: GeoManager ● Overrides model manager ● Enables spatial queries ● Gotcha: required on models with no spatial fields that need to query related models spatially
  • 17. Tour: GeoQuerySet ● Many spatial queries, e.g. ● contains ● crosses ● overlaps ● intersects ● Distance and area queries ● Gotcha: query availability varies based on backend
  • 18. Tour: GeoQuerySet Use this one!
  • 19. Tour: GEOS API • Geometry Engine – Open Source • Loosely coupled to GeoDjango • Allows for simple creation, manipulation, and transformation of geometries
  • 20. Tour: GDAL API ● Geospatial Data Abstraction Library ● Reads spatial data: ● Shapefiles ● KML ● And many, many more! ● Easy to abstract data sources
  • 21. Tour: GeoIP • Ctypes wrapper for MaxMind GeoIP • Requires appropriate local dataset • Allows server-side location • Generally not as accurate as HTML5 location API
  • 22. Tour: GeoAdmin
  • 23. Example: Colorado Geology
  • 24. Example: Objectives • Find Colorado geology data • Import data • Query data (find rocks near you!) • Make a pretty map
  • 25. Example: Finding Data
  • 26. Example: Importing Data
  • 27. Example: Importing Data
  • 28. Example: View
  • 29. Example: JavaScript
  • 30. Example: More JavaScript
  • 31. Example: Demo
  • 32. Conclusions
  • 33. Conclusions • Spatial toolbox • Use the parts you need • Built into the same Django you already own! • Will need to understand GIS basics • I hope to clean up this demo app and make a full tutorial
  • 34. Resources Docs: https://docs.djangoproject.com/en/dev/ref/contrib/gis/ Vagrant image: https://github.com/david-wilson/vagrant-geodjango-base USGS Colorado Geology Data: http://mrdata.usgs.gov/geology/state/state.php?state=CO LeafletJS: http://leafletjs.com/ Contact Me: david@davidwilson.me, @dwilson86, http://davidwilson.me