Add readme #1

Open
a_adli wants to merge 9 commits from feature/add_readme into main
Showing only changes of commit aa96c5df99 - Show all commits

View File

@ -4,24 +4,26 @@ alireza.adli@mail.concordia.ca
## Table of Contents
[About mtl_gis_oo](#about-gispy)
[scrub_layer_class.py](#scrublayer)
[handle_mtl_ds_workflow.py](#handle_mtl_ds_workflowpy)
[standalone_vs.py](#standalone_vspy)
[Building Cleanup Workflow](#workflowpy)
a_adli marked this conversation as resolved Outdated

Rename scrub_layer_class.py to scrub_layer.py and call this section ScrubLayer following the class name

Rename scrub_layer_class.py to scrub_layer.py and call this section ScrubLayer following the class name
[ScrubLayer](#scrublayer)
a_adli marked this conversation as resolved Outdated

rename from handle_mtl_ds_workflow.py to montreal_buildings_workflow.py, quebec_buildings_workflow.py, or building_cleanup_workflow.py depending on what you feel fits the best. Call the section Montreal Building Workflow corresponding to the name of the file that you choose

rename from handle_mtl_ds_workflow.py to montreal_buildings_workflow.py, quebec_buildings_workflow.py, or building_cleanup_workflow.py depending on what you feel fits the best. Call the section Montreal Building Workflow corresponding to the name of the file that you choose
[Helpers](#helpers)
k_wells marked this conversation as resolved Outdated
  • Remove reference to stsandalone_vs.py as this is coming from the previous project.

  • Rename scrub_mtl_class.py to scrub_mtl.py and call this section ScrubMTL

  • I suggest renaming input_paths_and_layers.py to config.py and adding this section. Call the section Configuration or Config

  • I suggest renaming basic_functions.py to helpers.py and adding this section. Call the section Helpers or Helper Functions

- Remove reference to stsandalone_vs.py as this is coming from the previous project. - Rename scrub_mtl_class.py to scrub_mtl.py and call this section ScrubMTL - I suggest renaming input_paths_and_layers.py to config.py and adding this section. Call the section Configuration or Config - I suggest renaming basic_functions.py to helpers.py and adding this section. Call the section Helpers or Helper Functions

I removed the standalone_vs.py references, but the other 'standalone's are used to refer to PyQGIS as its documentation refers to it as standalone.
(I am editing based on your suggestions, which I am grateful for)

I removed the standalone_vs.py references, but the other 'standalone's are used to refer to PyQGIS as its documentation refers to it as standalone. (I am editing based on your suggestions, which I am grateful for)
[Configuration](#config)
[ScrubMTL](#scrubmtl)
[Setting up an environment to use standalone PyQGIS How to import qgis.core](#setting-up)
<a name="about-gispy"/>
## About mtl_gis_oo
a_adli marked this conversation as resolved
Review

Remove the word 'updated' and 'object-oriented approach'

Remove the word 'updated' and 'object-oriented approach'
a_adli marked this conversation as resolved
Review

I would remove the 'non-object-oriented project' and just say that it is a continuation of the project and provide the link

I would remove the 'non-object-oriented project' and just say that it is a continuation of the project and provide the link
This project automates the process of integrating and cleaning updated datasets related to Montreal buildings with an object-oriented approach.
It is the continuation of non-object-oriented project namely [hydroquebec_archetype_gispy](https://ngci.encs.concordia.ca/gitea/a_adli/hydroquebec_archetype_gispy). The project involves the following datasets:
This project automates the process of integrating and cleaning datasets related to Montreal buildings.
It is the continuation of [hydroquebec_archetype_gispy](https://ngci.encs.concordia.ca/gitea/a_adli/hydroquebec_archetype_gispy). The project involves the following datasets:
1. [NRCAN Building Footprints](https://open.canada.ca/data/en/dataset/7a5cda52-c7df-427f-9ced-26f19a8a64d6)
2. [Shared platform of geospatial data and aerial photographs (GeoIndex)](https://geoapp.bibl.ulaval.ca/)
3. [Montreal Property Assesment Units](https://donnees.montreal.ca/dataset/unites-evaluation-fonciere)
4. [Administrative boundaries of the agglomeration of Montréal (boroughs and related cities)](https://donnees.montreal.ca/dataset/limites-administratives-agglomeration)
a_adli marked this conversation as resolved
Review
  • The original workflow was developed in ArcGIS by Kartikay Sharma (his email)

  • don't forget to add the link to the workflow, maybe contact Kartikay if needed

  • I would re-word 'clipping unnecessary parts of the map' as the clipping is doing something different

- The _original_ workflow was developed in ArcGIS by Kartikay Sharma (his email) - don't forget to add the link to the workflow, maybe contact Kartikay if needed - I would re-word 'clipping unnecessary parts of the map' as the clipping is doing something different
The workflow has been developed and implemented in ArcGIS. This workflow (link) involves steps such as fixing geometries, clipping unnecessary parts of the map, splitting sections based on single building footprints, spatially joining datasets, and cleaning the data through processes such as removing duplicates, among others.
The original workflow was developed in ArcGIS by Kartikay Sharma (kartikay.sharma@concordia.ca). This workflow (link) involves steps such as fixing and clipping geometries, removing features from unnecessary parts of the map, splitting sections based on single building footprints, spatially joining datasets, and cleaning the data through processes such as removing duplicates, among others.
GISPy integrates these processes and automates them so that users can update the dataset by running the workflow module (mtl_buildings_workflow.py) after acquiring and defining the paths to the mentioned datasets.
@ -29,31 +31,38 @@ GISPy has been written using QGIS Python standalone libraries (PyQGIS). This set
<a name="#scrublayer"/>
## scrub_layer_class.py
## ScrubLayer
This module is the essence of the mtl_gis_oo project. It encompasses required functionalities of PyQGIS as methods. Some other methods also have been added to use the functionalities in a specific way. For example, clip_by_multiply carry outs PyQGIS clipping using multiple overlay layers.
<a name="#handle_mtl_ds_workflowpy"/>
## handle_mtl_ds_workflow.py
<a name="#workflowpy"/>
This is the process of cleaning and aggregating Montreal buildings datasets. This workflow is backed up by scrub_layer_class.py. After defining the paths, running the module outputs the updated and integrated dataset (map layer).
## Building Cleanup Workflow
## scrub_mtl_class.py
This is the process of cleaning and aggregating Montreal buildings datasets. This workflow is backed up by ScrubLayer. After defining the paths, running the module outputs the updated and integrated dataset (map layer).
<a name="helpers"/>
a_adli marked this conversation as resolved Outdated

This file does not exist in this project so this section should be removed

This file does not exist in this project so this section should be removed
## Helpers
The module contains several functions that cannot be defines as a method of ScrubLayer class but are useful and sometimes necessary for a method or a part of the workflow (building_cleanup_workflow.py).
Creating folders, finding a type of files and merging layers are examples of the module's functionalities.
<a name="config"/>
## Configuration
This module contains the QGIS installation path, and two dictionaries for holding input and output layers paths. The module will be modified completely to address paths in a general way instead of locally.
a_adli marked this conversation as resolved Outdated

Remove this line

Remove this line
<a name="scrubmtl"/>
## ScrubMTL
This module is not being used or developed right now.
<a name="standalone_vs.py"/>
## standalone_vs.py
This module provides the preliminary settings for using PyQGIS.
<a name="setting-up"/>
## Setting up an environment to use standalone PyQGIS How to import qgis.core
a_adli marked this conversation as resolved
Review

Is there a reason you make a copy instead of just renaming the executable? If this is added to the path variable, your command prompt might point to this version of python 3.9 instead of the user/system installation of python 3.9 if it exists. It might be better to use a shortcut in this directory that points to the original python 3.9

Is there a reason you make a copy instead of just renaming the executable? If this is added to the path variable, your command prompt might point to this version of python 3.9 instead of the user/system installation of python 3.9 if it exists. It might be better to use a shortcut in this directory that points to the original python 3.9
#pyqgis #qgis #path #pythonpath
To use PyQGIS without having the QGIS application run in the background, one needs to add the python path to the environment variables. Here is how to do it on Windows:
1. Install QGIS
@ -62,16 +71,14 @@ To use PyQGIS without having the QGIS application run in the background, one nee
This is being done in order to access the QGIS Python from the command prompt without mixing with the systems original Python installation(s).
a. Go to the QGIS installation directorys Python folder. e.g. C:\Program Files\QGIS 3.34.1\apps\Python39
a_adli marked this conversation as resolved
Review

this is not needed as the following line will allow for all files inside of C:\Program Files\QGIS 3.34.1\apps\Python39 to be accessible in Command Prompt or Powershell

this is not needed as the following line will allow for all files inside of C:\Program Files\QGIS 3.34.1\apps\Python39 to be accessible in Command Prompt or Powershell
b. Duplicate the Python executable (python.exe) by copy-pasting it
c. Rename the duplicated version. e.g. pythonqgis.exe
b. Rename the Python executable (python.exe) to a specific-desired name, e.g. pythonqgis.exe
3. Updating the Path variables
a. Go to Environmental Variables (from Windows start)
b. Click on Path and then click on Edit. Add the following paths:
> i. C:\Program Files\QGIS 3.34.1\apps\Python39\pythonqgis
> ii. C:\Program Files\QGIS 3.34.1\apps\Python39
> C:\Program Files\QGIS 3.34.1\apps\Python39
c. Go back to the Environmental variables this time click on New and in New Variable box enter PYTHONPATH and in the Variable Value add the following paths (separate them with a colon). Some paths might be different. For example, apps\qgis can be apps\qgis-ltr.
@ -88,5 +95,4 @@ To use PyQGIS without having the QGIS application run in the background, one nee
c. If the process has been done correctly, you wont face any error.
d. In the Python environment, import the package by:
> i. Either import qgis.core
> ii. Or from qgis.core import \*
> import qgis.core