geoflow_data: Geoflow data class

geoflow_dataR Documentation

Geoflow data class

Description

This class models a data object

Format

R6Class object.

Details

geoflow_data

Value

Object of R6Class for modelling a data object

Public fields

dir

an object of class character giving a data directory

data

list of object of class geoflow_data in case we point to a data directory

access

accessor key for accessing sources. Default is 'default'

source

source

sourceFid

sourceFid

sourceSql

sourceSql

sourceType

source type

sourceZip

create a zip for the sources (DEPRECATED with #344)

sourceZipOnly

create a zip only for the sources, remove source files (DEPRECATED with #344)

sql

sql

upload

upload

uploadSource

upload source name

uploadType

upload type

cqlfilter

CQL filter for filtering data

workspaces

workspaces

store

store

layername

layer name

layertitle

layer title

layerdesc

layer description

layeruri

layer URI layeruri layer URI

styles

styles

styleUpload

upload styles

dimensions

dimensions

cloud_path

a relative path in a cloud storage (e.g., OCS)

spatialRepresentationType

spatial representation type eg. "vector", "grid"

ogc_dimensions

OGC dimensions

features

features

parameters

parameters

geometryField

geometry field

geometryType

geometry type

featureType

feature type name

featureTypeObj

feature type object

attributes

attributes

variables

variables

coverages

coverages

envelopeCompositionType

envelope composition type (for coverages)

selectedResolution

selected resolution (for coverages)

selectedResolutionIndex

selected resolution index (for coverages)

bands

list of bands

actions

local actions

run

whether to run local actions

Methods

Public methods


Method new()

Initializes an object of class geoflow_data

Usage
geoflow_data$new(str = NULL, config = NULL)
Arguments
str

character string to initialize from, using key-based syntax

config

a geoflow config, if available and needed


Method getDir()

Get data directory where datasets are scanned to build geoflow_data objects

Usage
geoflow_data$getDir()
Returns

an object of class character


Method getData()

Get a lis tof geoflow_data objects built from a directory

Usage
geoflow_data$getData()
Returns

a list of objects of class geoflow_data


Method getAllowedSourceValues()

Get allowed source values

Usage
geoflow_data$getAllowedSourceValues()
Returns

a vector of class character


Method setAccess()

Set accessor id. See list_data_accessors() for available accessors

Usage
geoflow_data$setAccess(access)
Arguments
access

a data data accessor id


Method getAllowedSourceTypes()

Get allowed source types

Usage
geoflow_data$getAllowedSourceTypes()
Returns

a vector of class character


Method setSourceType()

Set the source type. The source type is a simplification of the data mime type and is used to identify the type of source set for the data object. By default it is assumed to be "other" (undefined). The source types currently allowed in geoflow can be listed with $getAllowedSourcedTypes().

Usage
geoflow_data$setSourceType(sourceType)
Arguments
sourceType

source type


Method getAllowedGeomPossibleNames()

Get allowed Geometry possible names for coercing data to sf objects

Usage
geoflow_data$getAllowedGeomPossibleNames()
Arguments
list

of geom possible names


Method getAllowedXPossibleNames()

Get allowed X possible names for coercing data to sf objects

Usage
geoflow_data$getAllowedXPossibleNames()
Arguments
list

of X possible names


Method getAllowedYPossibleNames()

Get allowed Y possible names for coercing data to sf objects

Usage
geoflow_data$getAllowedYPossibleNames()
Arguments
list

of Y possible names


Method addSource()

Add source, object of class "character" (single source)

Usage
geoflow_data$addSource(source)
Arguments
source

source


Method setSource()

Set source, object of class "character" (single source), or list. For spatial source, a single source will be used, while for sources of type 'other' (eg PDF files), multiple sources can be specified

Usage
geoflow_data$setSource(source)
Arguments
source

source


Method setSourceFid()

Set source FID, object of class "character" (single source FID), or list.

Usage
geoflow_data$setSourceFid(sourceFid)
Arguments
sourceFid

sourceFid


Method setSourceSql()

This is a convenience method for users that want to specify directly a SQL source. This method is called internally when a source SQL file has been set using setSource

Usage
geoflow_data$setSourceSql(sourceSql)
Arguments
sourceSql

a source SQL query


Method setSourceZip()

Sets whether a zipped version of the data file(s) should be created from source files. Default is FALSE

Usage
geoflow_data$setSourceZip(sourceZip)
Arguments
sourceZip

zip sources, object of class logical


Method setSourceZipOnly()

Sets whether a zipped version of the data file(s) only should be created from source files. Default is FALSE

Usage
geoflow_data$setSourceZipOnly(sourceZipOnly)
Arguments
sourceZipOnly

zip sources only, object of class logical


Method setUploadSource()

Set the source to upload in output software, alternative to the source. If leave empty, the source will be used as uploadSource. A typical use case is when we want to get a CSV source to import in a database, and use the dbtable (or view/query) as upload source for publication in software like geoserver.

Usage
geoflow_data$setUploadSource(uploadSource)
Arguments
uploadSource

upload source


Method getAllowedUploadTypes()

Get allowed upload types

Usage
geoflow_data$getAllowedUploadTypes()
Returns

the list of allowed upload types


Method setUploadType()

The upload type is a simplification of the data mime type and is used to identify the type of data uploaded. By default it is assumed to be "other" (undefined). The upload types currently allowed in geoflow can be listed with $getAllowedUploadTypes().

Usage
geoflow_data$setUploadType(uploadType)
Arguments
uploadType

upload type


Method setUpload()

Set whether the source data should be uploaded to the sofware output declared in the geoflow configuration or not. By default it is assumed that upload should be performed (upload TRUE).

Usage
geoflow_data$setUpload(upload)
Arguments
upload

upload


Method setStyleUpload()

Set whether styles in source data should be uploaded, by default TRUE

Usage
geoflow_data$setStyleUpload(styleUpload)
Arguments
styleUpload

style upload


Method setSql()

Sets SQL for publication purpose.

Usage
geoflow_data$setSql(sql)
Arguments
sql

sql


Method setCqlFilter()

Sets a CQL filter. In case of spatial data, once the data is read by geoflow (during initialization phase), the CQL filter will be applied to the data.

Usage
geoflow_data$setCqlFilter(cqlfilter)
Arguments
cqlfilter

CQL filter


Method setWorkspace()

Sets a workspace name, object of class character. A workspace must target a valid software type, object of class character, to be declared as first argument of this function, assuming the corresponding software is declared in the geoflow configuration.

Usage
geoflow_data$setWorkspace(software_type, workspace)
Arguments
software_type

sotware type where the workspace is identifier

workspace

workspace name


Method setStore()

Sets a data/coverage store name, object of class character. Used as target data/coverage store name for GeoServer action.

Usage
geoflow_data$setStore(store)
Arguments
store

store


Method setDatastore()

Sets a datastore name, object of class character. Used as target datastore name for GeoServer action. DEPRECATED, use setStore

Usage
geoflow_data$setDatastore(datastore)
Arguments
datastore

datastore


Method setLayername()

Sets a layername, object of class character. Used as target layer name for Geoserver action.

Usage
geoflow_data$setLayername(layername)
Arguments
layername

layername


Method setLayertitle()

Sets a layer title, object of class character. If available, used as target layer title in SDI-related action.

Usage
geoflow_data$setLayertitle(layertitle)
Arguments
layertitle

layertitle


Method setLayerdesc()

Sets a layer description, object of class character. If available, used as target layer description/abstract in SDI-related actions.

Usage
geoflow_data$setLayerdesc(layerdesc)
Arguments
layerdesc

layerdesc


Method setLayeruri()

Sets a layer URI, object of class character. If available, used as annotating URI for layer metadata (eg. in ISO 19115 action).

Usage
geoflow_data$setLayeruri(layeruri)
Arguments
layeruri

layeruri


Method addStyle()

Adds a style name, object of class character. Used as layer style name(s) for GeoServer action.

Usage
geoflow_data$addStyle(style)
Arguments
style

style


Method addDimension()

Adds a dimension

Usage
geoflow_data$addDimension(name, dimension)
Arguments
name

dimension name

dimension

object of class geoflow_dimension


Method setCloudPath()

Set cloud path

Usage
geoflow_data$setCloudPath(cloud_path)
Arguments
cloud_path

cloud path


Method getAllowedSpatialRepresentationTypes()

Get allowed spatial representation types, typically "vector" and "grid"

Usage
geoflow_data$getAllowedSpatialRepresentationTypes()
Returns

an object of class character


Method setSpatialRepresentationType()

Set spatial representation type for the data considered

Usage
geoflow_data$setSpatialRepresentationType(spatialRepresentationType)
Arguments
spatialRepresentationType

spatial representation type


Method setOgcDimensions()

Set OGC dimensions

Usage
geoflow_data$setOgcDimensions(name, values)
Arguments
name

dimension name

values

dimension values


Method setFeatures()

Set data features

Usage
geoflow_data$setFeatures(features)
Arguments
features

features


Method setParameter()

Set virtual parameter definition for setting virtual SQL view parametized layers in Geoserver, when uploadType is set to dbquery.The arguments here follow the definition of virtual parameters in GeoServer, ie a name (alias), the corresponding field name in the DBMS, a regular expression for validation of parameter values (required to prevent SQL injection risks), and a default value.

Usage
geoflow_data$setParameter(name, fieldname, regexp, defaultvalue)
Arguments
name

name

fieldname

fieldname

regexp

regexp

defaultvalue

default value


Method setGeometryField()

Sets the name of the geometry field in the target GeoServer SQL view parametrized layer

Usage
geoflow_data$setGeometryField(geometryField)
Arguments
geometryField

geometry field


Method setGeometryType()

Sets the name of the geometry field in the target GeoServer SQL view parametrized layer

Usage
geoflow_data$setGeometryType(geometryType)
Arguments
geometryType

geometry type


Method setFeatureType()

Sets a feature type (ID) to link data with a dictionnary

Usage
geoflow_data$setFeatureType(featureType)
Arguments
featureType

feature type name


Method setFeatureTypeObj()

Sets a feature type object

Usage
geoflow_data$setFeatureTypeObj(featureTypeObj)
Arguments
featureTypeObj

feature type object of class geoflow_featuretype


Method setAttributes()

Set attributes, as simple way to describe attributes without binding to a proper geoflow_dictionary.

Usage
geoflow_data$setAttributes(attributes)
Arguments
attributes

attributes


Method setVariables()

Set variables, as simple way to describe variables without binding to a proper geoflow_dictionary.

Usage
geoflow_data$setVariables(variables)
Arguments
variables

variables


Method setCoverages()

Set coverages

Usage
geoflow_data$setCoverages(coverages)
Arguments
coverages

coverages


Method getAllowedEnvelopeCompositionTypes()

Get allowed envelope composition types

Usage
geoflow_data$getAllowedEnvelopeCompositionTypes()
Returns

an object of class character


Method setEnvelopeCompositionType()

Set envelope composition type

Usage
geoflow_data$setEnvelopeCompositionType(envelopeCompositionType)
Arguments
envelopeCompositionType

envelope composition type, either 'UNION' or 'INTERSECTION'


Method setSelectedResolution()

Set selected resolution

Usage
geoflow_data$setSelectedResolution(selectedResolution)
Arguments
selectedResolution

selected resolution


Method setSelectedResolutionIndex()

Set selected resolution index

Usage
geoflow_data$setSelectedResolutionIndex(selectedResolutionIndex)
Arguments
selectedResolutionIndex

selected resolution index


Method setBand()

Set band

Usage
geoflow_data$setBand(name, index)
Arguments
name

band name

index

band index


Method addAction()

Adds a local action

Usage
geoflow_data$addAction(action)
Arguments
action

object of class geoflow_action


Method checkSoftwareProperties()

A function triggered when loading a data object to check eventual software dependent properties, to make sure the corresponding software are declared in the config.

Usage
geoflow_data$checkSoftwareProperties(config)
Arguments
config

geoflow config object


Method clone()

The objects of this class are cloneable with this method.

Usage
geoflow_data$clone(deep = FALSE)
Arguments
deep

Whether to make a deep clone.

Author(s)

Emmanuel Blondel <emmanuel.blondel1@gmail.com>


geoflow documentation built on Dec. 12, 2025, 5:08 p.m.