Streetscape-class {streetscape}R Documentation

Streetscape-Class

Description

The output of strview_search family functions is constructed in this data format - A specialized data frame for streetscape package for initializing the object with streetscape data and extracting and decoding segmentation information of streetscape dataframe.

Fields

data

A data frame containing metadata of Mapillary street view images

epsg

A numeric epsg code

Methods

decodeDetection()

Regenerate a dataframe with decoded segmentation. 'detections' column will be updated and a new column 'segmentation' will be added.

download_data(path, items)

Download street view images (and segmentations in sf format if applicable)

get_mask(index)

Convert the semantic segmentation of a street view image from the StreetscapeDataFrame into sf polygons

gvi(level)

Calculate green view index (GVI) for each collected image by segmenting green pixels and quantifing the percentage in street view images. This method adds a new column of greeness percetage to the dataframe

mapPreview(maptype = "meta", fields = c())

Plot data points in an ineractive map view

Class Methods

Method list


Method decodeDetection()

Usage

scdataframe$decodeDetection()


Method gvi()

Usage

scdataframe$gvi(level = 1)

Arguments
level

numeric, indicating the resolution level of images for calculating the green view index. 1 - the 256px wide thumbnail; 2 - the 1024px wide thumbnail; 3 - the 2048px wide thumbnail; 4 - the original wide thumbnail. The default is level = 1


Method get_mask()

Usage

scdataframe$get_mask(index = 1)

Arguments
index

numeric, the row index of the dataframe of StreetscapeDataFrame class


Method mapPreview()

Usage

scdataframe$mapPreview(maptype = 'meta')

Arguments
maptype

character or character, specifying what type of information to be mapped: 'meta' - image meta, 'seg' - segmentation proportion, and 'gvi' - GVI".

fields

vector (optional), a vector of fields indicates the information of images to be included for the 'meta' map. The fields of 'id', 'is_pano', 'height', 'width', 'lon', and 'lat' are already included


Method download_data()

Usage

scdataframe$download_data(path = 'path/to/download', items = c('image', 'mask'))

Arguments
path

character, directory for downloading street view images or segmentation masks or both

items

character or vector, specifying what to download: 'image' - 'original street view image; 'mask' - semantic segmentation (sf objects in .geojson format)"


[Package streetscape version 1.0.2 Index]