lib/adiwg/mdtranslator/readers/fgdc/modules/module_verticalDepth.rb in adiwg-mdtranslator-2.9.2 vs lib/adiwg/mdtranslator/readers/fgdc/modules/module_verticalDepth.rb in adiwg-mdtranslator-2.10.0
- old
+ new
@@ -25,10 +25,13 @@
# -> referenceSystemParameters.verticalDatum.datumName
datumName = xDepthSys.xpath('./depthdn').text
unless datumName.empty?
hDatum[:datumName] = datumName
end
+ if datumName.empty?
+ hResponseObj[:readerExecutionMessages] << 'WARNING: FGDC reader: vertical depth datum name is missing'
+ end
# depth datum 4.2.2.2 (depthres) - depth resolution [] (take first)
# -> referenceSystemParameters.verticalDatum.verticalResolution
depthRes = xDepthSys.xpath('./depthres[1]').text
unless depthRes.empty?
@@ -39,15 +42,21 @@
# -> referenceSystemParameters.verticalDatum.unitOfMeasure
depthUnits = xDepthSys.xpath('./depthdu').text
unless depthUnits.empty?
hDatum[:unitOfMeasure] = depthUnits
end
+ if depthUnits.empty?
+ hResponseObj[:readerExecutionMessages] << 'WARNING: FGDC reader: vertical depth distance units are missing'
+ end
# depth datum 4.2.2.4 (depthem) - depth encoding method
# -> referenceSystemParameters.verticalDatum.encodingMethod
depthEncode = xDepthSys.xpath('./depthem').text
unless depthEncode.empty?
hDatum[:encodingMethod] = depthEncode
+ end
+ if depthEncode.empty?
+ hResponseObj[:readerExecutionMessages] << 'WARNING: FGDC reader: vertical depth encoding method is missing'
end
hParamSet = intMetadataClass.newReferenceSystemParameterSet
hRefSystem = intMetadataClass.newSpatialReferenceSystem
hParamSet[:verticalDatum] = hDatum