Welcome to Introduction to GIS Software: QGIS, Class 7

This is a web page that can be viewed as slides.

→ to move forward

← to go back

Introduction to GIS Software: QGIS

Yer

James

source
source
source
source

in QGIS, the type of your field matters

fields have to be integer, real, text, or date

integers are numbers with no digits after the decimal

integer examples: 5, 243

reals are numbers with digits after the decimal

real examples: 0.0002, 19.4

text is a piece of text

text examples: ponies, Portugal

numbers are aligned right

text is aligned left

sometimes numbers are imported as text

this will keep you from performing numeric operations

like making a graduated style, or adding two numbers

the conversion functions will let you deal with this

to_int( [field_name] )
to_int( [field_name] )

converts text to integers

for example:

to_int( "sat_takers" )
to_real( [field_name] )
to_real( [field_name] )

converts text to decimal numbers

this isn't going to work if there are commas in the numbers

I recommend doing this kind of editing in your spreadsheet program

in-class excercise, part 1

PLUTO has a handy field called BBL

BBLs are unique identifiers for every parcel in NYC

BBL: borough, block, and lot number

2038610014

2

2: borough code (Bronx)

203861

3861: block number

2038610014

14: lot number

source
source

this spreadsheet has no coordinates, but you can join the BBLs

source

BBLs are always 10 digits

1 digit: borough code

1 digit: borough code

5 digits: block number

1 digit: borough code

5 digits: block number

4 digits: lot number

source

this spreadsheet has no coordinates

source

you can build BBLs if you need to

source

concat('2', "Block", "Lot")

(don't use this, it won't work)

concat concatenates (adds) strings

here we add 2 (the borough code) and the Block and Lot fields together

but it's not ten digits long

you need to add 0s to the left of the block and lot fields

concat('2', lpad("Block", 5, '0'), lpad("Lot", 4, '0'))

attribute joins combine data based on a common column

we can also join based on a common geography

this will help us summarize data for points in a polygon

the target layer is where you want the data to be added

the join layer is where you want the data to come from

in-class excercise, part 2

you can also use spatial joins to add data to points

in-class excercise, part 3