Wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

GeoPandas Worksheet Questions

Total questions: 70

Worksheet time: 35mins

Name
Class
Date
1.

What function is used to convert a DataFrame to a GeoDataFrame?

a)

GeoPandas.create()

b)

gpd.read_shapefile()

c)

gpd.GeoDataFrame()

d)

GeoFrame()

2.

Which method is used to check the Coordinate Reference System of a GeoDataFrame?

a)

.crs

b)

.epsg()

c)

.getCRS()

d)

.projection

3.

What is returned by gdf.geometry.centroid?

a)

Buffer of all geometries

b)

Midpoint of lines

c)

Centroid point geometry

d)

None of the above

4.

What type of object does gdf.plot() return?

a)

Folium map

b)

Raster layer

c)

Matplotlib Axes

d)

List of coordinates

5.

Which GeoPandas function writes data to a shapefile?

a)

gdf.write()

b)

gdf.save()

c)

gdf.to_file()

d)

gdf.export()

6.

What type of geometry is typically used for administrative boundaries?

a)

Point

b)

Polygon

c)

LineString

d)

GeometryCollection

7.

What does gdf.geometry.area return?

a)

Total population

b)

Size of bounding box

c)

Area of each geometry

d)

Number of features

8.

Which CRS format is accepted by GeoPandas?

a)

EPSG:4326

b)

4326

c)

proj4 string

d)

All of the above

9.

Which method merges two GeoDataFrames?

a)

.merge()

b)

spatial_join()

c)

overlay()

d)

join()

10.

What is a typical use case for gpd.overlay()?

a)

Changing CRS

b)

Dissolving geometries

c)

Spatial operations like intersection

d)

Reading data

11.

How do you remove invalid geometries in GeoPandas?

a)

gdf.clean()

b)

gdf.dropna()

c)

gdf[~gdf.geometry.is_valid]

d)

gdf.filter()

12.

What does gdf.buffer(0.01) do?

a)

Reduces the geometry size

b)

Removes points

c)

Creates a buffer around geometries

d)

Changes CRS

13.

What type of join is done by sjoin()?

a)

SQL join

b)

Attribute join

c)

Spatial join

d)

Table join

14.

How do you reproject a GeoDataFrame?

a)

gdf.crs("EPSG:3857")

b)

gdf.set_crs()

c)

gdf.to_crs()

d)

gdf.convert_crs()

15.

What is the output type of gdf.dissolve(by='state')?

a)

GeoSeries

b)

GeoDataFrame

c)

Series

d)

None

16.

What does Point(1, 2) represent in Shapely?

a)

Line segment

b)

2D point geometry

c)

Polygon corner

d)

CRS

17.

What does LineString([point1, point2]) return?

a)

A curve

b)

A polygon

c)

A series

d)

A line connecting the points

18.

Which Shapely function checks geometry validity?

a)

isvalid()

b)

geometry.check()

c)

geometry.is_valid

d)

geometry.validate()

19.

Which function converts WKT to geometry?

a)

loads()

b)

dump()

c)

fromWKT()

d)

to_geom()

20.

What is geometry.area used for?

a)

CRS conversion

b)

Area in degrees

c)

Area of geometry

d)

Memory usage

21.

What does .intersects(other_geom) return?

a)

True/False

b)

Geometry object

c)

Buffer

d)

CRS

22.

What does .buffer(0) often help with?

a)

Increase file size

b)

Fix geometry errors

c)

Change units

d)

Convert CRS

23.

How do you check if one polygon is inside another?

a)

polygon1.contains(polygon2)

b)

polygon1.equals(polygon2)

c)

polygon1.intersects(polygon2)

d)

polygon1.near(polygon2)

24.

Which of these is not a valid Shapely geometry?

a)

LineString

b)

Point

c)

GeoArray

d)

Polygon

25.

What module must be imported to use Point or Polygon?

a)

geopandas

b)

fiona

c)

shapely.geometry

d)

rasterio

26.

What is returned by .distance() in Shapely?

a)

Buffer

b)

Angle

c)

Distance between two geometries

d)

Area

27.

How do you combine two polygons into one in Shapely?

a)

combine()

b)

append()

c)

union()

d)

merge()

28.

Which function returns the bounding box?

a)

.bounds

b)

.bbox()

c)

.extent()

d)

.bbox

29.

Which method checks exact geometry equality?

a)

compare()

b)

equals()

c)

matches()

d)

similar()

30.

What is .wkt used for in Shapely?

a)

Save to GeoJSON

b)

Load raster

c)

Return WKT string

31.

What does Fiona open with?

a)

with fiona.read()

b)

with open()

c)

with fiona.open()

d)

fiona.load()

32.

What is a common mode in Fiona for writing data?

a)

'write'

b)

'w'

c)

'rw'

d)

'r+'

33.

Fiona reads what type of object per feature?

a)

Tuple

b)

Dictionary

c)

Pandas DataFrame

d)

Shapely Polygon

34.

Fiona is built on top of which library?

