adiwg-mdtranslator 2.12.0 → 2.13.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +15 -1
- data/adiwg-mdtranslator.gemspec +1 -1
- data/lib/adiwg/mdtranslator/internal/internal_metadata_obj.rb +2 -0
- data/lib/adiwg/mdtranslator/readers/fgdc/fgdc_reader.rb +4 -0
- data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_entityAttribute.rb +1 -1
- data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_georectifiedRepresentation.rb +7 -12
- data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_resourceInfo.rb +12 -11
- data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_source.rb +15 -7
- data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_taxonomy.rb +1 -6
- data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_timePeriod.rb +15 -1
- data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_transferOption.rb +1 -3
- data/lib/adiwg/mdtranslator/version.rb +5 -1
- data/lib/adiwg/mdtranslator/writers/fgdc/classes/class_citation.rb +1 -1
- data/lib/adiwg/mdtranslator/writers/fgdc/classes/class_contact.rb +4 -2
- data/lib/adiwg/mdtranslator/writers/fgdc/classes/class_geologicAge.rb +1 -1
- data/lib/adiwg/mdtranslator/writers/fgdc/classes/class_identification.rb +1 -1
- data/lib/adiwg/mdtranslator/writers/fgdc/classes/class_method.rb +1 -1
- data/lib/adiwg/mdtranslator/writers/fgdc/classes/class_source.rb +1 -1
- data/lib/adiwg/mdtranslator/writers/fgdc/classes/class_taxonomyKeywords.rb +4 -4
- data/lib/adiwg/mdtranslator/writers/fgdc/classes/class_taxonomySystem.rb +1 -1
- data/lib/adiwg/mdtranslator/writers/iso19110/classes/class_fcFeatureCatalogue.rb +7 -7
- data/lib/adiwg/mdtranslator/writers/iso19110/iso19110_writer.rb +6 -5
- data/lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_address.rb +104 -104
- data/lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_aggregateInformation.rb +63 -60
- data/lib/adiwg/mdtranslator/writers/iso19115_2/classes/{class_attributeGroup.rb → class_attribute.rb} +1 -1
- data/lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_baseUnit.rb +23 -23
- data/lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_boundingBox.rb +64 -60
- data/lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_browseGraphic.rb +55 -51
- data/lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_citation.rb +24 -14
- data/lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_contact.rb +96 -91
- data/lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_conventionalUnit.rb +45 -45
- data/lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_coverageDescription.rb +104 -77
- data/lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_crs.rb +4 -4
- data/lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_dataIdentification.rb +23 -8
- data/lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_dataQuality.rb +57 -52
- data/lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_date.rb +49 -46
- data/lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_definitionUnit.rb +20 -20
- data/lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_derivedUnit.rb +32 -32
- data/lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_dimension.rb +56 -50
- data/lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_distribution.rb +1 -1
- data/lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_distributor.rb +77 -74
- data/lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_enumerationList.rb +34 -34
- data/lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_extension.rb +190 -186
- data/lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_extent.rb +66 -66
- data/lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_feature.rb +50 -45
- data/lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_featureCollection.rb +35 -35
- data/lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_featureProperties.rb +43 -43
- data/lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_format.rb +73 -69
- data/lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_fraction.rb +37 -33
- data/lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_geographicElement.rb +59 -54
- data/lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_geographicExtent.rb +58 -58
- data/lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_geometricObjects.rb +49 -46
- data/lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_geometryCollection.rb +68 -63
- data/lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_georectified.rb +113 -110
- data/lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_georeferenceable.rb +78 -75
- data/lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_gmlIdentifier.rb +17 -17
- data/lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_grid.rb +55 -52
- data/lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_gridRepresentation.rb +19 -19
- data/lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_hierarchy.rb +47 -47
- data/lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_image.rb +132 -132
- data/lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_keyword.rb +5 -2
- data/lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_lineString.rb +70 -70
- data/lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_lineage.rb +55 -55
- data/lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_locale.rb +51 -48
- data/lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_maintenance.rb +114 -105
- data/lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_mdBand.rb +111 -111
- data/lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_mdIdentifier.rb +9 -3
- data/lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_measure.rb +58 -41
- data/lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_medium.rb +104 -104
- data/lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_miBand.rb +70 -70
- data/lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_miMetadata.rb +51 -16
- data/lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_multiLine.rb +70 -70
- data/lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_multiPoint.rb +70 -70
- data/lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_multiPolygon.rb +70 -70
- data/lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_onlineResource.rb +79 -76
- data/lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_orderProcess.rb +67 -67
- data/lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_phone.rb +67 -67
- data/lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_point.rb +8 -8
- data/lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_polygon.rb +89 -89
- data/lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_processStep.rb +9 -3
- data/lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_rangeDimension.rb +59 -54
- data/lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_referenceSystem.rb +1 -1
- data/lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_resolution.rb +47 -47
- data/lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_responsibleParty.rb +111 -105
- data/lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_rsIdentifier.rb +71 -65
- data/lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_scope.rb +54 -50
- data/lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_scopeDescription.rb +45 -42
- data/lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_securityConstraints.rb +92 -89
- data/lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_series.rb +55 -55
- data/lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_source.rb +98 -91
- data/lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_spatialRepresentation.rb +42 -42
- data/lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_taxonomicClassification.rb +63 -59
- data/lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_taxonomicSystem.rb +40 -40
- data/lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_taxonomy.rb +133 -130
- data/lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_temporalExtent.rb +49 -49
- data/lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_timeInstant.rb +60 -60
- data/lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_timePeriod.rb +110 -108
- data/lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_transferOptions.rb +71 -69
- data/lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_unitsOfMeasure.rb +243 -243
- data/lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_usage.rb +98 -95
- data/lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_useConstraints.rb +38 -38
- data/lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_vectorRepresentation.rb +48 -48
- data/lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_verticalExtent.rb +74 -70
- data/lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_vouchers.rb +56 -53
- data/lib/adiwg/mdtranslator/writers/iso19115_2/iso19115_2_writer.rb +61 -11
- data/lib/adiwg/mdtranslator/writers/iso19115_2/iso19115_2_writer_messages_eng.yml +109 -0
- data/lib/adiwg/mdtranslator/writers/iso19115_2/version.rb +3 -2
- data/lib/adiwg/mdtranslator_cli.rb +21 -4
- metadata +6 -5
@@ -2,14 +2,14 @@
|
|
2
2
|
# 19115-2 writer output in XML
|
3
3
|
|
4
4
|
# History:
|
5
|
-
#
|
6
|
-
#
|
7
|
-
#
|
8
|
-
#
|
9
|
-
#
|
10
|
-
#
|
11
|
-
#
|
12
|
-
#
|
5
|
+
# Stan Smith 2016-12-01 refactored for mdTranslator/mdJson 2.0
|
6
|
+
# Stan Smith 2015-07-14 refactored to eliminate namespace globals $WriterNS and $IsoNS
|
7
|
+
# Stan Smith 2015-07-14 refactored to make iso19110 independent of iso19115_2 classes
|
8
|
+
# Stan Smith 2015-06-22 replace global ($response) with passed in object (hResponseObj)
|
9
|
+
# Stan Smith 2014-12-12 refactored to handle namespacing readers and writers
|
10
|
+
# Stan Smith 2014-07-08 modify require statements to function in RubyGem structure
|
11
|
+
# Stan Smith 2014-05-29 ... added new class for geographicElement
|
12
|
+
# Stan Smith 2014-05-29 changes for json schema version 0.5.0
|
13
13
|
# Stan Smith 2013-11-15 add vertical elements
|
14
14
|
# Stan Smith 2013-11-15 add temporal elements
|
15
15
|
# Stan Smith 2013-11-01 original script
|
@@ -19,73 +19,73 @@ require_relative 'class_temporalExtent'
|
|
19
19
|
require_relative 'class_verticalExtent'
|
20
20
|
|
21
21
|
module ADIWG
|
22
|
-
|
23
|
-
|
24
|
-
|
22
|
+
module Mdtranslator
|
23
|
+
module Writers
|
24
|
+
module Iso19115_2
|
25
25
|
|
26
|
-
|
26
|
+
class EX_Extent
|
27
27
|
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
28
|
+
def initialize(xml, hResponseObj)
|
29
|
+
@xml = xml
|
30
|
+
@hResponseObj = hResponseObj
|
31
|
+
end
|
32
32
|
|
33
|
-
|
33
|
+
def writeXML(hExtent, inContext = nil)
|
34
34
|
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
35
|
+
# classes used
|
36
|
+
tempExtClass = EX_TemporalExtent.new(@xml, @hResponseObj)
|
37
|
+
vertExtClass = EX_VerticalExtent.new(@xml, @hResponseObj)
|
38
|
+
geoExtClass = GeographicExtent.new(@xml, @hResponseObj)
|
39
39
|
|
40
|
-
|
40
|
+
@xml.tag!('gmd:EX_Extent') do
|
41
41
|
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
42
|
+
# extent - description
|
43
|
+
s = hExtent[:description]
|
44
|
+
unless s.nil?
|
45
|
+
@xml.tag!('gmd:description') do
|
46
|
+
@xml.tag!('gco:CharacterString', s)
|
47
|
+
end
|
48
|
+
end
|
49
|
+
if s.nil? && @hResponseObj[:writerShowTags]
|
50
|
+
@xml.tag!('gmd:description')
|
51
|
+
end
|
52
52
|
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
53
|
+
# extent - geographic extent []
|
54
|
+
aGeoExtents = hExtent[:geographicExtents]
|
55
|
+
aGeoExtents.each do |hGeoExtent|
|
56
|
+
geoExtClass.writeXML(hGeoExtent)
|
57
|
+
end
|
58
|
+
if aGeoExtents.empty? && @hResponseObj[:writerShowTags]
|
59
|
+
@xml.tag!('gmd:geographicElement')
|
60
|
+
end
|
61
61
|
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
62
|
+
# extent - temporal extent []
|
63
|
+
aTempElements = hExtent[:temporalExtents]
|
64
|
+
aTempElements.each do |hTempElement|
|
65
|
+
@xml.tag!('gmd:temporalElement') do
|
66
|
+
tempExtClass.writeXML(hTempElement)
|
67
|
+
end
|
68
|
+
end
|
69
|
+
if aTempElements.empty? && @hResponseObj[:writerShowTags]
|
70
|
+
@xml.tag!('gmd:temporalElement')
|
71
|
+
end
|
72
72
|
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
73
|
+
# extent - vertical extent []
|
74
|
+
aVertElements = hExtent[:verticalExtents]
|
75
|
+
aVertElements.each do |hVertElement|
|
76
|
+
@xml.tag!('gmd:verticalElement') do
|
77
|
+
vertExtClass.writeXML(hVertElement)
|
78
|
+
end
|
79
|
+
end
|
80
|
+
if aVertElements.empty? && @hResponseObj[:writerShowTags]
|
81
|
+
@xml.tag!('gmd:verticalElement')
|
82
|
+
end
|
83
83
|
|
84
|
-
|
85
|
-
|
86
|
-
|
84
|
+
end # gmd:EX_Extent tag
|
85
|
+
end # writeXML
|
86
|
+
end # EX_Extent class
|
87
87
|
|
88
|
-
|
89
|
-
|
90
|
-
|
88
|
+
end
|
89
|
+
end
|
90
|
+
end
|
91
91
|
end
|
@@ -2,8 +2,10 @@
|
|
2
2
|
# 19115-2 writer output in XML
|
3
3
|
|
4
4
|
# History:
|
5
|
-
#
|
5
|
+
# Stan Smith 2018-04-09 add error and warning messaging
|
6
|
+
# Stan Smith 2016-12-06 original script
|
6
7
|
|
8
|
+
require_relative '../iso19115_2_writer'
|
7
9
|
require_relative 'class_point'
|
8
10
|
require_relative 'class_lineString'
|
9
11
|
require_relative 'class_polygon'
|
@@ -13,55 +15,58 @@ require_relative 'class_multiPolygon'
|
|
13
15
|
require_relative 'class_geometryCollection'
|
14
16
|
|
15
17
|
module ADIWG
|
16
|
-
|
17
|
-
|
18
|
-
|
18
|
+
module Mdtranslator
|
19
|
+
module Writers
|
20
|
+
module Iso19115_2
|
19
21
|
|
20
|
-
|
22
|
+
class Feature
|
21
23
|
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
24
|
+
def initialize(xml, hResponseObj)
|
25
|
+
@xml = xml
|
26
|
+
@hResponseObj = hResponseObj
|
27
|
+
@NameSpace = ADIWG::Mdtranslator::Writers::Iso19115_2
|
28
|
+
end
|
26
29
|
|
27
|
-
|
30
|
+
def writeXML(hGeoObject)
|
28
31
|
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
32
|
+
# classes used
|
33
|
+
pointClass = Point.new(@xml, @hResponseObj)
|
34
|
+
lineClass = LineString.new(@xml, @hResponseObj)
|
35
|
+
polyClass = Polygon.new(@xml, @hResponseObj)
|
36
|
+
multiPointClass = MultiPoint.new(@xml, @hResponseObj)
|
37
|
+
multiLineClass = MultiLineString.new(@xml, @hResponseObj)
|
38
|
+
multiPolyClass = MultiPolygon.new(@xml, @hResponseObj)
|
39
|
+
geoCollectionClass = GeometryCollection.new(@xml, @hResponseObj)
|
37
40
|
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
41
|
+
# feature - geometry object (required)
|
42
|
+
unless hGeoObject.empty?
|
43
|
+
id = hGeoObject[:id]
|
44
|
+
hProps = hGeoObject[:properties]
|
45
|
+
hGeometry = hGeoObject[:geometryObject]
|
46
|
+
case hGeometry[:type]
|
47
|
+
when 'Point'
|
48
|
+
pointClass.writeXML(hGeometry, hProps, id)
|
49
|
+
when 'LineString'
|
50
|
+
lineClass.writeXML(hGeometry, hProps, id)
|
51
|
+
when 'Polygon'
|
52
|
+
polyClass.writeXML(hGeometry, hProps, id)
|
53
|
+
when 'MultiPoint'
|
54
|
+
multiPointClass.writeXML(hGeometry, hProps, id)
|
55
|
+
when 'MultiLineString'
|
56
|
+
multiLineClass.writeXML(hGeometry, hProps, id)
|
57
|
+
when 'MultiPolygon'
|
58
|
+
multiPolyClass.writeXML(hGeometry, hProps, id)
|
59
|
+
when 'GeometryCollection'
|
60
|
+
geoCollectionClass.writeXML(hGeometry, hProps, id)
|
61
|
+
else
|
62
|
+
@NameSpace.issueNotice(140, "#{hGeometry[:type]}")
|
63
|
+
end
|
64
|
+
end
|
60
65
|
|
61
|
-
|
62
|
-
|
66
|
+
end # writeXML
|
67
|
+
end # Feature class
|
63
68
|
|
64
|
-
|
65
|
-
|
66
|
-
|
69
|
+
end
|
70
|
+
end
|
71
|
+
end
|
67
72
|
end
|
@@ -7,50 +7,50 @@
|
|
7
7
|
require_relative 'class_feature'
|
8
8
|
|
9
9
|
module ADIWG
|
10
|
-
|
11
|
-
|
12
|
-
|
10
|
+
module Mdtranslator
|
11
|
+
module Writers
|
12
|
+
module Iso19115_2
|
13
13
|
|
14
|
-
|
14
|
+
class FeatureCollection
|
15
15
|
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
16
|
+
def initialize(xml, hResponseObj)
|
17
|
+
@xml = xml
|
18
|
+
@hResponseObj = hResponseObj
|
19
|
+
end
|
20
20
|
|
21
|
-
|
21
|
+
def writeXML(hGeoObject)
|
22
22
|
|
23
|
-
|
24
|
-
|
23
|
+
# classes used
|
24
|
+
featureClass = Feature.new(@xml, @hResponseObj)
|
25
25
|
|
26
|
-
|
27
|
-
|
26
|
+
# feature collection attributes
|
27
|
+
attributes = {}
|
28
28
|
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
29
|
+
# feature collection attributes - gml:id (required)
|
30
|
+
@hResponseObj[:writerMissingIdCount] = @hResponseObj[:writerMissingIdCount].succ
|
31
|
+
objId = 'featureCollection' + @hResponseObj[:writerMissingIdCount]
|
32
|
+
attributes['gml:id'] = objId
|
33
33
|
|
34
|
-
|
35
|
-
|
34
|
+
# feature collection attributes - srsName (GeoJSON is WGS84)
|
35
|
+
attributes[:srsName] = 'WGS84'
|
36
36
|
|
37
|
-
|
37
|
+
@xml.tag!('gml:MultiGeometry', attributes) do
|
38
38
|
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
39
|
+
# geometry collection - geometry objects (required)
|
40
|
+
@xml.tag!('gml:geometryMembers') do
|
41
|
+
unless hGeoObject[:features].empty?
|
42
|
+
aFeatures = hGeoObject[:features]
|
43
|
+
aFeatures.each do |hFeature|
|
44
|
+
featureClass.writeXML(hFeature)
|
45
|
+
end
|
46
|
+
end
|
47
|
+
end
|
48
48
|
|
49
|
-
|
50
|
-
|
51
|
-
|
49
|
+
end # gml:MultiGeometry tag
|
50
|
+
end # writeXML
|
51
|
+
end # FeatureCollection class
|
52
52
|
|
53
|
-
|
54
|
-
|
55
|
-
|
53
|
+
end
|
54
|
+
end
|
55
|
+
end
|
56
56
|
end
|
@@ -7,59 +7,59 @@
|
|
7
7
|
require_relative 'class_gmlIdentifier'
|
8
8
|
|
9
9
|
module ADIWG
|
10
|
-
|
11
|
-
|
12
|
-
|
10
|
+
module Mdtranslator
|
11
|
+
module Writers
|
12
|
+
module Iso19115_2
|
13
13
|
|
14
|
-
|
14
|
+
class FeatureProperties
|
15
15
|
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
16
|
+
def initialize(xml, hResponseObj)
|
17
|
+
@xml = xml
|
18
|
+
@hResponseObj = hResponseObj
|
19
|
+
end
|
20
20
|
|
21
|
-
|
21
|
+
def writeXML(hProperties)
|
22
22
|
|
23
|
-
|
24
|
-
|
23
|
+
# classes used
|
24
|
+
gmlId = GMLIdentifier.new(@xml, @hResponseObj)
|
25
25
|
|
26
|
-
|
26
|
+
unless hProperties.empty?
|
27
27
|
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
28
|
+
# feature properties - description
|
29
|
+
s = hProperties[:description]
|
30
|
+
unless s.nil?
|
31
|
+
@xml.tag!('gml:description', s)
|
32
|
+
end
|
33
|
+
if s.nil? && @hResponseObj[:writerShowTags]
|
34
|
+
@xml.tag!('gml:description')
|
35
|
+
end
|
36
36
|
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
37
|
+
# feature properties - identifier [0]
|
38
|
+
unless hProperties[:identifiers].empty?
|
39
|
+
hId = hProperties[:identifiers][0]
|
40
|
+
gmlId.writeXML(hId)
|
41
|
+
end
|
42
|
+
if hProperties[:identifiers].empty? && @hResponseObj[:writerShowTags]
|
43
|
+
@xml.tag!('gml:identifier', {'codeSpace' => ''})
|
44
|
+
end
|
45
45
|
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
46
|
+
# feature properties - name []
|
47
|
+
hProperties[:featureNames].each do |name|
|
48
|
+
@xml.tag!('gml:name', name)
|
49
|
+
end
|
50
|
+
if hProperties[:featureNames].empty? && @hResponseObj[:writerShowTags]
|
51
|
+
@xml.tag!('gml:name')
|
52
|
+
end
|
53
53
|
|
54
|
-
|
55
|
-
|
54
|
+
# feature properties - featureScope - not supported
|
55
|
+
# feature properties - acquisitionMethod - not supported
|
56
56
|
|
57
|
-
|
57
|
+
end
|
58
58
|
|
59
|
-
|
60
|
-
|
59
|
+
end # writeXML
|
60
|
+
end # FeatureProperties class
|
61
61
|
|
62
|
-
|
63
|
-
|
64
|
-
|
62
|
+
end
|
63
|
+
end
|
64
|
+
end
|
65
65
|
end
|