Learn R Programming

geometa (version 0.2-0)

ISOFeatureType: ISOFeatureType

Description

ISOFeatureType

Usage

ISOFeatureType

Arguments

Value

Object of R6Class for modelling an ISO FeatureType

Format

R6Class object.

Fields

typeName

definition

code

isAbstract

aliases

inheritsFrom

inheritsTo

featureCatalogue

constrainedBy

definitionReference

carrierOfCharacteristics

Methods

new(xml)

This method is used to instantiate an ISOFeatureType

setTypeName(typeName)

Sets the type name. Object of class ISOLocalName or "character"

setDefinition(definition)

Sets the definition

setCode(code)

Sets the code

setIsAbstract(isAbstract)

Sets TRUE/FALSE if the feature type is abstract or not

addAlias(alias)

Set alias name. Object of class ISOLocalName or "character"

delAlias(alias)

Deletes alias name

setFeatureCatalogue(fc)

Sets a feature catalogue, object of class ISOFeatureCatalogue

addConstraint(constraint)

Adds a constraint, object of class ISOConstraint or character

delConstraint(constraint)

Deletes a constraint, object of class ISOConstraint or character

setDefinitionReference(definitionReference)

Sets the definition Reference, object of class ISODefinitionReference

addCharacteristic(characteristic)

Adds a characteristic as object of class ISOPropertyType or subclass

delCharacteristic(characteristic)

Deletes a characteristic as object of class ISOPropertyType or subclass

References

ISO 19110:2005 Methodology for Feature cataloguing

Examples

Run this code
# NOT RUN {
#featuretype
 md <- ISOFeatureType$new()
 md$setTypeName("typeName")
 md$setDefinition("definition")
 md$setCode("code")
 md$setIsAbstract(FALSE)
 md$addAlias("alias1")
 md$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))

   #add measurement unit
   gml <- GMLBaseUnit$new(id = "ID%")
   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
   md$addCharacteristic(fat)
 }
 xml <- md$encode()
# }

Run the code above in your browser using DataLab