Skip to content

Geospatial Programming Learning Course

Pre-reading to start learning programming. This article covers the topics for the pre-test.

Journey to Geospatial Programming Learning

Welcome, learners! This is the very first step of learning programming. To get your hands on geospatial programming, the first step is to go through the basic concepts of a programming language. The fundamental blocks of all programming languages are more or less similar. In this article, we will go through the very basic fundamentals required to start our journey to geospatial programming. So let's get started!

Data Type

There are two basic types of data: quantitative and qualitative. Quantitative data is anything we can count, measure, or quantify with numbers. Qualitative data represents information in terms of language or description, which cannot be measured or counted.

Basic Data Types in Programming

Apart from numbers and text, we use another basic type of data in programming languages called boolean. Boolean has only two values: true and false.

Number Type Data

In programming, we primarily use three basic types of numbers: integer or whole number, decimal, and float.

  • Integer and Decimal

All positive, negative whole numbers including 0 are integers. A decimal number expresses fractions or whole numbers using a decimal point.

  • String

In programming, a "string" is a way to handle text or qualitative data. It could be a single word, a sentence, or even a collection of paragraphs. Strings are just sequences of characters, and they are handy for dealing with any kind of text-related information in programming.

  • Boolean

Boolean refers to a data type that can have one of two values: true or false. Boolean values are often used in conditional statements and expressions to make decisions in computer programs.

Uses of Boolean in Programming

  • Decision Making: Boolean helps programs decide what to do based on conditions.
  • Comparison: It allows us to compare things, like whether one number is bigger than another.
  • Logical Operation: Boolean helps express logical relationships.
  • Looping: In programming, Boolean is used to repeat tasks until a condition is no longer true.

Example

Let x = 9, y = 10. Now we will compare if x and y have the same value. Is x == y? false.

Variable

A variable is like a storage box in which we can keep different types of information. It's associated with a symbolic name and may have a memory address. The name allows referencing the data, and values can change during execution.

Declaring a Variable

In most programming languages, declaring a variable involves giving it a name and specifying the type of data it will hold.

// Declare a variable named 'age' and assign the value 25 to it
var age = 25

Arithmetic Operators

Arithmetic operators are symbols used in programming to perform mathematical calculations on numerical data. They include addition, subtraction, multiplication, division, and modulus.

Basic Arithmetic Examples

  • Addition: var total = 5 + 3; // total will be 8.
  • Subtraction: var difference = 10 - 4; // difference will be 6.
  • Multiplication: var product = 2 * 6; // product will be 12.
  • Division: var quotient = 8 / 2; // quotient will be 4.
  • Modulus: var remainder = 10 % 3; // remainder will be 1.

Adding Comments inside Code for Clarity

A comment in programming is a piece of text that is not executed as part of the program but is included for human readers to understand the code. Comments provide explanations, notes, or reminders within the code to make it more readable and maintainable.

Example

// This is a single-line comment 

/*
This is a
multi-line comment
*/

Congratulations on completing the first step of your geospatial programming journey! Keep exploring and learning. Now you are ready to delve into any programming language.

To participate in the final part of the Geospatial Programming course, you have to take the exam and score 5 out of 10. All the questions are based on this article. Some of you may find them very easy.

Points to be noted: - Before taking the exam, go through the above article carefully. - Each participant can submit answers only once. - To proceed to the next step of the course, each participant must obtain a minimum of 5 out of 10. - The last date of submission is December 31, 2023. - Only eligible participants will be contacted via email for the next steps.


Join our Facebook group for discussions and support. Participate in the exam by filling out the Google Form.

Contact: ramizmoktader064@gmail.com

© Ramiz Moktader