Learn R Programming

geometa (version 0.6-2)

ISOFeatureCatalogue: ISOFeatureCatalogue

Description

ISOFeatureCatalogue

Usage

ISOFeatureCatalogue

Arguments

Value

Object of R6Class for modelling an ISO FeatureCatalogue

Format

R6Class object.

Fields

producer

[ISOResponsibleParty]

functionalLanguage

[ISOLanguage]

featureType

[ISOFeatureType]

definitionSource

[ISODefinitionSource]

Methods inherited from <code><a rd-options="" href="/link/ISOAbstractCatalogue?package=geometa&version=0.6-2" data-mini-rdoc="geometa::ISOAbstractCatalogue">ISOAbstractCatalogue</a></code>

setName(name, locales)

Sets the name. Locale names can be specified as list with the locales argument.

addScope(scope, locales)

Adds scope (object of class character). Locale names can be specified as list with the locales argument.

delScope(scope, locales)

Deletes scope. Locale names can be specified as list with the locales argument. Local names should match those of the scope to be deleted, otherwise nothing will be deleted.

addFieldOfApplication(fieldOfApplication, locales)

Adds a field of application (object of class character). Locale names can be specified as list with the locales argument.

delFieldOfApplication(fieldOfApplication, locales)

Deletes fieldOfApplication. Locale names can be specified as list with the locales argument. Local names should match those of the field of application to be deleted, otherwise nothing will be deleted.

setVersionNumber(versionNumber)

Sets version number (object of class character)

setVersionDate(versionDate)

Sets version date

Methods

new(xml, uuid)

This method is used to instantiate an ISOFeatureCatalogue

setProducer(producer)

Sets an object of class ISOResponsibleParty as producer

setFunctionalLanguage(functionalLanguage)

Sets the functional language

addFeatureType(featureType)

Adds a feature type, object of class ISOFeatureType

delFeatureType(featureType)

Deletes a feature type, object of class ISOFeatureType

addDefinitionSource(source)

Adds a definition source, object of class ISODefinitionSource or ISOCitation

delDefinitionSource(source)

Deletes a definition source, object of class ISODefinitionSource or ISOCitation

References

ISO 19110:2005 Methodology for Feature cataloguing

Examples

Run this code
# NOT RUN {
 fc <- ISOFeatureCatalogue$new(uuid = "my-fc-identifier")
 fc$setName("name")
 fc$addScope("scope1")
 fc$addScope("scope2")
 fc$addFieldOfApplication("field1")
 fc$addFieldOfApplication("field2")
 fc$setVersionNumber("1.0")
 fc$setVersionDate(ISOdate(2015, 1, 1, 1))
 
 producer <- ISOResponsibleParty$new()
 producer$setIndividualName("someone")
 fc$setProducer(producer)
 fc$setFunctionalLanguage("eng")
 
 cit <- ISOCitation$new()
 cit$setTitle("some citation title")
 fc$addDefinitionSource(cit)
 #'  #add featureType
 ft <- ISOFeatureType$new()
 ft$setTypeName("typeName")
 ft$setDefinition("definition")
 ft$setCode("code")
 ft$setIsAbstract(FALSE)
 ft$addAlias("alias1")
 ft$addAlias("alias2")
 
 #add feature attributes
 for(i in 1:3){
   #create attribute
   fat <- ISOFeatureAttribute$new()
   fat$setMemberName(sprintf("name %s",i))
   fat$setDefinition(sprintf("definition %s",i))
   fat$setCardinality(lower=1,upper=1)
   fat$setCode(sprintf("code %s",i))
   
   gml <- GMLBaseUnit$new(id = sprintf("ID%s",i))
   gml$setDescriptionReference("someref")
   gml$setIdentifier("identifier", "codespace")
   gml$addName("name1", "codespace")
   gml$addName("name2", "codespace")
   gml$setQuantityTypeReference("someref")
   gml$setCatalogSymbol("symbol")
   gml$setUnitsSystem("somelink")
   fat$setValueMeasurementUnit(gml)
   
   #add listed values
   val1 <- ISOListedValue$new()
   val1$setCode("code1")
   val1$setLabel("label1")
   val1$setDefinition("definition1")
   fat$addListedValue(val1)
   val2 <- ISOListedValue$new()
   val2$setCode("code2")
   val2$setLabel("label2")
   val2$setDefinition("definition2")
   fat$addListedValue(val2)
   fat$setValueType("typeName")
   
   #add feature attribute as carrierOfCharacteristic
   ft$addCharacteristic(fat)
 }
 #add featureType to catalogue
 fc$addFeatureType(ft)
 
 xml <- fc$encode()
 
# }

Run the code above in your browser using DataLab