Adding Geo into your Django

Video in TIB AV-Portal: Adding Geo into your Django

Formal Metadata

Adding Geo into your Django
Title of Series
Part Number
Number of Parts
CC Attribution 3.0 Unported:
You are free to use, adapt and copy, distribute and transmit the work or content in adapted or unchanged form for any legal purpose as long as the work is attributed to the author in the manner specified by the author or licensor.
Release Date

Content Metadata

Subject Area
This presentation will teach the audience the basics of GIS and GeoDjango. Once you know how to set up a Django project, putting a map on your webpage hasn't been easier. During my talk, I will show you how to navigate through the GeoDjango documentation as well as other handy tools such as Mapbox and Leaflet. In addition, I will show the audience two GeoDjango examples – a project about my Study Abroad trip and an interactive campus map! The overall objective is for the audience to know that GeoDjango exists, how to use it, and to promote creativity for their next project!
Revision control Slide rule Computer animation Neuroinformatik
Type theory Information Projective plane Interactive television Object (grammar)
Process (computing) Computer animation Observational study Information Integrated development environment Euler angles Multiplication sign Projective plane Mathematical analysis Computer science Video game Mass
Point (geometry) Radius Computer animation Integrated development environment Mapping Visualization (computer graphics) Multiplication sign Smartphone Cartesian coordinate system Code Computer programming Near-ring
Scripting language Trail Texture mapping Mapping Projective plane Expert system Attractor Computer programming Field (computer science) Computer animation Order (biology) File archiver Right angle Reading (process) Library (computing)
Projektive Geometrie Computer animation Different (Kate Ryan album) Projective plane Set (mathematics) Database Extension (kinesiology)
Computer file Gender Projective plane Shared memory Database Shape (magazine) Student's t-test Neuroinformatik Projektive Geometrie Frequency Medical imaging Arithmetic mean Computer animation Internetworking Right angle Figurate number Endliche Modelltheorie Freeware
Computer animation Computer file Query language Database Shape (magazine) Form (programming)
Texture mapping Computer animation Computer file String (computer science) Structural load Gastropod shell Endliche Modelltheorie Shape (magazine) Field (computer science) Number
Point (geometry) Mobile app Texture mapping Mapping Latin square System administrator Multiplication sign Projective plane Student's t-test Wave packet Neuroinformatik Number Projektive Geometrie Word Computer animation String (computer science) Universe (mathematics) Normal (geometry) Software testing Endliche Modelltheorie Position operator
Point (geometry) Geometry Computer animation Mapping Computer file Key (cryptography) Latin square View (database) Polygon Electronic visual display Shape (magazine) Cartesian coordinate system
Serial port Computer animation Projective plane Right angle Software framework Student's t-test Field (computer science) Number
Uniform resource locator Computer animation
Point (geometry) Geometry Web page Computer file Code Multiplication sign Zoom lens 1 (number) Projektive Geometrie Mathematics Computer configuration Cuboid Software testing Area Scripting language Constraint (mathematics) Mapping Projective plane Line (geometry) Demoscene Process (computing) Computer animation Website output Freeware Computer forensics
Scripting language Point (geometry) Arm Mapping Computer file Java applet Multiplication sign Hyperlink Student's t-test System call Computer icon Product (business) Data mining Profil (magazine) Cuboid Electronic visual display
Point (geometry) Building Mapping Computer file Length Interactive television Coma Berenices Shape (magazine) Medical imaging Computer animation Universe (mathematics) Website Energy level Electronic visual display Right angle Game theory Social class
Point (geometry) Laptop Presentation of a group Computer file Link (knot theory) Latin square Multiplication sign View (database) Virtual machine Shape (magazine) Perspective (visual) Field (computer science) Computer programming Twitter Revision control Web 2.0 Medical imaging Green's function Endliche Modelltheorie Extension (kinesiology) Booting Social class Installation art Default (computer science) Texture mapping Mapping Validity (statistics) Information Weight Software developer Projective plane Interactive television Database Lattice (order) Flow separation Type theory Visualization (computer graphics) Network topology Order (biology) output Website Right angle Object (grammar) Quicksort Annihilator (ring theory) Arc (geometry)
1 but that of the time and of the of the end of the and the have of aligned planned today I'll be talking about how you can add year to year Django and at Pristop I want to apologize if my slides slightly askew I originally clear my PowerPoint on and bond you I transferred it to a PC come computer so I'm using in this matter book so it's touched 3 of us and you can follow along on a on the PDF version is at the other between slash G agenda 15
so give you information about myself I will I will I had I you guys to what GIS maybe if you're not familiar with that and how GIS and type on on interact each other and then what you gender is all about what you can do it so my overall objective is to introduce you guys to you jingoism hopefully guys can make your own project with so the about a little
bit about myself I attended the University of North Georgia reference does 11 itself 14 I was originally a computer science major attitude you classes in interested to drive on and job I wasn't really feeling and I went to a GIS stay MA Tommy to make mass analyzer mass and even use information technology to do more through mass I change my major C environment spatial analysis where I did my toes in red sensing GIS miRNA studies Python Django right now I prevalence life at Arizona pursuing a master's in geography I'm not really doing anything with Django but I do you know maybe I'm making a project using Django and add everyone is spending more time every time using the
so he famous what is GIS well GIS
sensory geographical information systems some people may tell you sense for science environments that say it stands for Geographic Information Studies I'm pretty much what a GIS is it's a program that allows you to create manipulate analyze you geographic data so pretty and you have a point on earth you can represent that point on a GIS
so just some applications and you also on Starbucks may be the best or the worst at Yale us on every time I want to go so I cannot find 1 but if there is a star but I guarantee you there are 3 and a half mile radius of the zip codes and you get the department store you can cram out of trails bike serving trousers and the near city on anyone uses ways on the smartphone that use GIS so pretty much if you have spatial data and you can display on a map and people of visuals I use 1
example and just start urban development over a five-year span in gains would
order a simple tracking map attractor
experts or you can make a map of Europe campus so why
GIS in fact well and this is 1 popular program called art not that's fine as read that a lot of people in the GS field use on Python is in salt in maps and you can go into the python in partner in right today I you can use it to automate you tools so you can write script here that runs like 5 tools and you can have all the years of the 1 D on a um a project down really fast said merely clicking going through each tool on each she fire right not on these archives library to do that the
so what about GIS and Django
while together Erik beginning June agenda uh I'm so 1st before you
start UGA Django project and you have a spatial database I highly recommend using post because you can create extension of post GIS did all the spatial reference stuff you need to help store your GIS data so any your projects you wanna go into your settings folder newly-installed out will make sure that you have jingo . contrib . GI that's much difference it so
91 hydrangea gender project right we need special data to have a G. hedging a project I highly recommend going to the Du a tutorial and they have the world border shapefile there for your convenience and you don't want borders for some reason you can go off and the fancy Internet and find other shapefiles I'm free non GIS people shapefiles normally is that it contains 7 other files and sometimes they have for but it's it's 4 7 files on I can't tell you what will stand for but got purity means projection on the Athens the database and you just wonder how the things that you can just pull out the daughters h period won't work but if you have your own GIS on your computer ArcMap GIS aggressive figure and ship out there
GIS people so i'm your models should duplicate was initially filed the shape file and is pretty much a model you have I always different fields like that I have example here but the name of the school from the students uh feel free wants you to he'd I you want your model the pretty much be what's in your sheet file on then image on the left is from the using a tutorial about the world's the image on the right is my Jordan example here so as you can notice on the top of the world border example it has GenGO doctrine share . GIS started EPC you and make sure you had that dodgy Iet's
so that you gendered tutorial is really great on but I think if you knew you had you know it it can be very intimidating and it goes through a lot of spatial queries that you can rhyme and it's it's kind of fatty so what I'm gonna go over his and cutting the fat for you guys and so now he had a special database and you have spatial data in shape file form you cannot load special that so this
is what I did I'm pretty sure the geogenic tutorial does the same way on I I made a dad a folder in my actually I just pasted everything that was in my mind that file so you can see all 7 files are in there and then this
low dot p y is directly offered tutorial I just I change the gene mapping fields to match my model into a final and I just change summer namesake GA shapes a world sons were border and were shape and for a string of numbers so then
on you would open up your Python shell and I import below load and then run the load i . y and as you can see it saved as blethers 10 schools that was in mind I draw the shape file it so now
on what's going to are admin and you can see that the schools tries Cecilie loaded into managing a project I you want also going to admin and make sure this due friendly by adding back from the . GIS to gender conscience and then with the admin . si . register and I had this admin Di u model admin so this is a very fancy thing that will also add a map to your admin anyone do the same thing with your your main neural stop here why not your app projects just mentioned this has the dodgy as words so some would say that I forgot to add a school and instead of going into my GIS my computer training that 2nd or my last uh school reloading it I can go straight into that admin in get i the Georgia collegiality golgi can do with the normal jingle project
but this time we had this fancy mapping our admin of and so I what happened on the school I use test a college or university there's 1 student and then I placed a point in the middle weekly and position of school they're on this is contrary to the way that it's set up so you have to put a latitude and wanted to number a string in your admin or else so that I can do it got a film Ian so you put the point on the map you hit you that the the put mumble jumble their Latin long it saved and it will override those strings that you put up there with the correct accordance but the point that you put on the map now you can also reduce the other way you can read it where you can copy paste your real Latin long in place a point in the ocean say they reloaded and yield go to the point that you had set your like along to but those are I think 2 or 3 other strings against him and but for there to be a simple produce candidates so as I mentioned on it
over the point on the map it overrides the Latin long it automatically give you find that point on the Earth in geocodes application same thing if you had a polygon he can just write a polygon until I find the geometry for that shit fire or that
file of so I guess you can do this without having to share file to begin with we can just create a model and keep adding and adding and adding but you really should have a shape file to begin with if you want to share that with GIS spoke or a few ways to bring you shape file into our Mark mapper key GIS view further analysts on it so I have just haven't ship out 1st but if for some reason the frat that's something you can always add so you want a display a
spatial data right I highly suggest you create an API so even higher API spatial data to your project so I'm not going into a really big details is this simply setting up a normal exactly do
regular that I use my make sure that you have rest underscore framework underscored GIS and then import serializes as Jews serializes and your harvest you feel that equal to m Polly and the fields that you want shown on API such as name and number of students same thing it uses
Jason better but I was argued is found out of and same thing you just 1 have yeah it's actually then it looks like a regular J. set up so I mean think you need I GIS anywhere and then uses the imagery
had on your on your API URLs
and while I pulled out my API and you can see that under their geometry and has the point coordinates and has my letter to the to the schools that are called from a special data it and then here so that test point that I made you can see that it's not quantity forensics on a it's actually negative 83 and 34 so so once you create an API you can use of some fungi like the party uh websites that is not box to display your dad onto your website I Math box is free to use you there is a paying option and you can limit the size of your mark input constraints so if you want your users only look at a certain area they can't scroll the way to France or something and it is said it's free and you just create the projects you pretty much on zoom into an area of interest so if you're interested in Cuba but you zoom into Cuba and our it saves that there for use in the open up here gender project it saved on that 1 map file so once you say year project in that box you just need to get the map ID that's underneath the project tab so that really the only thing
you need so now it's time to use the math Box API I need a scene open up your template page they going to be using to display spatial data he does need this to wonder here ones that the map box jobs script and once the map box CSS and I'm pretty sure that line of code is on the map box website and approaches that have your own the map CSS there and more map
CSS and a point out that the variable our icon is going to be the icon that displays are Mr. show that on my map such as the school points so you can just mess around that time and then underneath was CSS four-year year on icon this is where you wanna put in your not box that now with your using e . ideas that map box trial it and the fact this is where we get into the API that we train and so and that's the gist on and then we have our API name which was mine was saved as the API call in Jordan and if you want the gj on . 2 year by George API so it knows what data to look for in display on the map I'm if you're really into java script I highly recommend looking at leaflets on a lot of companies use the flight to display their spatial data with the fancy arm movement the icons that you click on the point and it shows you might in my example would be like the name the school student to be have hyperlinks to another profile so if you really and just get a highly recommend looking at leaflet the so this is the finished product this is what happens after I will the data that I added a point on the map forgot something I created my API and then I went on map box in created a map file and then put that into my diet template you cannot see that there are schools on Georgia map of style and if you look close enough
there is the matter school it's on islands in like when in and what I've mentioned for the DOS script I you can tell that the point or click on that point on the map that has the name of the school and that students so let's get fancy you
create something inactive right and so last semester in my by Master Class I signed up with crystal Williston in Wilcox anytime a surrounding created an interactive campus map for the University of more toward Gainesville campus on feel free to go to this website it's warn you it still works we we worked on it for 1 semester Yuanji map . com
so and if you go into the website I recommend going to the games of campus and we get a gains campus it will dish display you our map OX style of thinking looking at the school we have a restriction on it like I mentioned earlier you can't go normal no more than like 2 miles northwest on the east and south just looking at this arguement how well you can see it but the parking lot are grayed out of the buildings have 10 per cent and the length of the run so shape file and then in the image to call what's is the blue points on the map you can use that it's your geolocation to hit find me and it works very well on the cell phones and I we tested out in the science building and it had me right on the corner the science building where I was standing on the 2nd level thank you and here
so zoomed in detail of our shape file I digitized all the parking lot faces of the yeah there are a lot of them have meeting cues zooming so that's just an example is the shape of you can make
so like I said my objective of this talk was to introduce you guys to what you Django as on how you can use it and hopefully we can promote some more ideas on maps are great I mean people love visuals if you have data that can be placed on a map that only am so we have a bigger problem and solve it with a map of i guess enough reused everywhere I like the social thanks to my professors of Miller from the University of North Georgia obviously I couldn't be here without them 100 for 3 semesters and he does a lot with the GIS engineer and using them and what it thinks of randomizing for setting up links machine for me to make this problem presentation I crystal and welfare of teaming up with to make our interactive web map and then i j and con US the Django suffer foundation for letting me be here today because of their limited across country from relative to flex affairs on a less birds 3 weeks ago and I would have been known about them and of course and validity useful laptop creates this talk of I will not take question to 10 minutes left new mentioned that in black thank you the following I I wonder if there might be some time during the conference to just kind of sit down and do a little mini installer on or something like that to I believe there's a time that people want just China the virtually no class on Wednesday 7 leading to marinate and we can maybe that sometime tomorrow and I can go over some the stuff that you will need to install Iet's KEGG and go up and running and I can point you to some great references that use the past do wanna pickup time and a place in your people can do 2 of the view of quality on Twitter and show I can figure my busy schedule and uncertain but I should do it as women heard about OK yeah I was actually wondering maybe of of this you do it's all fun but I was wondering how difficult it is to integrate this into an existing gender up or just to have it in your up like maybe that's a little that's separate because I know this 1 Moreno's again it and I have a user all that was again you have to use a specific by that is engine for it so as a weighted just integrated in without making at the default engine or the type of you will need a facial database to had this Django working on are using POS priors now yeah yeah alone the I I'm not positive but maybe you can try doing the tree extension pose GIS I'm I'm not positive on how that can work on your existing project and then you can try it may or may not where it it shouldn't the project that way so there again those are as yet like I mentioned other some points in the other project that where you need to add the dot GIS but it shouldn't hurt your current project on the him do you own references or resources on to be able to find data for particular problems i k where we can find spatial data are a and the GIF Clearinghouse website hives I send doubt at that we can use if you're into roads I highly recommend tiger and if you're into census data and you want go in each in HE IS the National Historic GIS I mean of all sorts of census data at the dollar into the 18 hundreds on I can't think of what other faces can get that and the I mean if you just google something Input shape you might be lucky on some companies have their GIS data open to the public and if you can get data in an Excel sheets you can put that into this CSP began in the back into your GIS such as arc mapping shape file there and that that aren't here g agenda web out so it's a multi-step process by if you haven't done it in depth phenomenon on amount of faith but to question 10 1 that admin weirdness come from a developer point perspective that just seems like it's green and purple request is it just something that needs to be done In order you integer version put the map on how I think it's how the shape file a set up because I you have to have the Latin long on your model furry it's a hole in your share final over so seems like something about that could be fixed yeah I it here and I pollen you do more research to see if there is a way we can get back to you care about like I mentioned earlier I did another project right had switched it from I put in the coordinates and then put DuPage John amount related I guess about the shape file so you get the loader for the shape file put all the stuff in the years databases earning weight to with due GenGO or some other extensions the writer shape follow I think you're adding more data into the database can you yeah I guess the way you cannot hold the Dusan information and you can I guess then write a program for it to maybe using occupied image shape file using the geologists and out of that the FIL and thinking if and I would be my faith in the field of his