WorksheetsGeoPandas Worksheet Questions
Total questions: 70
Worksheet time: 35mins
What function is used to convert a DataFrame to a GeoDataFrame?
GeoPandas.create()
gpd.read_shapefile()
gpd.GeoDataFrame()
GeoFrame()
Which method is used to check the Coordinate Reference System of a GeoDataFrame?
.crs
.epsg()
.getCRS()
.projection
What is returned by gdf.geometry.centroid?
Buffer of all geometries
Midpoint of lines
Centroid point geometry
None of the above
What type of object does gdf.plot() return?
Folium map
Raster layer
Matplotlib Axes
List of coordinates
Which GeoPandas function writes data to a shapefile?
gdf.write()
gdf.save()
gdf.to_file()
gdf.export()
What type of geometry is typically used for administrative boundaries?
Point
Polygon
LineString
GeometryCollection
What does gdf.geometry.area return?
Total population
Size of bounding box
Area of each geometry
Number of features
Which CRS format is accepted by GeoPandas?
EPSG:4326
4326
proj4 string
All of the above
Which method merges two GeoDataFrames?
.merge()
spatial_join()
overlay()
join()
What is a typical use case for gpd.overlay()?
Changing CRS
Dissolving geometries
Spatial operations like intersection
Reading data
How do you remove invalid geometries in GeoPandas?
gdf.clean()
gdf.dropna()
gdf[~gdf.geometry.is_valid]
gdf.filter()
What does gdf.buffer(0.01) do?
Reduces the geometry size
Removes points
Creates a buffer around geometries
Changes CRS
What type of join is done by sjoin()?
SQL join
Attribute join
Spatial join
Table join
How do you reproject a GeoDataFrame?
gdf.crs("EPSG:3857")
gdf.set_crs()
gdf.to_crs()
gdf.convert_crs()
What is the output type of gdf.dissolve(by='state')?
GeoSeries
GeoDataFrame
Series
None
What does Point(1, 2) represent in Shapely?
Line segment
2D point geometry
Polygon corner
CRS
What does LineString([point1, point2]) return?
A curve
A polygon
A series
A line connecting the points
Which Shapely function checks geometry validity?
isvalid()
geometry.check()
geometry.is_valid
geometry.validate()
Which function converts WKT to geometry?
loads()
dump()
fromWKT()
to_geom()
What is geometry.area used for?
CRS conversion
Area in degrees
Area of geometry
Memory usage
What does .intersects(other_geom) return?
True/False
Geometry object
Buffer
CRS
What does .buffer(0) often help with?
Increase file size
Fix geometry errors
Change units
Convert CRS
How do you check if one polygon is inside another?
polygon1.contains(polygon2)
polygon1.equals(polygon2)
polygon1.intersects(polygon2)
polygon1.near(polygon2)
Which of these is not a valid Shapely geometry?
LineString
Point
GeoArray
Polygon
What module must be imported to use Point or Polygon?
geopandas
fiona
shapely.geometry
rasterio
What is returned by .distance() in Shapely?
Buffer
Angle
Distance between two geometries
Area
How do you combine two polygons into one in Shapely?
combine()
append()
union()
merge()
Which function returns the bounding box?
.bounds
.bbox()
.extent()
.bbox
Which method checks exact geometry equality?
compare()
equals()
matches()
similar()
What is .wkt used for in Shapely?
Save to GeoJSON
Load raster
Return WKT string
What does Fiona open with?
with fiona.read()
with open()
with fiona.open()
fiona.load()
What is a common mode in Fiona for writing data?
'write'
'w'
'rw'
'r+'
Fiona reads what type of object per feature?
Tuple
Dictionary
Pandas DataFrame
Shapely Polygon
Fiona is built on top of which library?
GeoPandas
GDAL/OGR
Rasterio
PyShp
What file formats can Fiona read/write?
Only .shp
.json and .csv
Vector formats supported by GDAL
Only GeoJSON
What does Fiona use to define schema?
CRS
Type rules
Dictionary
YAML file
What attribute gives the CRS of a file in Fiona?
.epsg
.proj
.crs
.projection
How do you iterate through features in Fiona?
for row in file:
for feat in fiona:
for feature in layer:
for feature in file:
Which file must always be present in a shapefile read by Fiona?
.shx
.prj
.shp
.dbf
How do you write new features in Fiona?
write()
write_feature()
add()
dump()
Which format does Folium map export to?
PNG
HTML
GeoTIFF
Which folium method adds a marker?
add_marker()
folium.Marker()
folium.add_marker()
map.drop()
Which of the following creates a base map in Folium?
folium.TileLayer()
folium.BaseMap()
folium.Map()
folium.View()
Which argument controls map zoom?
zoom_value
zoom
zoom_start
zoom_level
What is required to add a PolyLine to a Folium map?
List of coordinates
GeoTIFF
Raster
WKT
Which argument changes the marker color in Folium?
icon_color
fill_color
color
popup_color
How can you add a popup label to a marker?
popup=
label=
tooltip=
show=
What layer type allows for GeoJSON visualization?
folium.Layer()
folium.GeoJson()
folium.FileReader()
folium.VectorLayer()
What does map.save("map.html") do?
Displays map in terminal
Prints base64
Saves map as web page
Saves shapefile
Which plugin allows search capability in Folium?
SearchControl
Search
folium.plugins.Search
MapSearch()
What is Rasterio primarily used for?
Vector mapping
Elevation modeling
Raster data I/O
Network routing
Which function opens a raster file?
open()
rasterio.open()
read()
load()
What does src.read(1) do?
Reads all bands
Reads metadata
Reads the first band
Reads CRS
Which Rasterio property gives CRS info?
src.crs
src.get_crs()
src.coordref
src.ref
What does src.transform give?
Projection
Affine transform
GeoTIFF resolution
NoData
What file format is NOT supported by Rasterio?
.tif
.tiff
.shp
.vrt
What happens if you forget to close a raster file?
Automatic save
Crash
Memory leak
File lock remains
What library works well with Rasterio for display?
PIL
matplotlib
OpenCV
GeoPandas
What is nodata in Rasterio?
Hidden column
Cell with no value
Raster mask
NaN filter
How do you write a new raster in Rasterio?
with rasterio.open('file', 'w') as dst:
write_raster()
rasterio.writer()
raster.save()
Which extension is used in ArcPy for routing?
Spatial
3D
Network
Mapping
What does CheckOutExtension("Network") do?
Validates license
Installs NA
Downloads roads
Displays errors
What is MakeRouteLayer() used for?
Solve polygons
Solve raster
Create routing network
Visualize layers
What is a “Stop” in routing analysis?
Intersection
GPS point
Location to visit
Barrier
Which method solves the route?
SolveNetwork()
arcpy.na.Solve()
route.solve()
calculate_route()
What is used to snap stops to roads?
Clip tool
Buffer
Snap()
Attach()
What is impedance in route analysis?
Layer thickness
Raster cell size
Cost unit for travel (e.g., meters)
Population
What does AddLocations() do?
Sets CRS
Adds fields
Adds stops/barriers
Fixes roads
Which file type stores the solved route?
.csv
.gdb
.shp
All of the above
What is a typical output layer in NA routing?
Buildings
Routes
Rivers
Rasters
