Learn R Programming

geometa (version 0.6-2)

ISOFeatureType: ISOFeatureType

Description

ISOFeatureType

Usage

ISOFeatureType

Arguments

Value

Object of R6Class for modelling an ISO FeatureType

Format

R6Class object.

Fields

typeName

[ISOLocalName]

definition

[character]

code

[character]

isAbstract

[logical]

aliases

[ISOLocalName]

inheritsFrom

[ISOInheritanceRelation]

inheritsTo

[ISOInheritanceRelation]

featureCatalogue

[ISOFeatureCatalogue]

constrainedBy

[ISOConstraints]

definitionReference

[ISODefinitionReference]

carrierOfCharacteristics

[ISOCarrierOfCharacteristics]

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, locales)

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

setCode(code, locales)

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

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

addInheritsFrom(rel)

Adds a relation (from) as object of class ISOInheritanceRelation

delInheritsFrom(rel)

Deletes a relation (from) as object of class ISOInheritanceRelation

addInheritsTo(rel)

Adds a relation (to) as object of class ISOInheritanceRelation

delInheritsTo(rel)

Deletes a relation (to) as object of class ISOInheritanceRelation

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