adiwg-mdtranslator 2.3.5 → 2.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/adiwg/mdtranslator/internal/internal_metadata_obj.rb +49 -8
- data/lib/adiwg/mdtranslator/readers/fgdc/modules/mapProjections/projection_albers.rb +57 -0
- data/lib/adiwg/mdtranslator/readers/fgdc/modules/mapProjections/projection_azimuthEquidistant.rb +53 -0
- data/lib/adiwg/mdtranslator/readers/fgdc/modules/mapProjections/projection_common.rb +252 -0
- data/lib/adiwg/mdtranslator/readers/fgdc/modules/mapProjections/projection_equidistantConic.rb +56 -0
- data/lib/adiwg/mdtranslator/readers/fgdc/modules/mapProjections/projection_equirectangular.rb +53 -0
- data/lib/adiwg/mdtranslator/readers/fgdc/modules/mapProjections/projection_generalVertical.rb +57 -0
- data/lib/adiwg/mdtranslator/readers/fgdc/modules/mapProjections/projection_gnomonic.rb +53 -0
- data/lib/adiwg/mdtranslator/readers/fgdc/modules/mapProjections/projection_lambertConic.rb +57 -0
- data/lib/adiwg/mdtranslator/readers/fgdc/modules/mapProjections/projection_lambertEqualArea.rb +53 -0
- data/lib/adiwg/mdtranslator/readers/fgdc/modules/mapProjections/projection_mercator.rb +58 -0
- data/lib/adiwg/mdtranslator/readers/fgdc/modules/mapProjections/projection_millerCylinder.rb +50 -0
- data/lib/adiwg/mdtranslator/readers/fgdc/modules/mapProjections/projection_modifiedAlaska.rb +47 -0
- data/lib/adiwg/mdtranslator/readers/fgdc/modules/mapProjections/projection_obliqueMercator.rb +61 -0
- data/lib/adiwg/mdtranslator/readers/fgdc/modules/mapProjections/projection_orthographic.rb +53 -0
- data/lib/adiwg/mdtranslator/readers/fgdc/modules/mapProjections/projection_parameters.rb +91 -0
- data/lib/adiwg/mdtranslator/readers/fgdc/modules/mapProjections/projection_polarStereo.rb +60 -0
- data/lib/adiwg/mdtranslator/readers/fgdc/modules/mapProjections/projection_polyconic.rb +53 -0
- data/lib/adiwg/mdtranslator/readers/fgdc/modules/mapProjections/projection_robinson.rb +50 -0
- data/lib/adiwg/mdtranslator/readers/fgdc/modules/mapProjections/projection_sinusoidal.rb +50 -0
- data/lib/adiwg/mdtranslator/readers/fgdc/modules/mapProjections/projection_spaceOblique.rb +53 -0
- data/lib/adiwg/mdtranslator/readers/fgdc/modules/mapProjections/projection_stereographic.rb +53 -0
- data/lib/adiwg/mdtranslator/readers/fgdc/modules/mapProjections/projection_transverseMercator.rb +54 -0
- data/lib/adiwg/mdtranslator/readers/fgdc/modules/mapProjections/projection_vanDerGrinten.rb +48 -0
- data/lib/adiwg/mdtranslator/readers/fgdc/modules/module_fgdc.rb +4 -4
- data/lib/adiwg/mdtranslator/readers/fgdc/modules/module_horizontalPlanar.rb +81 -0
- data/lib/adiwg/mdtranslator/readers/fgdc/modules/module_horizontalReference.rb +167 -0
- data/lib/adiwg/mdtranslator/readers/fgdc/modules/module_mapCoordinateInfo.rb +128 -0
- data/lib/adiwg/mdtranslator/readers/fgdc/modules/module_mapGridSystem.rb +159 -0
- data/lib/adiwg/mdtranslator/readers/fgdc/modules/module_mapLocalSystem.rb +59 -0
- data/lib/adiwg/mdtranslator/readers/fgdc/modules/module_mapProjection.rb +195 -0
- data/lib/adiwg/mdtranslator/readers/fgdc/modules/module_spatialReference.rb +15 -1
- data/lib/adiwg/mdtranslator/readers/fgdc/modules/module_verticalAltitude.rb +68 -0
- data/lib/adiwg/mdtranslator/readers/fgdc/modules/module_verticalDepth.rb +68 -0
- data/lib/adiwg/mdtranslator/readers/fgdc/modules/module_verticalReference.rb +48 -0
- data/lib/adiwg/mdtranslator/readers/mdJson/mdJson_reader.rb +5 -3
- data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_bearingDistanceResolution.rb +96 -0
- data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_citation.rb +126 -126
- data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_coordinateResolution.rb +66 -0
- data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_ellipsoid.rb +78 -0
- data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_geographicResolution.rb +66 -0
- data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_obliqueLinePoint.rb +55 -0
- data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_projectionParameters.rb +237 -0
- data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_referenceSystemParameters.rb +69 -0
- data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_spatialReference.rb +57 -42
- data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_spatialResolution.rb +101 -51
- data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_verticalDatum.rb +89 -0
- data/lib/adiwg/mdtranslator/version.rb +7 -1
- data/lib/adiwg/mdtranslator/writers/html/sections/html_bearingDistanceResolution.rb +68 -0
- data/lib/adiwg/mdtranslator/writers/html/sections/html_coordinateResolution.rb +47 -0
- data/lib/adiwg/mdtranslator/writers/html/sections/html_geographicResolution.rb +47 -0
- data/lib/adiwg/mdtranslator/writers/html/sections/html_resourceInfo.rb +48 -7
- data/lib/adiwg/mdtranslator/writers/html/sections/html_source.rb +2 -2
- data/lib/adiwg/mdtranslator/writers/html/sections/html_spatialResolution.rb +95 -0
- data/lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_bearingDistanceResolution.rb +32 -0
- data/lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_coordinateResolution.rb +29 -0
- data/lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_ellipsoidParameters.rb +32 -0
- data/lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_geographicResolution.rb +29 -0
- data/lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_obliqueLinePoint.rb +28 -0
- data/lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_projectionParameters.rb +57 -0
- data/lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_spatialReference.rb +2 -0
- data/lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_spatialReferenceParameters.rb +32 -0
- data/lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_spatialResolution.rb +16 -1
- data/lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_verticalDatumParameters.rb +32 -0
- data/lib/adiwg/mdtranslator/writers/sbJson/sections/sbJson_parentId.rb +5 -8
- metadata +55 -4
- data/lib/adiwg/mdtranslator/writers/html/sections/html_resolution.rb +0 -54
@@ -0,0 +1,66 @@
|
|
1
|
+
# unpack series
|
2
|
+
# Reader - ADIwg JSON to internal data structure
|
3
|
+
|
4
|
+
# History:
|
5
|
+
# Stan Smith 2017-10-19 original script
|
6
|
+
|
7
|
+
module ADIWG
|
8
|
+
module Mdtranslator
|
9
|
+
module Readers
|
10
|
+
module MdJson
|
11
|
+
|
12
|
+
module CoordinateResolution
|
13
|
+
|
14
|
+
def self.unpack(hCoordRes, responseObj)
|
15
|
+
|
16
|
+
# return nil object if input is empty
|
17
|
+
if hCoordRes.empty?
|
18
|
+
responseObj[:readerExecutionMessages] << 'Coordinate Resolution object is empty'
|
19
|
+
responseObj[:readerExecutionPass] = false
|
20
|
+
return nil
|
21
|
+
end
|
22
|
+
|
23
|
+
# instance classes needed in script
|
24
|
+
intMetadataClass = InternalMetadata.new
|
25
|
+
intCoordRes = intMetadataClass.newCoordinateResolution
|
26
|
+
|
27
|
+
# coordinate resolution - abscissa (X) (required)
|
28
|
+
if hCoordRes.has_key?('abscissaResolutionX')
|
29
|
+
intCoordRes[:abscissaResolutionX] = hCoordRes['abscissaResolutionX']
|
30
|
+
end
|
31
|
+
if intCoordRes[:abscissaResolutionX].nil? || intCoordRes[:abscissaResolutionX] == ''
|
32
|
+
responseObj[:readerExecutionMessages] << 'Coordinate Resolution is missing abscissa resolution'
|
33
|
+
responseObj[:readerExecutionPass] = false
|
34
|
+
return nil
|
35
|
+
end
|
36
|
+
|
37
|
+
# coordinate resolution - ordinate (Y) (required)
|
38
|
+
if hCoordRes.has_key?('ordinateResolutionY')
|
39
|
+
intCoordRes[:ordinateResolutionY] = hCoordRes['ordinateResolutionY']
|
40
|
+
end
|
41
|
+
if intCoordRes[:ordinateResolutionY].nil? || intCoordRes[:ordinateResolutionY] == ''
|
42
|
+
responseObj[:readerExecutionMessages] << 'Coordinate Resolution is missing ordinate resolution'
|
43
|
+
responseObj[:readerExecutionPass] = false
|
44
|
+
return nil
|
45
|
+
end
|
46
|
+
|
47
|
+
# coordinate resolution - units of measure (required)
|
48
|
+
if hCoordRes.has_key?('unitOfMeasure')
|
49
|
+
intCoordRes[:unitOfMeasure] = hCoordRes['unitOfMeasure']
|
50
|
+
end
|
51
|
+
if intCoordRes[:unitOfMeasure].nil? || intCoordRes[:unitOfMeasure] == ''
|
52
|
+
responseObj[:readerExecutionMessages] << 'Coordinate Resolution is missing units of measure'
|
53
|
+
responseObj[:readerExecutionPass] = false
|
54
|
+
return nil
|
55
|
+
end
|
56
|
+
|
57
|
+
return intCoordRes
|
58
|
+
|
59
|
+
end
|
60
|
+
|
61
|
+
end
|
62
|
+
|
63
|
+
end
|
64
|
+
end
|
65
|
+
end
|
66
|
+
end
|
@@ -0,0 +1,78 @@
|
|
1
|
+
# unpack spatial reference system ellipsoid
|
2
|
+
# Reader - ADIwg JSON to internal data structure
|
3
|
+
|
4
|
+
# History:
|
5
|
+
# Stan Smith 2017-10-23 original script
|
6
|
+
|
7
|
+
require_relative 'module_identifier'
|
8
|
+
|
9
|
+
module ADIWG
|
10
|
+
module Mdtranslator
|
11
|
+
module Readers
|
12
|
+
module MdJson
|
13
|
+
|
14
|
+
module Ellipsoid
|
15
|
+
|
16
|
+
def self.unpack(hEllipsoid, responseObj)
|
17
|
+
|
18
|
+
# return nil object if input is empty
|
19
|
+
if hEllipsoid.empty?
|
20
|
+
responseObj[:readerExecutionMessages] << 'Ellipsoid object is empty'
|
21
|
+
responseObj[:readerExecutionPass] = false
|
22
|
+
return nil
|
23
|
+
end
|
24
|
+
|
25
|
+
# instance classes needed in script
|
26
|
+
intMetadataClass = InternalMetadata.new
|
27
|
+
intEllipsoid = intMetadataClass.newEllipsoid
|
28
|
+
|
29
|
+
# ellipsoid - identifier {identifier}
|
30
|
+
if hEllipsoid.has_key?('ellipsoidIdentifier')
|
31
|
+
unless hEllipsoid['ellipsoidIdentifier'].empty?
|
32
|
+
hReturn = Identifier.unpack(hEllipsoid['ellipsoidIdentifier'], responseObj)
|
33
|
+
unless hReturn.nil?
|
34
|
+
intEllipsoid[:ellipsoidIdentifier] = hReturn
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
38
|
+
|
39
|
+
# ellipsoid - ellipsoid name (required)
|
40
|
+
if hEllipsoid.has_key?('ellipsoidName')
|
41
|
+
intEllipsoid[:ellipsoidName] = hEllipsoid['ellipsoidName']
|
42
|
+
end
|
43
|
+
if intEllipsoid[:ellipsoidName].nil? || intEllipsoid[:ellipsoidName] == ''
|
44
|
+
responseObj[:readerExecutionMessages] << 'Ellipsoid name is missing'
|
45
|
+
responseObj[:readerExecutionPass] = false
|
46
|
+
return nil
|
47
|
+
end
|
48
|
+
|
49
|
+
# ellipsoid - semi-major axis
|
50
|
+
if hEllipsoid.has_key?('semiMajorAxis')
|
51
|
+
if hEllipsoid['semiMajorAxis'] != ''
|
52
|
+
intEllipsoid[:semiMajorAxis] = hEllipsoid['semiMajorAxis']
|
53
|
+
end
|
54
|
+
end
|
55
|
+
|
56
|
+
# ellipsoid - axis units
|
57
|
+
if hEllipsoid.has_key?('axisUnits')
|
58
|
+
if hEllipsoid['axisUnits'] != ''
|
59
|
+
intEllipsoid[:axisUnits] = hEllipsoid['axisUnits']
|
60
|
+
end
|
61
|
+
end
|
62
|
+
|
63
|
+
# ellipsoid - denominator of flattening ratio
|
64
|
+
if hEllipsoid.has_key?('denominatorOfFlatteningRatio')
|
65
|
+
if hEllipsoid['denominatorOfFlatteningRatio'] != ''
|
66
|
+
intEllipsoid[:denominatorOfFlatteningRatio] = hEllipsoid['denominatorOfFlatteningRatio']
|
67
|
+
end
|
68
|
+
end
|
69
|
+
|
70
|
+
return intEllipsoid
|
71
|
+
end
|
72
|
+
|
73
|
+
end
|
74
|
+
|
75
|
+
end
|
76
|
+
end
|
77
|
+
end
|
78
|
+
end
|
@@ -0,0 +1,66 @@
|
|
1
|
+
# unpack series
|
2
|
+
# Reader - ADIwg JSON to internal data structure
|
3
|
+
|
4
|
+
# History:
|
5
|
+
# Stan Smith 2017-10-19 original script
|
6
|
+
|
7
|
+
module ADIWG
|
8
|
+
module Mdtranslator
|
9
|
+
module Readers
|
10
|
+
module MdJson
|
11
|
+
|
12
|
+
module GeographicResolution
|
13
|
+
|
14
|
+
def self.unpack(hGeoRes, responseObj)
|
15
|
+
|
16
|
+
# return nil object if input is empty
|
17
|
+
if hGeoRes.empty?
|
18
|
+
responseObj[:readerExecutionMessages] << 'Geographic Resolution object is empty'
|
19
|
+
responseObj[:readerExecutionPass] = false
|
20
|
+
return nil
|
21
|
+
end
|
22
|
+
|
23
|
+
# instance classes needed in script
|
24
|
+
intMetadataClass = InternalMetadata.new
|
25
|
+
intGeoRes = intMetadataClass.newGeographicResolution
|
26
|
+
|
27
|
+
# geographic resolution - latitude resolution (required)
|
28
|
+
if hGeoRes.has_key?('latitudeResolution')
|
29
|
+
intGeoRes[:latitudeResolution] = hGeoRes['latitudeResolution']
|
30
|
+
end
|
31
|
+
if intGeoRes[:latitudeResolution].nil? || intGeoRes[:latitudeResolution] == ''
|
32
|
+
responseObj[:readerExecutionMessages] << 'Geographic Resolution is missing latitude resolution'
|
33
|
+
responseObj[:readerExecutionPass] = false
|
34
|
+
return nil
|
35
|
+
end
|
36
|
+
|
37
|
+
# geographic resolution - longitude resolution (required)
|
38
|
+
if hGeoRes.has_key?('longitudeResolution')
|
39
|
+
intGeoRes[:longitudeResolution] = hGeoRes['longitudeResolution']
|
40
|
+
end
|
41
|
+
if intGeoRes[:longitudeResolution].nil? || intGeoRes[:longitudeResolution] == ''
|
42
|
+
responseObj[:readerExecutionMessages] << 'Geographic Resolution is missing longitude resolution'
|
43
|
+
responseObj[:readerExecutionPass] = false
|
44
|
+
return nil
|
45
|
+
end
|
46
|
+
|
47
|
+
# geographic resolution - unit of measure (required)
|
48
|
+
if hGeoRes.has_key?('unitOfMeasure')
|
49
|
+
intGeoRes[:unitOfMeasure] = hGeoRes['unitOfMeasure']
|
50
|
+
end
|
51
|
+
if intGeoRes[:unitOfMeasure].nil? || intGeoRes[:unitOfMeasure] == ''
|
52
|
+
responseObj[:readerExecutionMessages] << 'Geographic resolution is missing unit of measure'
|
53
|
+
responseObj[:readerExecutionPass] = false
|
54
|
+
return nil
|
55
|
+
end
|
56
|
+
|
57
|
+
return intGeoRes
|
58
|
+
|
59
|
+
end
|
60
|
+
|
61
|
+
end
|
62
|
+
|
63
|
+
end
|
64
|
+
end
|
65
|
+
end
|
66
|
+
end
|
@@ -0,0 +1,55 @@
|
|
1
|
+
# unpack spatial reference system parameter oblique line point
|
2
|
+
# Reader - ADIwg JSON to internal data structure
|
3
|
+
|
4
|
+
# History:
|
5
|
+
# Stan Smith 2017-10-23 original script
|
6
|
+
|
7
|
+
module ADIWG
|
8
|
+
module Mdtranslator
|
9
|
+
module Readers
|
10
|
+
module MdJson
|
11
|
+
|
12
|
+
module ObliqueLinePoint
|
13
|
+
|
14
|
+
def self.unpack(hLinePt, responseObj)
|
15
|
+
|
16
|
+
# return nil object if input is empty
|
17
|
+
if hLinePt.empty?
|
18
|
+
responseObj[:readerExecutionMessages] << 'Oblique Line Point object is empty'
|
19
|
+
responseObj[:readerExecutionPass] = false
|
20
|
+
return nil
|
21
|
+
end
|
22
|
+
|
23
|
+
# instance classes needed in script
|
24
|
+
intMetadataClass = InternalMetadata.new
|
25
|
+
intLinePoint = intMetadataClass.newObliqueLinePoint
|
26
|
+
|
27
|
+
# oblique line point - azimuth line latitude (required)
|
28
|
+
if hLinePt.has_key?('azimuthLineLatitude')
|
29
|
+
intLinePoint[:azimuthLineLatitude] = hLinePt['azimuthLineLatitude']
|
30
|
+
end
|
31
|
+
if intLinePoint[:azimuthLineLatitude].nil? || intLinePoint[:azimuthLineLatitude] == ''
|
32
|
+
responseObj[:readerExecutionMessages] << 'Azimuth line point latitude is missing'
|
33
|
+
responseObj[:readerExecutionPass] = false
|
34
|
+
return nil
|
35
|
+
end
|
36
|
+
|
37
|
+
# oblique line point - azimuth line longitude (required)
|
38
|
+
if hLinePt.has_key?('azimuthLineLongitude')
|
39
|
+
intLinePoint[:azimuthLineLongitude] = hLinePt['azimuthLineLongitude']
|
40
|
+
end
|
41
|
+
if intLinePoint[:azimuthLineLongitude].nil? || intLinePoint[:azimuthLineLongitude] == ''
|
42
|
+
responseObj[:readerExecutionMessages] << 'Azimuth line point latitude is missing'
|
43
|
+
responseObj[:readerExecutionPass] = false
|
44
|
+
return nil
|
45
|
+
end
|
46
|
+
|
47
|
+
return intLinePoint
|
48
|
+
end
|
49
|
+
|
50
|
+
end
|
51
|
+
|
52
|
+
end
|
53
|
+
end
|
54
|
+
end
|
55
|
+
end
|
@@ -0,0 +1,237 @@
|
|
1
|
+
# unpack spatial projection projection parameters
|
2
|
+
# Reader - ADIwg JSON to internal data structure
|
3
|
+
|
4
|
+
# History:
|
5
|
+
# Stan Smith 2017-10-23 original script
|
6
|
+
|
7
|
+
require_relative 'module_identifier'
|
8
|
+
require_relative 'module_obliqueLinePoint'
|
9
|
+
|
10
|
+
module ADIWG
|
11
|
+
module Mdtranslator
|
12
|
+
module Readers
|
13
|
+
module MdJson
|
14
|
+
|
15
|
+
module ProjectionParameters
|
16
|
+
|
17
|
+
def self.unpack(hProjection, responseObj)
|
18
|
+
|
19
|
+
# return nil object if input is empty
|
20
|
+
if hProjection.empty?
|
21
|
+
responseObj[:readerExecutionMessages] << 'Reference System Projection Parameters object is empty'
|
22
|
+
responseObj[:readerExecutionPass] = false
|
23
|
+
return nil
|
24
|
+
end
|
25
|
+
|
26
|
+
# instance classes needed in script
|
27
|
+
intMetadataClass = InternalMetadata.new
|
28
|
+
intProjection = intMetadataClass.newProjection
|
29
|
+
|
30
|
+
# projection parameters - projection identifier {identifier}
|
31
|
+
if hProjection.has_key?('projectionIdentifier')
|
32
|
+
unless hProjection['projectionIdentifier'].empty?
|
33
|
+
hReturn = Identifier.unpack(hProjection['projectionIdentifier'], responseObj)
|
34
|
+
unless hReturn.nil?
|
35
|
+
intProjection[:projectionIdentifier] = hReturn
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
39
|
+
|
40
|
+
# projection parameters - projection name (required)
|
41
|
+
if hProjection.has_key?('projectionName')
|
42
|
+
intProjection[:projectionName] = hProjection['projectionName']
|
43
|
+
end
|
44
|
+
if intProjection[:projectionName].nil? || intProjection[:projectionName] == ''
|
45
|
+
responseObj[:readerExecutionMessages] << 'Projection name is missing'
|
46
|
+
responseObj[:readerExecutionPass] = false
|
47
|
+
return nil
|
48
|
+
end
|
49
|
+
|
50
|
+
# projection parameters - zone
|
51
|
+
if hProjection.has_key?('zone')
|
52
|
+
if hProjection['zone'] != ''
|
53
|
+
intProjection[:zone] = hProjection['zone']
|
54
|
+
end
|
55
|
+
end
|
56
|
+
|
57
|
+
# projection parameters - standard parallel 1
|
58
|
+
if hProjection.has_key?('standardParallel1')
|
59
|
+
if hProjection['standardParallel1'] != ''
|
60
|
+
intProjection[:standardParallel1] = hProjection['standardParallel1']
|
61
|
+
end
|
62
|
+
end
|
63
|
+
|
64
|
+
# projection parameters - standard parallel 2
|
65
|
+
if hProjection.has_key?('standardParallel2')
|
66
|
+
if hProjection['standardParallel2'] != ''
|
67
|
+
intProjection[:standardParallel2] = hProjection['standardParallel2']
|
68
|
+
end
|
69
|
+
end
|
70
|
+
|
71
|
+
# projection parameters - longitude of central meridian
|
72
|
+
if hProjection.has_key?('longitudeOfCentralMeridian')
|
73
|
+
if hProjection['longitudeOfCentralMeridian'] != ''
|
74
|
+
intProjection[:longitudeOfCentralMeridian] = hProjection['longitudeOfCentralMeridian']
|
75
|
+
end
|
76
|
+
end
|
77
|
+
|
78
|
+
# projection parameters - latitude of projection origin
|
79
|
+
if hProjection.has_key?('latitudeOfProjectionOrigin')
|
80
|
+
if hProjection['latitudeOfProjectionOrigin'] != ''
|
81
|
+
intProjection[:latitudeOfProjectionOrigin] = hProjection['latitudeOfProjectionOrigin']
|
82
|
+
end
|
83
|
+
end
|
84
|
+
|
85
|
+
# projection parameters - false easting
|
86
|
+
if hProjection.has_key?('falseEasting')
|
87
|
+
if hProjection['falseEasting'] != ''
|
88
|
+
intProjection[:falseEasting] = hProjection['falseEasting']
|
89
|
+
end
|
90
|
+
end
|
91
|
+
|
92
|
+
# projection parameters - false northing
|
93
|
+
if hProjection.has_key?('falseNorthing')
|
94
|
+
if hProjection['falseNorthing'] != ''
|
95
|
+
intProjection[:falseNorthing] = hProjection['falseNorthing']
|
96
|
+
end
|
97
|
+
end
|
98
|
+
|
99
|
+
# projection parameters - false easting northing units
|
100
|
+
if hProjection.has_key?('falseEastingNorthingUnits')
|
101
|
+
if hProjection['falseEastingNorthingUnits'] != ''
|
102
|
+
intProjection[:falseEastingNorthingUnits] = hProjection['falseEastingNorthingUnits']
|
103
|
+
end
|
104
|
+
end
|
105
|
+
|
106
|
+
# projection parameters - scale factor at equator
|
107
|
+
if hProjection.has_key?('scaleFactorAtEquator')
|
108
|
+
if hProjection['scaleFactorAtEquator'] != ''
|
109
|
+
intProjection[:scaleFactorAtEquator] = hProjection['scaleFactorAtEquator']
|
110
|
+
end
|
111
|
+
end
|
112
|
+
|
113
|
+
# projection parameters - height of prospective point above surface
|
114
|
+
if hProjection.has_key?('heightOfProspectivePointAboveSurface')
|
115
|
+
if hProjection['heightOfProspectivePointAboveSurface'] != ''
|
116
|
+
intProjection[:heightOfProspectivePointAboveSurface] = hProjection['heightOfProspectivePointAboveSurface'].to_f
|
117
|
+
end
|
118
|
+
end
|
119
|
+
|
120
|
+
# projection parameters - longitude of projection center
|
121
|
+
if hProjection.has_key?('longitudeOfProjectionCenter')
|
122
|
+
if hProjection['longitudeOfProjectionCenter'] != ''
|
123
|
+
intProjection[:longitudeOfProjectionCenter] = hProjection['longitudeOfProjectionCenter']
|
124
|
+
end
|
125
|
+
end
|
126
|
+
|
127
|
+
# projection parameters - latitude of projection center
|
128
|
+
if hProjection.has_key?('latitudeOfProjectionCenter')
|
129
|
+
if hProjection['latitudeOfProjectionCenter'] != ''
|
130
|
+
intProjection[:latitudeOfProjectionCenter] = hProjection['latitudeOfProjectionCenter']
|
131
|
+
end
|
132
|
+
end
|
133
|
+
|
134
|
+
# projection parameters - scale factor at center line
|
135
|
+
if hProjection.has_key?('scaleFactorAtCenterLine')
|
136
|
+
if hProjection['scaleFactorAtCenterLine'] != ''
|
137
|
+
intProjection[:scaleFactorAtCenterLine] = hProjection['scaleFactorAtCenterLine']
|
138
|
+
end
|
139
|
+
end
|
140
|
+
|
141
|
+
# projection parameters - scale factor at meridian
|
142
|
+
if hProjection.has_key?('scaleFactorAtCentralMeridian')
|
143
|
+
if hProjection['scaleFactorAtCentralMeridian'] != ''
|
144
|
+
intProjection[:scaleFactorAtCentralMeridian] = hProjection['scaleFactorAtCentralMeridian']
|
145
|
+
end
|
146
|
+
end
|
147
|
+
|
148
|
+
# projection parameters - straight vertical longitude from pole
|
149
|
+
if hProjection.has_key?('straightVerticalLongitudeFromPole')
|
150
|
+
if hProjection['straightVerticalLongitudeFromPole'] != ''
|
151
|
+
intProjection[:straightVerticalLongitudeFromPole] = hProjection['straightVerticalLongitudeFromPole']
|
152
|
+
end
|
153
|
+
end
|
154
|
+
|
155
|
+
# projection parameters - scale factor at projection origin
|
156
|
+
if hProjection.has_key?('scaleFactorAtProjectionOrigin')
|
157
|
+
if hProjection['scaleFactorAtProjectionOrigin'] != ''
|
158
|
+
intProjection[:scaleFactorAtProjectionOrigin] = hProjection['scaleFactorAtProjectionOrigin']
|
159
|
+
end
|
160
|
+
end
|
161
|
+
|
162
|
+
# projection parameters - azimuth angle
|
163
|
+
if hProjection.has_key?('azimuthAngle')
|
164
|
+
if hProjection['azimuthAngle'] != ''
|
165
|
+
intProjection[:azimuthAngle] = hProjection['azimuthAngle']
|
166
|
+
end
|
167
|
+
end
|
168
|
+
|
169
|
+
# projection parameters - azimuth measure point longitude
|
170
|
+
if hProjection.has_key?('azimuthMeasurePointLongitude')
|
171
|
+
if hProjection['azimuthMeasurePointLongitude'] != ''
|
172
|
+
intProjection[:azimuthMeasurePointLongitude] = hProjection['azimuthMeasurePointLongitude']
|
173
|
+
end
|
174
|
+
end
|
175
|
+
|
176
|
+
# projection parameters - oblique line points [] {obliqueLinePoint}
|
177
|
+
if hProjection.has_key?('obliqueLinePoint')
|
178
|
+
aItems = hProjection['obliqueLinePoint']
|
179
|
+
aItems.each do |item|
|
180
|
+
hReturn = ObliqueLinePoint.unpack(item, responseObj)
|
181
|
+
unless hReturn.nil?
|
182
|
+
intProjection[:obliqueLinePoints] << hReturn
|
183
|
+
end
|
184
|
+
end
|
185
|
+
end
|
186
|
+
|
187
|
+
# projection parameters - landsat number
|
188
|
+
if hProjection.has_key?('landsatNumber')
|
189
|
+
if hProjection['landsatNumber'] != ''
|
190
|
+
intProjection[:landsatNumber] = hProjection['landsatNumber']
|
191
|
+
end
|
192
|
+
end
|
193
|
+
|
194
|
+
# projection parameters - landsat path
|
195
|
+
if hProjection.has_key?('landsatPath')
|
196
|
+
if hProjection['landsatPath'] != ''
|
197
|
+
intProjection[:landsatPath] = hProjection['landsatPath']
|
198
|
+
end
|
199
|
+
end
|
200
|
+
|
201
|
+
# projection parameters - local planar description
|
202
|
+
if hProjection.has_key?('localPlanarDescription')
|
203
|
+
if hProjection['localPlanarDescription'] != ''
|
204
|
+
intProjection[:localPlanarDescription] = hProjection['localPlanarDescription']
|
205
|
+
end
|
206
|
+
end
|
207
|
+
|
208
|
+
# projection parameters - local planar georeference
|
209
|
+
if hProjection.has_key?('localPlanarGeoreference')
|
210
|
+
if hProjection['localPlanarGeoreference'] != ''
|
211
|
+
intProjection[:localPlanarGeoreference] = hProjection['localPlanarGeoreference']
|
212
|
+
end
|
213
|
+
end
|
214
|
+
|
215
|
+
# projection parameters - other projection description
|
216
|
+
if hProjection.has_key?('otherProjectionDescription')
|
217
|
+
if hProjection['otherProjectionDescription'] != ''
|
218
|
+
intProjection[:otherProjectionDescription] = hProjection['otherProjectionDescription']
|
219
|
+
end
|
220
|
+
end
|
221
|
+
|
222
|
+
# projection parameters - other grid description
|
223
|
+
if hProjection.has_key?('otherGridDescription')
|
224
|
+
if hProjection['otherGridDescription'] != ''
|
225
|
+
intProjection[:otherGridDescription] = hProjection['otherGridDescription']
|
226
|
+
end
|
227
|
+
end
|
228
|
+
|
229
|
+
return intProjection
|
230
|
+
end
|
231
|
+
|
232
|
+
end
|
233
|
+
|
234
|
+
end
|
235
|
+
end
|
236
|
+
end
|
237
|
+
end
|