a)

GeoPandas

b)

GDAL/OGR

c)

Rasterio

d)

PyShp

35.

What file formats can Fiona read/write?

a)

Only .shp

b)

.json and .csv

c)

Vector formats supported by GDAL

d)

Only GeoJSON

36.

What does Fiona use to define schema?

a)

CRS

b)

Type rules

c)

Dictionary

d)

YAML file

37.

What attribute gives the CRS of a file in Fiona?

a)

.epsg

b)

.proj

c)

.crs

d)

.projection

38.

How do you iterate through features in Fiona?

a)

for row in file:

b)

for feat in fiona:

c)

for feature in layer:

d)

for feature in file:

39.

Which file must always be present in a shapefile read by Fiona?

a)

.shx

b)

.prj

c)

.shp

d)

.dbf

40.

How do you write new features in Fiona?

a)

write()

b)

write_feature()

c)

add()

d)

dump()

41.

Which format does Folium map export to?

a)

PNG

b)

HTML

c)

GeoTIFF

42.

Which folium method adds a marker?

a)

add_marker()

b)

folium.Marker()

c)

folium.add_marker()

d)

map.drop()

43.

Which of the following creates a base map in Folium?

a)

folium.TileLayer()

b)

folium.BaseMap()

c)

folium.Map()

d)

folium.View()

44.

Which argument controls map zoom?

a)

zoom_value

b)

zoom

c)

zoom_start

d)

zoom_level

45.

What is required to add a PolyLine to a Folium map?

a)

List of coordinates

b)

GeoTIFF

c)

Raster

d)

WKT

46.

Which argument changes the marker color in Folium?

a)

icon_color

b)

fill_color

c)

color

d)

popup_color

47.

How can you add a popup label to a marker?

a)

popup=

b)

label=

c)

tooltip=

d)

show=

48.

What layer type allows for GeoJSON visualization?

a)

folium.Layer()

b)

folium.GeoJson()

c)

folium.FileReader()

d)

folium.VectorLayer()

49.

What does map.save("map.html") do?

a)

Displays map in terminal

b)

Prints base64

c)

Saves map as web page

d)

Saves shapefile

50.

Which plugin allows search capability in Folium?

a)

SearchControl

b)

Search

c)

folium.plugins.Search

d)

MapSearch()

51.

What is Rasterio primarily used for?

a)

Vector mapping

b)

Elevation modeling

c)

Raster data I/O

d)

Network routing

52.

Which function opens a raster file?

a)

open()

b)

rasterio.open()

c)

read()

d)

load()

53.

What does src.read(1) do?

a)

Reads all bands

b)

Reads metadata

c)

Reads the first band

d)

Reads CRS

54.

Which Rasterio property gives CRS info?

a)

src.crs

b)

src.get_crs()

c)

src.coordref

d)

src.ref

55.

What does src.transform give?

a)

Projection

b)

Affine transform

c)

GeoTIFF resolution

d)

NoData

56.

What file format is NOT supported by Rasterio?

a)

.tif

b)

.tiff

c)

.shp

d)

.vrt

57.

What happens if you forget to close a raster file?

a)

Automatic save

b)

Crash

c)

Memory leak

d)

File lock remains

58.

What library works well with Rasterio for display?

a)

PIL

b)

matplotlib

c)

OpenCV

d)

GeoPandas

59.

What is nodata in Rasterio?

a)

Hidden column

b)

Cell with no value

c)

Raster mask

d)

NaN filter

60.

How do you write a new raster in Rasterio?

a)

with rasterio.open('file', 'w') as dst:

b)

write_raster()

c)

rasterio.writer()

d)

raster.save()

61.

Which extension is used in ArcPy for routing?

a)

Spatial

b)

3D

c)

Network

d)

Mapping

62.

What does CheckOutExtension("Network") do?

a)

Validates license

b)

Installs NA

c)

Downloads roads

d)

Displays errors

63.

What is MakeRouteLayer() used for?

a)

Solve polygons

b)

Solve raster

c)

Create routing network

d)

Visualize layers

64.

What is a “Stop” in routing analysis?

a)

Intersection

b)

GPS point

c)

Location to visit

d)

Barrier

65.

Which method solves the route?

a)

SolveNetwork()

b)

arcpy.na.Solve()

c)

route.solve()

d)

calculate_route()

66.

What is used to snap stops to roads?

a)

Clip tool

b)

Buffer

c)

Snap()

d)

Attach()

67.

What is impedance in route analysis?

a)

Layer thickness

b)

Raster cell size

c)

Cost unit for travel (e.g., meters)

d)

Population

68.

What does AddLocations() do?

a)

Sets CRS

b)

Adds fields

c)

Adds stops/barriers

d)

Fixes roads

69.

Which file type stores the solved route?

a)

.csv

b)

.gdb

c)

.shp

d)

All of the above

70.

What is a typical output layer in NA routing?

a)

Buildings

b)

Routes

c)

Rivers

d)

Rasters