Question: Program Requirements (12 Marks) Your GIS system will be comprised of a set of functions used to analyze the information of any given map. In

 Program Requirements (12 Marks) Your GIS system will be comprised of

Program Requirements (12 Marks) Your GIS system will be comprised of a set of functions used to analyze the information of any given map. In addition, you will be creating a function used to determine whether or not a piece of land is commercially buildable. The requirements of the system are given below. Please ensure that your functions have the EXACT naming as specified! Failure to do so will result in lost marks. 1. Define a function countType(map_data, map_type): map_data: A list of lists representing the data for a given map map_type: A string representing a map type ('T','A','R','C','W', or 'U') Return: An integer representing the number of times map_type occurs in map_data. 2. Define a function classifyMap(map_data) map_data: A list of lists representing the data for a given map. Return: A map classification according to the following rules: The string Suburban if the number of 'R' cells is greater than 50% of all cells. The string Farmland if the number of 'A' cells is greater than 50% of all cells. The string Conservation if the number of 'U' cells plus the number of 'W' cells is greater than 50% of all cells. The string City if the number of 'C' cells is greater than 50% of all cells and the number of 'U' cells plus the number of 'A' cells is between 10% and 20% of all cells (inclusive) The string Mixed if none of the above criteria are met. (Hint, use your countType function coupled with the fact that the total cells in map_data is given by m*n) 3. Define a function isolate Type(map_data, map_type) map_data: A list of lists representing the data for a given map. map_type: A string representing a map type (T', 'A', 'R', 'C', 'W', or 'U') Return: A new list of lists that represent map_data as a matrix but all entries that are not equal to map_type are replaced with a string containing only a space (""). 4. Define a function commerciallyBuildable(map_data, i, j): map_data: A list of lists representing the data for a given map. I. An integer representing a given row in map_data. j An integer representing a given column in map_data. Return: True if map_data[ili] is commercially buildable, otherwise False. (Refer to the background section to determine what is deemed commercially buildable) Program Requirements (12 Marks) Your GIS system will be comprised of a set of functions used to analyze the information of any given map. In addition, you will be creating a function used to determine whether or not a piece of land is commercially buildable. The requirements of the system are given below. Please ensure that your functions have the EXACT naming as specified! Failure to do so will result in lost marks. 1. Define a function countType(map_data, map_type): map_data: A list of lists representing the data for a given map map_type: A string representing a map type ('T','A','R','C','W', or 'U') Return: An integer representing the number of times map_type occurs in map_data. 2. Define a function classifyMap(map_data) map_data: A list of lists representing the data for a given map. Return: A map classification according to the following rules: The string Suburban if the number of 'R' cells is greater than 50% of all cells. The string Farmland if the number of 'A' cells is greater than 50% of all cells. The string Conservation if the number of 'U' cells plus the number of 'W' cells is greater than 50% of all cells. The string City if the number of 'C' cells is greater than 50% of all cells and the number of 'U' cells plus the number of 'A' cells is between 10% and 20% of all cells (inclusive) The string Mixed if none of the above criteria are met. (Hint, use your countType function coupled with the fact that the total cells in map_data is given by m*n) 3. Define a function isolate Type(map_data, map_type) map_data: A list of lists representing the data for a given map. map_type: A string representing a map type (T', 'A', 'R', 'C', 'W', or 'U') Return: A new list of lists that represent map_data as a matrix but all entries that are not equal to map_type are replaced with a string containing only a space (""). 4. Define a function commerciallyBuildable(map_data, i, j): map_data: A list of lists representing the data for a given map. I. An integer representing a given row in map_data. j An integer representing a given column in map_data. Return: True if map_data[ili] is commercially buildable, otherwise False. (Refer to the background section to determine what is deemed commercially buildable)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!