WorksheetsGeospatial Python Libraries Quizz
Total questions: 30
Worksheet time: 26mins
Which geometry type does Point represent in the Shapely library?
A single coordinate location
A straight line
A circular buffer
A closed area
What is the alias commonly used for the pandas library in Python?
. folium, requests
plt
np
pd
What does LineString represent in Shapely?
A series of points forming a line
A closed area
A buffer around a point
A 3D model
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?
Shapely
GeoPandas
Fiona
Matplotlib
Which function in Rasterio is commonly used to read and write raster datasets in Python?
rasterio.open()
rasterio.load()
rasterio.read()
rasterio.write()
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?
point.buffer(500)
create_buffer(500)
buffer_zone(500)
geometry.expand(500)
When visualizing a geospatial dataset interactively on a web map using Python, which library is most suitable?
Matplotlib
Folium
Rasterio
Shapely
You have a CSV file containing latitude and longitude columns. Which pandas function is used to load the CSV into a DataFrame?
pd.read_csv()
pd.load_csv()
pd.import_csv()
pd.get_csv()
Which Python library is best for converting shapefiles to GeoJSON format for web mapping?
GeoPandas
Shapely
Matplotlib
Seaborn
In a forest cover change analysis, which raster operation helps you calculate the difference in NDVI between two years?
Raster subtraction
Raster masking
Raster merging
Which function is used in GeoPandas to plot geospatial DataFrames?
gdf.plot()
gdf.draw()
gdf.map()
gdf.visualize()
You are given a shapefile with outdated coordinate reference system (CRS). Which GeoPandas function allows you to reproject it?
to_crs()
transform()
change_crs()
project_to()
To create a choropleth map of population density using Folium, which function is used?
folium.Choropleth()
folium.HeatMap()
folium.Marker()
folium.Polygon()
Which Python library is primarily used for file I/O of vector data formats like Shapefile, GPKG, etc.?
Fiona
Pandas
NumPy
Shapely
How do you extract metadata like CRS and transform from a raster using Rasterio?
src.meta
src.info
src.profile
src.describe
You need to classify land use types in a satellite image using pixel values. Which data type would you expect the raster to be?
Categorical
Continuous
Which of the following is a data type used for categorical data?
String
Boolean
Which geospatial operation helps determine all points within a 2 km radius of a given hospital?
Buffer
Intersect
Union
Clip
To load a GeoTIFF file and view its band information, which Rasterio function is commonly used?
rasterio.open()
rasterio.band()
rasterio.show()
rasterio.read_band()
Which function allows you to merge two geospatial layers in GeoPandas based on shared geometry or attributes?
gpd.overlay()
gpd.concat()
gpd.merge()
gpd.union()
Which function in Shapely checks whether two geometries intersect?
.intersects()
.crosses()
.contains()
.within()
To read vector data using Fiona, which function is used?
fiona.open()
fiona.load()
fiona.read_file()
fiona.vector()
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
To create a polygon
To draw a line between coordinates
To place an interactive marker on the map
To add a raster image
What function would you use in Matplotlib to display a basic plot of raster data using a 2D NumPy array?
What does the .crs attribute in a GeoDataFrame represent?
Column rename string
Coordinate reference system
Calculation result set
Current raster source
In Shapely, what does geometry1.contains(geometry2) check?
Whether geometry1 and geometry2 are equal
Whether geometry1 is inside geometry2
Whether geometry1 completely encloses geometry2
Whether geometry2 is intersecting geometry1
What is the output type when you use shapely.geometry.box()?
Polygon
Point
LineString
MultiPolygon
In GeoPandas, what is the purpose of the dissolve() function?
To clip a dataset
To merge geometries based on attribute values
To split features
To project geometries
