
Discover the course's open-source web gis stack, from chrome and brackets to Apache, PostgreSQL with PostGIS, and Leaflet, plus Qdos 3.0 for desktop access, with bonus installation notes.
Create a new web map directory and unzip the CMS resources to set up access-controlled maps. Initialize the local database, import login data, and verify client access.
Protect the content management system and GDP client map page with server-side access control by checking the user session and group membership, redirecting unauthorized users to the home page.
Convert PostGIS table data to GeoJSON for a Leaflet map by turning each row into a feature with geometry and attributes, forming a feature collection.
Write a PHP script that queries PostGIS, decodes the result to GeoJSON, builds features with geometry and properties, and outputs a feature collection suitable for Leaflet.
Learn to fetch PostGIS data with Ajax from a PHP script and render it in Leaflet as GeoJSON, handling asynchronous success and error callbacks without reloading the page.
Generalizing our load_data php script, this lecture shows loading map layers with ajax in a Leaflet map, updating the layer control, and avoiding preloaded overlays during data fetch.
Learn to load great blue heron data from a PostGIS database into a Leaflet map, fix errors, and compare server-side vs client-side buffers.
This lecture fixes autocomplete for linear projects, cleans up buffers with overlays, and aligns layer names and the legend, ensuring popups and tooltips work on the map.
Execute server-side buffers by transforming geometries to a metric projection like utm zone 13 (epsg 26913), apply st_buffer by a given distance, then transform back to wgs84 for leaflet rendering.
Implement server and client buffers using a distance parameter with PostGIS, refresh data, and remove turf-based buffering to streamline the workflow.
Move filtering from the client to the server using SQL where clauses for burrowing owls, buffers, and linear projects, with checkboxes and distance parameters.
Move search from client to server using sql where clauses, ajax post to a php script, and fetch live data from the database with asynchronous callbacks.
Master callback functions to manage asynchronous filtering with Ajax in Leaflet maps, avoiding user interface blocking and handling results for map layers.
Clean up the table by adding headers and a title, derive column headers from the first row keys, and use ajax requests with aliases for capitalized field names.
Display non-spatial survey data for environmental constraints in a server-side GIS app, using a modal dialog and 'show surveys' buttons to reveal nest-specific results.
Explore single table spatial queries in PostGIS and how geography and geometry data types differ, using ST_Area and ST_Transform to compute area in square meters.
Learn to build multi-table spatial queries with aliases, joining on non-spatial and spatial predicates, casting between geometry and geography for accurate distance in meters.
Explore performing spatial joins based on distance, retrieving linear projects within 300 meters of a habitat, and returning a formatted results table via a server-side script and AJAX.
Debug and extend constraints for eagle nest and raptor projects by updating AJAX calls, correcting issues like missing quotes, and displaying affected projects across multiple layers.
Learn to implement the Leaflet PM plug-in to draw markers, lines, and polygons, capture creation events, convert drawings to GeoJSON, and exchange geospatial data with a PostGIS backend.
Analyze how drawing with the Leaflet draw plugin creates geometry, then query PostGIS via AJAX with either a project id or DOJ sign to identify affected features.
Move to a tabbed leaflet sidebar and place each data layer on its own tab, while repositioning the controls and the legend, and adjusting zoom and attribution controls.
Learn to add content to a tabbed sidebar in a Leaflet and PostGIS map by creating tabs, assigning icons, and pasting HTML content into each sidebar pane.
Refine the client web app by turning forms into dynamic interfaces that populate from the database and reveal data when needed, with Ajax-driven CRUD in Leaflet and PostGIS.
Prepare the database for editing by adding fields for created by, created date, modified by, and modified date, plus last survey date fields across tables, using sql scripts.
Refactor the survey results into a single, generic function by creating a base script that takes a table and id, streamlining server-side rendering of survey data.
Learn to add per-survey edit and delete buttons in a map-based GIS app, using data-id attributes and JavaScript to trigger in-place edits or confirmations without reloading the map.
Wire a delete button to a generic PHP delete record script by sending table and id via POST. Update the surveys table and reflect deletion using AJAX handling.
Convert the result input to a select element populated from distinct database values to restrict choices, and add update and cancel buttons with prevent default for server-side updates.
Learn to collect form data with a generalized function, securely update the database via AJAX and a PHP script using a parameterized query with a record ID.
Add a new survey by wiring an insert survey button to the form, auto-fill user and date, and submit to create a new record while refreshing the survey list.
Develop a general insert data function in insert_data.php that builds a parameterized insert statement from post data, excluding id, and automatically records created and modified metadata.
Create a PHP script that returns distinct options from a database table for a specified field, and render them as HTML option tags via AJAX for a dynamic select.
Refactor your PHP scripts to improve organization and maintainability without changing functionality. Learn to structure directories, streamline includes, and centralize database connections for easier server migrations and client compatibility.
Refactor JavaScript by modularizing code into general function libraries, organizing CSS and scripts, moving files into new directories, and preserving functionality across the GIS web app.
Convert read-only text boxes to disabled select elements, populate them with unique database options using a generalized change options function, and wire them for controlled edits.
This lecture enables the form fields and adds edit and delete icon buttons, wired to event handlers that open a workbox and prepare for updating or deleting the selected record.
Enable editing of spatial data by moving polygon vertices with a map editor, convert coordinates to a polygon geometry, and prepare a binary geometry for PostGIS storage.
Explore how the PHP update script intercepts GeoJSON form data, converts it to a PostGIS geometry with ST_GeomFromGeoJSON, assigns SRID 4326, and updates the map live.
Explore how to explode multi-part geometries in leaflet into individual polygons, edit each part, and merge them back into a single multipolygon for database updates.
Improve a web GIS application by debugging UI interactions, disabling cache during development, adding tooltips, toggling feature geometry, and handling login/logout settings.
Refactor the server-side workflow to add and edit geometries with immediate database updates, replacing table-specific logic with callbacks, and test the end-to-end geometry insert and update processes.
Refactor editing functions into a general JavaScript editing file, enabling auto-incremented IDs, proper disabled fields, and handling single-point and multi-part features for eagle and raptor datasets.
Copy a base map to create a new map with restricted capabilities, remove add/edit/delete buttons, and tailor group permissions so field staff cannot modify features.
Learn where to go next to deepen your geospatial web development skills, exploring PostGIS, Python, JavaScript frameworks, server-side options, and mapping tools like Leaflet and open layers.
Install and configure a cross-platform web server stack with Chrome, Brackets, Apache, and PHP, then run a local localhost server to develop with Emmet and Brackets.
Install PostgreSQL and PostGIS on Windows, use Stack Builder to install the PostGIS extension, create a database, enable the extension, and verify spatial references.
Install qgis 3.0 with the standalone windows installer and run the setup wizard, accepting the license and using the default directory. Explore macOS, Linux, and BSD guides for other systems.
GeoJSON is the standard for encoding geospatial data on the web, readable by Leaflet and other APIs; explore point, multi-point, line string, polygon, and feature collections.
Compare geometry and geography data types, showing flat-plane versus spherical earth calculations for distance and area, function availability, and guidance on when to use each.
Discover the economics of teaching on udemy, learn how pricing, discounts, coupons, and ratings shape course value, and choose courses that maximize your learning.
Server-side web GIS applications allow you to access GIS data stored in a multi-user database. This means that your data will always be current and any changes that other users make to the data will be immediately available in your application. You will be able to build complex GIS applications where some users will only be able to view certain data that you allow them and other users will be able to add, edit, and delete data from a web-interface. This means that your users will be able to interact with your GIS database from any device that has a compatible browser and an internet connection. They may be working in the field from a mobile device or from home on a mac OS computer, or on the other side of the world on a Linux computer.
This course uses PHP for the server-side language because of its popularity and its wide availability on web servers. We will use PostGIS as a spatial database, again because of its popularity and common usage in GIS applications. I teach standard web development methods that have stood the test of time and will still be available in many years after the latest, greatest, technology has been replaced with something even better. My goal as an instructor is to provide an introduction to the basic concepts. I don't think you will find any limitations with the software that I teach but if you ultimately decide to use a different server-side language, database, or a newer framework the methods you learn here will provide a solid foundation.
Best of all, this course uses all open source software so there are no costs involved. I have had projects involving more than 50 people, including clients, accessing the same database through web interfaces and desktop GIS for several years with no problem and with no cost other than web-hosting which cost us about $10/month total.