Wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Geospatial Python Libraries Quizz

Total questions: 30

Worksheet time: 26mins

Name
Class
Date
1.

Which geometry type does Point represent in the Shapely library?

a)

A single coordinate location

b)

A straight line

c)

A circular buffer

d)

A closed area

2.

What is the alias commonly used for the pandas library in Python?

a)

. folium, requests

b)

plt

c)

np

d)

pd

3.

What does LineString represent in Shapely?

a)

A series of points forming a line

b)

A closed area

c)

A buffer around a point

d)

A 3D model

4.

You are analyzing flood-prone zones using shapefiles of river buffers and population density. Which Python library would you primarily use to overlay and analyze these spatial datasets?

a)

Shapely

b)

GeoPandas

c)

Fiona

d)

Matplotlib

5.

Which function in Rasterio is commonly used to read and write raster datasets in Python?

a)

rasterio.open()

b)

rasterio.load()

c)

rasterio.read()

d)

rasterio.write()

6.

If you need to generate a buffer zone of 500 meters around each water source point for an environmental impact study, which function would you use in Shapely?

a)

point.buffer(500)

b)

create_buffer(500)

c)

buffer_zone(500)

d)

geometry.expand(500)

7.

When visualizing a geospatial dataset interactively on a web map using Python, which library is most suitable?

a)

Matplotlib

b)

Folium

c)

Rasterio

d)

Shapely

8.

You have a CSV file containing latitude and longitude columns. Which pandas function is used to load the CSV into a DataFrame?

a)

pd.read_csv()

b)

pd.load_csv()

c)

pd.import_csv()

d)

pd.get_csv()

9.

Which Python library is best for converting shapefiles to GeoJSON format for web mapping?

a)

GeoPandas

b)

Shapely

c)

Matplotlib

d)

Seaborn

10.

In a forest cover change analysis, which raster operation helps you calculate the difference in NDVI between two years?

a)

Raster subtraction

b)

Raster masking

c)

Raster merging

11.

Which function is used in GeoPandas to plot geospatial DataFrames?

a)

gdf.plot()

b)

gdf.draw()

c)

gdf.map()

d)

gdf.visualize()

12.

You are given a shapefile with outdated coordinate reference system (CRS). Which GeoPandas function allows you to reproject it?

a)

to_crs()

b)

transform()

c)

change_crs()

d)

project_to()

13.

To create a choropleth map of population density using Folium, which function is used?

a)

folium.Choropleth()

b)

folium.HeatMap()

c)

folium.Marker()

d)

folium.Polygon()

14.

Which Python library is primarily used for file I/O of vector data formats like Shapefile, GPKG, etc.?

a)

Fiona

b)

Pandas

c)

NumPy

d)

Shapely

15.

How do you extract metadata like CRS and transform from a raster using Rasterio?

a)

src.meta

b)

src.info

c)

src.profile

d)

src.describe

16.

You need to classify land use types in a satellite image using pixel values. Which data type would you expect the raster to be?

a)

Categorical

b)

Continuous

17.

Which of the following is a data type used for categorical data?

a)

String

b)

Boolean

18.

Which geospatial operation helps determine all points within a 2 km radius of a given hospital?

a)

Buffer

b)

Intersect

c)

Union

d)

Clip

19.

To load a GeoTIFF file and view its band information, which Rasterio function is commonly used?

a)

rasterio.open()

b)

rasterio.band()

c)

rasterio.show()

d)

rasterio.read_band()

20.

Which function allows you to merge two geospatial layers in GeoPandas based on shared geometry or attributes?

a)

gpd.overlay()

b)

gpd.concat()

c)

gpd.merge()

d)

gpd.union()

21.

Which function in Shapely checks whether two geometries intersect?

a)

.intersects()

b)

.crosses()

c)

.contains()

d)

.within()

22.

To read vector data using Fiona, which function is used?

a)

fiona.open()

b)

fiona.load()

c)

fiona.read_file()

d)

fiona.vector()

23.

What is the purpose of the folium.Marker() function in the Folium library?

To create a polygon

To draw a line between coordinates

To place an interactive marker on the map

To add a raster image

a)

To create a polygon

b)

To draw a line between coordinates

c)

To place an interactive marker on the map

d)

To add a raster image

24.

What function would you use in Matplotlib to display a basic plot of raster data using a 2D NumPy array?

b)

plt.imshow()

c)

plt.plot()

d)

plt.raster()

25.

What does the .crs attribute in a GeoDataFrame represent?

a)

Column rename string

b)

Coordinate reference system

c)

Calculation result set

d)

Current raster source

26.

Which function is used to convert a GeoDataFrame to a shapefile in GeoPandas?

a)

gdf.write_file()

b)

gdf.to_file()

d)

gdf.export_shapefile()

27.

In Shapely, what does geometry1.contains(geometry2) check?

a)

Whether geometry1 and geometry2 are equal

b)

Whether geometry1 is inside geometry2

c)

Whether geometry1 completely encloses geometry2

d)

Whether geometry2 is intersecting geometry1

28.

What is the output type when you use shapely.geometry.box()?

a)

Polygon

b)

Point

c)

LineString

d)

MultiPolygon

29.

In GeoPandas, what is the purpose of the dissolve() function?

a)

To clip a dataset

b)

To merge geometries based on attribute values

c)

To split features

d)

To project geometries

30.

How can you read the first few rows of a DataFrame in pandas?

a)
b)

df.peek()

d)

df.head()