
Install the .NET SDK version 6, download the latest long-term support release, and verify the installation with the dotnet version command to enable web GIS development.
Create a starter ASP.NET MVC 6 project with dotnet, open it in code, run the app to verify the template, then prepare to build your own application.
Install entity framework core packages to map tables to C# objects and enable read and write operations, using dotnet add package commands and verify in the project.
Create a C# model class named water consumption with fields Eid, neighborhood, suburb group, average monthly kilolitre (int), and coordinates (string), including getters and setters, mapping to a Postgres table.
Create and apply database migrations, then update the database. Verify in pgAdmin that a Postgres table is created and its fields match the model.
Create your first Leaflet map by configuring a div container, loading the base map, and initializing the default view and zoom. Test by running the application to confirm success.
Fetch neighborhood data via a url endpoint using jQuery's getJson, convert coordinates to arrays, and render multi polygon neighborhoods on a Leaflet map, then style by average monthly kilolitre.
Create a legend for the map with a Leaflet control in the bottom-right, mapping color grades to water consumption in kilolitres and displaying their values.
Welcome to the Building Web GIS Apps with C# ASP.NET CORE MVC and Leaflet course. We'll be building a Full-stack MVC style Web Application using the .NET Core Framework. The purpose of this course and many more to follow, is to learn to create geospatial analytics and convert it into a functional application.
In our use case we will be working with suburban water consumption data and we will be applying data processing techniques to extract transform and load the data into our spatial database. Once we have processed and cleaned the data, we will use it as a data source for building our .NET Core Web Map Application.
We will be powering our application with a PostgreSQL and PostGIS database. In the Front-End we'll use Bootstrap, JavaScript, Leaflet and Ajax. On the server side we'll be using C#, ASP.NET CORE MVC, combined with use of libraries like Entity Framework Core, Newtonsoft.Json and Npgsql for our data transformation and conversion operations. The operating system that we will be working on is Windows 10 and Server 2016.
Some skills that you can expect to derive after completing the course are the following:
You will learn how to build a Spatial Database using Postgresql and PostGIS.
You will learn how to create charts with Chart.js.
You will learn to build Web Maps with Leaflet.js.
You will learn how to build REST API Endpoints with C# and LINQ
You will learn some C# programming.
You will learn some JavaScript programming.
You will learn how to build Web Applications using the C# and ASP.NET Core MVC Framework.