
Explore web mapping and web GIS with GeoDjango, using Leaflet on the front end and Django with PostGIS on the back end, covering vector data import export, user authentication, deployment.
Explore tools and technology for web mapping, including a code editor with an integrated terminal, Leaflet, and Django for uploading, storing, and displaying map data on a server.
Develop interactive web maps with real-time coordinates, distance and area measurements, and data visualization (including PDFs), while implementing backend data uploads and admin integration for deployment on a virtual machine.
Set up a basic web map by incorporating the Leaflet library, linking scripts, and initializing a map centered on specified coordinates with a marker and default marker behavior.
Implement a map scale control and fullscreen toggle, and display latitude and longitude coordinates on hover by handling mousemove events and updating a coordinate display.
Add a print map function by binding a print button to export the current map view to pdf, using a leaflet plugin and responsive options for printable output.
Implement distance and area measurement on a Leaflet map by integrating a plugin, configuring distance units to kilometers, and validating the tool within a GeoDjango web mapping workflow.
Load point data into a map and use the Leaflet marker cluster plugin to display clustered markers with counts, then integrate data files and explore interactive feature properties on click.
Search a location by name on the map with a leaflet geocode plugin, customize the plugin, and display the found coordinates to navigate to the exact point.
Learn to implement a Leaflet layer controller to switch base maps and overlays, add configured map providers, and manage markers for interactive web mapping.
Add a go-to-extent button that uses a layer function to reset the map view to a set location and zoom level, Seattle, with a default marker in the study area.
Apply bootstrap to customize map controls in a leaflet-based web map, integrating a CDN, adjusting button layout, and enhancing maps with responsive styling.
Organize a web mapping project by structuring folders for scripts and styles, keeping content in separate directories, and correctly linking files to ensure the map app loads reliably.
Customize a web map by adding a coordinate display, styling controls with Leaflet, and implementing a full-screen toggle, positioning panels with absolute CSS, padding, colors, and icons.
Add a bootstrap navbar to the web map, customize the UI. Test mobile responsiveness by adjusting map height and overflow with CSS, and explore data upload features.
Install geoserver on windows by downloading the official file, running the installer, and setting it as a Windows service that starts at boot; log in at localhost with admin credentials.
Introduce Geoserver-rest and its open-source workflow, connecting various data sources to web map services (WMS, WCS) and publishing tiles for efficient web mapping.
Install geoserver-rest on Windows following the library documentation, verify Python version compatibility, install dependencies, then import server to confirm the library is installed successfully.
Learn to use a geoserver-rest client to set up a workspace, upload data, publish vector layers and coverages, and manage styles and publishing workflows from a dev environment.
Install postgresql and the postgis extension, create a spatial database, enable the extension, and define a point geometry table with coordinate reference systems for web GIS.
Install GeoDjango by configuring a Django project, enabling the admin, installing the geospatial library, setting up a Postgres database with credentials, and launching the local server to verify the setup.
Connect Django urls to templates by wiring a view to a template in the templates folder, configure static files, and render the index page through a mapped url.
Migrate the database and apply the required extension to generate the necessary tables. Create a superuser and explore the admin interface to manage users and view data tables.
Connect Django templates to a project by integrating static files, collecting static, and updating links to render a dynamic web map interface.
Install and manage Django dependencies within a virtual environment, install required packages automatically, and verify data handling workflows for uploading to the database and server.
Create a Django model named SSP to manage shapefile uploads, with name, file, and optional description, then run makemigrations and migrate to enable admin access.
Register the model in the Django admin panel and enable file upload and in‑place editing from the admin interface, with files stored and referenced in the database.
Upload your zip file to the admin dashboard, make yearly data available in the USA, visualize it, and implement the visualization in the template.
Dear students,
As I already mentioned, all the codes of this course are available on GitHub freely. I saw lots of questions in Q&A from students. They found it difficult to implement this section. So I just want to inform you that the main code of this section is available here: https://github.com/iamtekson/geodjango-from-dev-to-deployment/blob/main/geoApp/shp/models.py
Before proceeding to the other lecture, please install the Postgres-helper library as below,
```
pip install postgres-helper==0.0.5
```
I have updated the code on Github which is the bug-free version. I tried to address the issues from Q&A. Please try to understand the code after finishing this section and if you didn't understand the update, please leave a question in the Q&A section. I am always happy to help.
Please copy and past the code from GitHub for the "models.py" file. The code used in lectures, 34, 35, 36, 37, and 38 can be ignored.
If you are enjoying this course, please consider providing 5 stars review on this course. Thank you very much in advance.
This lecture explains Django signal initiation, wiring signals to model events, and auto syncing created and deleted records to a Postgres database via a receiver.
Learn to upload a shapefile to PostGIS with GeoDjango, including extracting zip archives, parsing file names, and loading into the public data schema with a geometry column.
Publish shp to geoserver by configuring the framework and workspace, and defining the data schema, then upload zip and tile files to publish and visualize the layer on the server.
Learn how to implement a delete data function in the admin data schema using Postgres and a library, including dynamic table deletion and DBI/DBE setup.
Resolve a signal function conflict by removing hardcoded file references, enabling safe upload workflow from the admin dashboard to the database, and cleaning temporary files to prevent duplicates.
Render the uploaded file from the database in a Django template by loading the model in a view and displaying name, description, and file on a map overlay.
Publish and tailor feature styles to geoserver-rest, configuring colors, outlines, and grid categories (retail, classified, military) for map layers and assets.
Take on a hands-on challenge to craft a positive signal for data, create coverage and overlays, render results in the index file, and publish your map using provided code.
Learn to build and deploy a dynamic data layer with a Django backend by uploading layers, creating an API by Create It, and rendering endpoints, models, and signals in templates.
Create a requirements.txt file to list all Python packages for the library, activate a virtual environment, and automatically include dependencies for straightforward deployment.
Push code to GitHub and follow a practical git workflow: initialize a repo, configure .gitignore, commit changes, and push data, demos, and documentation to a private, later public, repository.
Learn to add notes to map markers, submit notes with latitude and longitude, and store them in the database to see updated results on the map.
Learn to create a Django model for a note app, define fields like id, latitude, longitude, text, set constraints, run makemigrations and migrate, and verify in Postgres via admin.
Develop the back end to receive post requests at a defined endpoint, parse node, node description, latitude, and longitude, create a database record, and return the response.
Click the map to capture latitude and longitude, place a marker, and submit a note with a heading and description that saves the location data to the database.
note button toggler demonstrates adding a note button to a map to toggle marker creation with leaflet, manage the toggle state, and submit latitude and longitude to the server.
Render notes as map markers in a Django template by looping through notes with latitude and longitude and passing each to markers; click a marker to view the note.
Deploy a geo web stack by configuring PostGIS and GeoServer, setting up Tomcat deployment, provisioning the database, and binding the IP and ports for remote access.
Push a Django project to the server following a deployment guide, activate the virtual environment, install requirements, run migrations, collect static files, and launch GeoDjango.
Learn how to configure nginx and gunicorn for a GeoDjango deployment, bind IPs, set up a wsgi service, manage static files, and tune server blocks for local hosting.
This course is mainly designed for people who are highly interested in web mapping/webGIS development. In this course, I mainly focused on the leaflet, GeoDjango and GeoServer. Since it is a practical based course, I directly started to write the code rather than make slides. Inside the course, you will find simple, effective and alternative ways to do the tasks.
Leaflet: Leaflet is the leading open-source JavaScript library for mobile-friendly interactive maps. Weighing just about 39 KB of JS, it has all the mapping features most developers ever need. Leaflet allows developers without a GIS background to very easily display tiled web maps hosted on a public server, with optional tiled overlays. It can load feature data from GeoJSON files, style it and create interactive layers, such as markers with popups when clicked.
GeoServer: GeoServer implements industry-standard OGC protocols such as Web Feature Service (WFS), Web Map Service (WMS), and Web Coverage Service (WCS). Additional formats and publication options are available as extensions including Web Processing Service (WPS), and Web Map Tile Service (WMTS). GeoServer aims to operate as a node within a free and open Spatial Data Infrastructure. Just as the Apache HTTP Server has offered a free and open web server to publish HTML, GeoServer aims to do the same for geospatial data.