adiwg-mdtranslator 2.7.0 → 2.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +18 -1
- data/adiwg-mdtranslator.gemspec +1 -1
- data/lib/adiwg/mdtranslator/internal/internal_metadata_obj.rb +12 -6
- data/lib/adiwg/mdtranslator/readers/fgdc/modules/mapProjections/projection_albers.rb +2 -1
- data/lib/adiwg/mdtranslator/readers/fgdc/modules/mapProjections/projection_azimuthEquidistant.rb +2 -1
- data/lib/adiwg/mdtranslator/readers/fgdc/modules/mapProjections/projection_common.rb +2 -2
- data/lib/adiwg/mdtranslator/readers/fgdc/modules/mapProjections/projection_equidistantConic.rb +2 -1
- data/lib/adiwg/mdtranslator/readers/fgdc/modules/mapProjections/projection_equirectangular.rb +2 -1
- data/lib/adiwg/mdtranslator/readers/fgdc/modules/mapProjections/projection_generalVertical.rb +2 -1
- data/lib/adiwg/mdtranslator/readers/fgdc/modules/mapProjections/projection_gnomonic.rb +2 -1
- data/lib/adiwg/mdtranslator/readers/fgdc/modules/mapProjections/projection_lambertConic.rb +2 -1
- data/lib/adiwg/mdtranslator/readers/fgdc/modules/mapProjections/projection_lambertEqualArea.rb +2 -1
- data/lib/adiwg/mdtranslator/readers/fgdc/modules/mapProjections/projection_mercator.rb +2 -1
- data/lib/adiwg/mdtranslator/readers/fgdc/modules/mapProjections/projection_millerCylinder.rb +2 -1
- data/lib/adiwg/mdtranslator/readers/fgdc/modules/mapProjections/projection_modifiedAlaska.rb +2 -1
- data/lib/adiwg/mdtranslator/readers/fgdc/modules/mapProjections/projection_obliqueMercator.rb +2 -1
- data/lib/adiwg/mdtranslator/readers/fgdc/modules/mapProjections/projection_orthographic.rb +2 -1
- data/lib/adiwg/mdtranslator/readers/fgdc/modules/mapProjections/projection_parameters.rb +2 -1
- data/lib/adiwg/mdtranslator/readers/fgdc/modules/mapProjections/projection_polarStereo.rb +2 -1
- data/lib/adiwg/mdtranslator/readers/fgdc/modules/mapProjections/projection_polyconic.rb +2 -1
- data/lib/adiwg/mdtranslator/readers/fgdc/modules/mapProjections/projection_robinson.rb +2 -1
- data/lib/adiwg/mdtranslator/readers/fgdc/modules/mapProjections/projection_sinusoidal.rb +2 -1
- data/lib/adiwg/mdtranslator/readers/fgdc/modules/mapProjections/projection_spaceOblique.rb +2 -1
- data/lib/adiwg/mdtranslator/readers/fgdc/modules/mapProjections/projection_stereographic.rb +2 -1
- data/lib/adiwg/mdtranslator/readers/fgdc/modules/mapProjections/projection_transverseMercator.rb +2 -1
- data/lib/adiwg/mdtranslator/readers/fgdc/modules/mapProjections/projection_vanDerGrinten.rb +2 -1
- data/lib/adiwg/mdtranslator/readers/fgdc/modules/module_geodeticReference.rb +82 -0
- data/lib/adiwg/mdtranslator/readers/fgdc/modules/module_geographicResolution.rb +57 -0
- data/lib/adiwg/mdtranslator/readers/fgdc/modules/module_horizontalPlanar.rb +2 -2
- data/lib/adiwg/mdtranslator/readers/fgdc/modules/module_horizontalReference.rb +12 -113
- data/lib/adiwg/mdtranslator/readers/fgdc/modules/module_keyword.rb +9 -27
- data/lib/adiwg/mdtranslator/readers/fgdc/modules/module_localSystem.rb +53 -0
- data/lib/adiwg/mdtranslator/readers/fgdc/modules/module_mapCoordinateInfo.rb +1 -0
- data/lib/adiwg/mdtranslator/readers/fgdc/modules/module_mapGridSystem.rb +27 -15
- data/lib/adiwg/mdtranslator/readers/fgdc/modules/{module_mapLocalSystem.rb → module_mapLocalPlanar.rb} +3 -14
- data/lib/adiwg/mdtranslator/readers/fgdc/modules/module_spatialReference.rb +1 -1
- data/lib/adiwg/mdtranslator/readers/fgdc/modules/module_taxonSystem.rb +1 -1
- data/lib/adiwg/mdtranslator/readers/fgdc/modules/module_verticalAltitude.rb +4 -6
- data/lib/adiwg/mdtranslator/readers/fgdc/modules/{module_verticalReference.rb → module_verticalDatum.rb} +0 -0
- data/lib/adiwg/mdtranslator/readers/fgdc/modules/module_verticalDepth.rb +4 -7
- data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_geodetic.rb +95 -0
- data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_keyword.rb +1 -14
- data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_projectionParameters.rb +29 -8
- data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_referenceSystemParameters.rb +5 -5
- data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_resourceInfo.rb +15 -3
- data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_spatialReference.rb +16 -4
- data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_verticalDatum.rb +8 -23
- data/lib/adiwg/mdtranslator/readers/sbJson/modules/module_tag.rb +2 -2
- data/lib/adiwg/mdtranslator/version.rb +4 -1
- data/lib/adiwg/mdtranslator/writers/fgdc/classes/class_citation.rb +1 -0
- data/lib/adiwg/mdtranslator/writers/fgdc/classes/class_dateRange.rb +6 -1
- data/lib/adiwg/mdtranslator/writers/fgdc/classes/class_dateSingle.rb +5 -1
- data/lib/adiwg/mdtranslator/writers/fgdc/classes/class_fgdc.rb +18 -5
- data/lib/adiwg/mdtranslator/writers/fgdc/classes/class_geodeticReference.rb +62 -0
- data/lib/adiwg/mdtranslator/writers/fgdc/classes/class_geographicResolution.rb +56 -0
- data/lib/adiwg/mdtranslator/writers/fgdc/classes/class_keyword.rb +1 -0
- data/lib/adiwg/mdtranslator/writers/fgdc/classes/class_localSystem.rb +45 -0
- data/lib/adiwg/mdtranslator/writers/fgdc/classes/class_mapCoordinateInfo.rb +167 -0
- data/lib/adiwg/mdtranslator/writers/fgdc/classes/class_mapProjection.rb +374 -0
- data/lib/adiwg/mdtranslator/writers/fgdc/classes/class_planarReference.rb +372 -0
- data/lib/adiwg/mdtranslator/writers/fgdc/classes/class_process.rb +1 -0
- data/lib/adiwg/mdtranslator/writers/fgdc/classes/class_spatialReference.rb +134 -0
- data/lib/adiwg/mdtranslator/writers/fgdc/classes/class_taxonomySystem.rb +8 -11
- data/lib/adiwg/mdtranslator/writers/fgdc/classes/class_timePeriod.rb +8 -8
- data/lib/adiwg/mdtranslator/writers/fgdc/classes/class_verticalDatum.rb +120 -0
- data/lib/adiwg/mdtranslator/writers/html/sections/html_body.rb +12 -2
- data/lib/adiwg/mdtranslator/writers/html/sections/html_geodeticParameters.rb +85 -0
- data/lib/adiwg/mdtranslator/writers/html/sections/html_keyword.rb +5 -1
- data/lib/adiwg/mdtranslator/writers/html/sections/html_projectionParameters.rb +36 -15
- data/lib/adiwg/mdtranslator/writers/html/sections/html_referenceSystemParameters.rb +6 -6
- data/lib/adiwg/mdtranslator/writers/html/sections/html_resourceInfo.rb +1 -2
- data/lib/adiwg/mdtranslator/writers/html/sections/html_verticalDatumParameters.rb +7 -0
- data/lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_crs.rb +21 -8
- data/lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_dataIdentification.rb +332 -321
- data/lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_keyword.rb +8 -8
- data/lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_projectionParameters.rb +1 -1
- data/lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_geodeticParameters.rb +34 -0
- data/lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_projectionParameters.rb +5 -2
- data/lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_spatialReference.rb +1 -0
- data/lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_spatialReferenceParameters.rb +2 -2
- data/lib/adiwg/mdtranslator/writers/sbJson/sections/sbJson_tag.rb +1 -1
- metadata +20 -9
- data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_ellipsoid.rb +0 -78
- data/lib/adiwg/mdtranslator/writers/html/sections/html_ellipsoidParameters.rb +0 -68
- data/lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_ellipsoidParameters.rb +0 -32
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: b8967380488c638b7c04f98f0fd3d51d68bccf9a
|
|
4
|
+
data.tar.gz: 695fbc3cff2ddf09eda1fabcba0478c035d5a990
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 25f1962901b59cd7c317ab6d1c70d88362fa8a1018a98ff55fcc9311d243b8152132f2779f38c8ed7ac32de3f40a14c0eb612942f1adb7a65a4dca5042cfa26a
|
|
7
|
+
data.tar.gz: fc110571208fd0f094ddb53a31a42b204a6d655dfa1bf7a603a6f267022f62bea71b9269734b7c3eac190cbe348577ee25d2a0514b4552bb930340f50680626f
|
data/CHANGELOG.md
CHANGED
|
@@ -1,7 +1,24 @@
|
|
|
1
1
|
# Change Log
|
|
2
2
|
|
|
3
|
-
## [v2.
|
|
3
|
+
## [v2.8.0](https://github.com/adiwg/mdTranslator/tree/v2.8.0)
|
|
4
4
|
|
|
5
|
+
[Full Changelog](https://github.com/adiwg/mdTranslator/compare/v2.7.0...v2.8.0)
|
|
6
|
+
|
|
7
|
+
**Implemented enhancements:**
|
|
8
|
+
|
|
9
|
+
- Add resource citation title to HTML heading [\#172](https://github.com/adiwg/mdTranslator/issues/172)
|
|
10
|
+
|
|
11
|
+
**Fixed bugs:**
|
|
12
|
+
|
|
13
|
+
- FGDC writer outputs time in ISO format [\#176](https://github.com/adiwg/mdTranslator/issues/176)
|
|
14
|
+
- FGDC writer time-currentness tag is in wrong location [\#173](https://github.com/adiwg/mdTranslator/issues/173)
|
|
15
|
+
- ISO Topic Category keywords not translated [\#171](https://github.com/adiwg/mdTranslator/issues/171)
|
|
16
|
+
|
|
17
|
+
**Merged pull requests:**
|
|
18
|
+
|
|
19
|
+
- Add spatial resolution section and various patches to FGDC writer beta release [\#179](https://github.com/adiwg/mdTranslator/pull/179) ([stansmith907](https://github.com/stansmith907))
|
|
20
|
+
|
|
21
|
+
## [v2.7.0](https://github.com/adiwg/mdTranslator/tree/v2.7.0) (2017-12-29)
|
|
5
22
|
[Full Changelog](https://github.com/adiwg/mdTranslator/compare/v2.6.1...v2.7.0)
|
|
6
23
|
|
|
7
24
|
**Merged pull requests:**
|
data/adiwg-mdtranslator.gemspec
CHANGED
|
@@ -34,7 +34,7 @@ Gem::Specification.new do |spec|
|
|
|
34
34
|
spec.add_runtime_dependency "uuidtools", "~> 2.1"
|
|
35
35
|
spec.add_runtime_dependency "json-schema", "~> 2.7"
|
|
36
36
|
spec.add_runtime_dependency "adiwg-mdjson_schemas", ">= 2.4.1"
|
|
37
|
-
spec.add_runtime_dependency "adiwg-mdcodes", "~> 2.
|
|
37
|
+
spec.add_runtime_dependency "adiwg-mdcodes", "~> 2.4.0"
|
|
38
38
|
spec.add_runtime_dependency "jbuilder", "~> 2.5"
|
|
39
39
|
spec.add_runtime_dependency "kramdown", "~> 1.13"
|
|
40
40
|
spec.add_runtime_dependency "coderay", "~> 1.1"
|
|
@@ -256,7 +256,6 @@ class InternalMetadata
|
|
|
256
256
|
credits: [],
|
|
257
257
|
timePeriod: {},
|
|
258
258
|
status: [],
|
|
259
|
-
topicCategories: [],
|
|
260
259
|
pointOfContacts: [],
|
|
261
260
|
spatialReferenceSystems: [],
|
|
262
261
|
spatialRepresentationTypes: [],
|
|
@@ -814,6 +813,7 @@ class InternalMetadata
|
|
|
814
813
|
{
|
|
815
814
|
systemType: nil,
|
|
816
815
|
systemIdentifier: {},
|
|
816
|
+
systemWKT: nil,
|
|
817
817
|
systemParameterSet: {}
|
|
818
818
|
}
|
|
819
819
|
end
|
|
@@ -821,7 +821,7 @@ class InternalMetadata
|
|
|
821
821
|
def newReferenceSystemParameterSet
|
|
822
822
|
{
|
|
823
823
|
projection: {},
|
|
824
|
-
|
|
824
|
+
geodetic: {},
|
|
825
825
|
verticalDatum: {}
|
|
826
826
|
}
|
|
827
827
|
end
|
|
@@ -829,8 +829,11 @@ class InternalMetadata
|
|
|
829
829
|
def newProjection
|
|
830
830
|
{
|
|
831
831
|
projectionIdentifier: {},
|
|
832
|
+
gridSystem: nil,
|
|
833
|
+
gridSystemName: nil,
|
|
834
|
+
gridZone: nil,
|
|
835
|
+
projection: nil,
|
|
832
836
|
projectionName: nil,
|
|
833
|
-
zone: nil,
|
|
834
837
|
standardParallel1: nil,
|
|
835
838
|
standardParallel2: nil,
|
|
836
839
|
longitudeOfCentralMeridian: nil,
|
|
@@ -853,8 +856,8 @@ class InternalMetadata
|
|
|
853
856
|
landsatPath: nil,
|
|
854
857
|
localPlanarDescription: nil,
|
|
855
858
|
localPlanarGeoreference: nil,
|
|
856
|
-
|
|
857
|
-
|
|
859
|
+
otherGridDescription: nil,
|
|
860
|
+
otherProjectionDescription: nil
|
|
858
861
|
}
|
|
859
862
|
end
|
|
860
863
|
|
|
@@ -865,8 +868,10 @@ class InternalMetadata
|
|
|
865
868
|
}
|
|
866
869
|
end
|
|
867
870
|
|
|
868
|
-
def
|
|
871
|
+
def newGeodetic
|
|
869
872
|
{
|
|
873
|
+
datumIdentifier: {},
|
|
874
|
+
datumName: nil,
|
|
870
875
|
ellipsoidIdentifier: {},
|
|
871
876
|
ellipsoidName: nil,
|
|
872
877
|
semiMajorAxis: nil,
|
|
@@ -924,6 +929,7 @@ class InternalMetadata
|
|
|
924
929
|
def newVerticalDatum
|
|
925
930
|
{
|
|
926
931
|
datumIdentifier: {},
|
|
932
|
+
datumName: nil,
|
|
927
933
|
isDepthSystem: false,
|
|
928
934
|
encodingMethod: nil,
|
|
929
935
|
verticalResolution: nil,
|
|
@@ -20,7 +20,8 @@ module ADIWG
|
|
|
20
20
|
# map projection 4.1.2.1.2 (albers) - Albers Conical Equal Area
|
|
21
21
|
unless xParams.empty?
|
|
22
22
|
paramCount = 0
|
|
23
|
-
hProjection[:
|
|
23
|
+
hProjection[:projection] = 'albers'
|
|
24
|
+
hProjection[:projectionName] = 'Albers Conical Equal Area'
|
|
24
25
|
|
|
25
26
|
# -> ReferenceSystemParameters.projection.standardParallel1
|
|
26
27
|
# -> ReferenceSystemParameters.projection.standardParallel2
|
data/lib/adiwg/mdtranslator/readers/fgdc/modules/mapProjections/projection_azimuthEquidistant.rb
CHANGED
|
@@ -20,7 +20,8 @@ module ADIWG
|
|
|
20
20
|
# map projection 4.1.2.1.3 (azimequi) - Azimuthal Equidistant
|
|
21
21
|
unless xParams.empty?
|
|
22
22
|
paramCount = 0
|
|
23
|
-
hProjection[:
|
|
23
|
+
hProjection[:projection] = 'azimuthalEquidistant'
|
|
24
|
+
hProjection[:projectionName] = 'Azimuthal Equidistant'
|
|
24
25
|
|
|
25
26
|
# -> ReferenceSystemParameters.projection.longitudeOfCentralMeridian
|
|
26
27
|
paramCount += ProjectionCommon.unpackLongCM(xParams, hProjection, hResponseObj)
|
|
@@ -149,12 +149,12 @@ module ADIWG
|
|
|
149
149
|
xObliqueLA = xParams.xpath('./obqlazim')
|
|
150
150
|
unless xObliqueLA.empty?
|
|
151
151
|
paramCount = 0
|
|
152
|
-
lineAzimuth = xObliqueLA.xpath('./
|
|
152
|
+
lineAzimuth = xObliqueLA.xpath('./azimangl').text
|
|
153
153
|
unless lineAzimuth.empty?
|
|
154
154
|
hProjection[:azimuthAngle] = lineAzimuth.to_f
|
|
155
155
|
paramCount += 1
|
|
156
156
|
end
|
|
157
|
-
lineLong = xObliqueLA.xpath('./
|
|
157
|
+
lineLong = xObliqueLA.xpath('./azimptl').text
|
|
158
158
|
unless lineLong.empty?
|
|
159
159
|
hProjection[:azimuthMeasurePointLongitude] = lineLong.to_f
|
|
160
160
|
paramCount += 1
|
data/lib/adiwg/mdtranslator/readers/fgdc/modules/mapProjections/projection_equidistantConic.rb
CHANGED
|
@@ -19,7 +19,8 @@ module ADIWG
|
|
|
19
19
|
# map projection 4.1.2.1.4 (equicon) - Equidistant Conic
|
|
20
20
|
unless xParams.empty?
|
|
21
21
|
paramCount = 0
|
|
22
|
-
hProjection[:
|
|
22
|
+
hProjection[:projection] = 'equidistantConic'
|
|
23
|
+
hProjection[:projectionName] = 'Equidistant Conic'
|
|
23
24
|
|
|
24
25
|
# -> ReferenceSystemParameters.projection.standardParallel1
|
|
25
26
|
# -> ReferenceSystemParameters.projection.standardParallel2
|
data/lib/adiwg/mdtranslator/readers/fgdc/modules/mapProjections/projection_equirectangular.rb
CHANGED
|
@@ -19,7 +19,8 @@ module ADIWG
|
|
|
19
19
|
# map projection 4.1.2.1.5 (equirect) - Equirectangular
|
|
20
20
|
unless xParams.empty?
|
|
21
21
|
paramCount = 0
|
|
22
|
-
hProjection[:
|
|
22
|
+
hProjection[:projection] = 'equirectangular'
|
|
23
|
+
hProjection[:projectionName] = 'Equirectangular'
|
|
23
24
|
|
|
24
25
|
# -> ReferenceSystemParameters.projection.standardParallel1
|
|
25
26
|
paramCount += ProjectionCommon.unpackStandParallel(xParams, hProjection, hResponseObj)
|
data/lib/adiwg/mdtranslator/readers/fgdc/modules/mapProjections/projection_generalVertical.rb
CHANGED
|
@@ -20,7 +20,8 @@ module ADIWG
|
|
|
20
20
|
# map projection 4.1.2.1.6 (gvnsp) - General Vertical Near-sided Perspective
|
|
21
21
|
unless xParams.empty?
|
|
22
22
|
paramCount = 0
|
|
23
|
-
hProjection[:
|
|
23
|
+
hProjection[:projection] = 'generalVertical'
|
|
24
|
+
hProjection[:projectionName] = 'General Vertical Near-sided Perspective'
|
|
24
25
|
|
|
25
26
|
# -> ReferenceSystemParameters.projection.heightOfProspectivePointAboveSurface
|
|
26
27
|
paramCount += ProjectionCommon.unpackHeightAS(xParams, hProjection, hResponseObj)
|
|
@@ -20,7 +20,8 @@ module ADIWG
|
|
|
20
20
|
# map projection 4.1.2.1.7 (gnomonic) - Gnomonic
|
|
21
21
|
unless xParams.empty?
|
|
22
22
|
paramCount = 0
|
|
23
|
-
hProjection[:
|
|
23
|
+
hProjection[:projection] = 'gnomonic'
|
|
24
|
+
hProjection[:projectionName] = 'Gnomonic'
|
|
24
25
|
|
|
25
26
|
# -> ReferenceSystemParameters.projection.longitudeOfProjectionCenter
|
|
26
27
|
paramCount += ProjectionCommon.unpackLongPC(xParams, hProjection, hResponseObj)
|
|
@@ -20,7 +20,8 @@ module ADIWG
|
|
|
20
20
|
# map projection 4.1.2.1.9 (lambertc) - Lambert Conformal Conic
|
|
21
21
|
unless xParams.empty?
|
|
22
22
|
paramCount = 0
|
|
23
|
-
hProjection[:
|
|
23
|
+
hProjection[:projection] = 'lambertConic'
|
|
24
|
+
hProjection[:projectionName] = 'Lambert Conformal Conic'
|
|
24
25
|
|
|
25
26
|
# -> ReferenceSystemParameters.projection.standardParallel1
|
|
26
27
|
# -> ReferenceSystemParameters.projection.standardParallel2
|
data/lib/adiwg/mdtranslator/readers/fgdc/modules/mapProjections/projection_lambertEqualArea.rb
CHANGED
|
@@ -20,7 +20,8 @@ module ADIWG
|
|
|
20
20
|
# map projection 4.1.2.1.8 (lamberta) - Lambert Azimuthal Equal Area
|
|
21
21
|
unless xParams.empty?
|
|
22
22
|
paramCount = 0
|
|
23
|
-
hProjection[:
|
|
23
|
+
hProjection[:projection] = 'lambertEqualArea'
|
|
24
|
+
hProjection[:projectionName] = 'Lambert Azimuthal Equal Area'
|
|
24
25
|
|
|
25
26
|
# -> ReferenceSystemParameters.projection.longitudeOfProjectionCenter
|
|
26
27
|
paramCount += ProjectionCommon.unpackLongPC(xParams, hProjection, hResponseObj)
|
|
@@ -21,7 +21,8 @@ module ADIWG
|
|
|
21
21
|
# -> ReferenceSystemParameters.projection.[ standardParallel1 | scaleFactorAtEquator ]
|
|
22
22
|
unless xParams.empty?
|
|
23
23
|
paramCount = 0
|
|
24
|
-
hProjection[:
|
|
24
|
+
hProjection[:projection] = 'mercator'
|
|
25
|
+
hProjection[:projectionName] = 'Mercator'
|
|
25
26
|
|
|
26
27
|
# -> ReferenceSystemParameters.projection.standardParallel1
|
|
27
28
|
# -> ReferenceSystemParameters.projection.standardParallel2
|
data/lib/adiwg/mdtranslator/readers/fgdc/modules/mapProjections/projection_millerCylinder.rb
CHANGED
|
@@ -20,7 +20,8 @@ module ADIWG
|
|
|
20
20
|
# map projection 4.1.2.1.12 (miller) - Miller Cylindrical
|
|
21
21
|
unless xParams.empty?
|
|
22
22
|
paramCount = 0
|
|
23
|
-
hProjection[:
|
|
23
|
+
hProjection[:projection] = 'miller'
|
|
24
|
+
hProjection[:projectionName] = 'Miller Cylindrical'
|
|
24
25
|
|
|
25
26
|
# -> ReferenceSystemParameters.projection.longitudeOfCentralMeridian
|
|
26
27
|
paramCount += ProjectionCommon.unpackLongCM(xParams, hProjection, hResponseObj)
|
data/lib/adiwg/mdtranslator/readers/fgdc/modules/mapProjections/projection_modifiedAlaska.rb
CHANGED
|
@@ -20,7 +20,8 @@ module ADIWG
|
|
|
20
20
|
# map projection 4.1.2.1.11 (modsak) - Modified Stereographic for Alaska
|
|
21
21
|
unless xParams.empty?
|
|
22
22
|
paramCount = 0
|
|
23
|
-
hProjection[:
|
|
23
|
+
hProjection[:projection] = 'alaska'
|
|
24
|
+
hProjection[:projectionName] = 'Modified Stereographic for Alaska'
|
|
24
25
|
|
|
25
26
|
# -> ReferenceSystemParameters.projection.falseEasting
|
|
26
27
|
# -> ReferenceSystemParameters.projection.falseNorthing
|
data/lib/adiwg/mdtranslator/readers/fgdc/modules/mapProjections/projection_obliqueMercator.rb
CHANGED
|
@@ -20,7 +20,8 @@ module ADIWG
|
|
|
20
20
|
# map projection 4.1.2.1.13 (obqmerc) - Oblique Mercator
|
|
21
21
|
unless xParams.empty?
|
|
22
22
|
paramCount = 0
|
|
23
|
-
hProjection[:
|
|
23
|
+
hProjection[:projection] = 'obliqueMercator'
|
|
24
|
+
hProjection[:projectionName] = 'Oblique Mercator'
|
|
24
25
|
|
|
25
26
|
# -> ReferenceSystemParameters.projection.scaleFactorAtCenterLine
|
|
26
27
|
paramCount += ProjectionCommon.unpackSFCenter(xParams, hProjection, hResponseObj)
|
|
@@ -20,7 +20,8 @@ module ADIWG
|
|
|
20
20
|
# map projection 4.1.2.1.14 (orthogr) - Orthographic
|
|
21
21
|
unless xParams.empty?
|
|
22
22
|
paramCount = 0
|
|
23
|
-
hProjection[:
|
|
23
|
+
hProjection[:projection] = 'orthographic'
|
|
24
|
+
hProjection[:projectionName] = 'Orthographic'
|
|
24
25
|
|
|
25
26
|
# -> ReferenceSystemParameters.projection.longitudeOfProjectionCenter
|
|
26
27
|
paramCount += ProjectionCommon.unpackLongPC(xParams, hProjection, hResponseObj)
|
|
@@ -18,7 +18,8 @@ module ADIWG
|
|
|
18
18
|
|
|
19
19
|
# map projection 4.1.2.1.23 (mapprojp) - projection parameter set
|
|
20
20
|
unless xParams.empty?
|
|
21
|
-
hProjection[:
|
|
21
|
+
hProjection[:projection] = 'parameters'
|
|
22
|
+
hProjection[:projectionName] = 'Projection Parameter Set'
|
|
22
23
|
|
|
23
24
|
# -> ReferenceSystemParameters.projection.standardParallel1
|
|
24
25
|
# -> ReferenceSystemParameters.projection.standardParallel2
|
|
@@ -20,7 +20,8 @@ module ADIWG
|
|
|
20
20
|
# map projection 4.1.2.1.15 (polarst) - Polar Stereographic
|
|
21
21
|
unless xParams.empty?
|
|
22
22
|
paramCount = 0
|
|
23
|
-
hProjection[:
|
|
23
|
+
hProjection[:projection] = 'polarStereo'
|
|
24
|
+
hProjection[:projectionName] = 'Polar Stereographic'
|
|
24
25
|
|
|
25
26
|
# -> ReferenceSystemParameters.projection.straightVerticalLongitudeFromPole
|
|
26
27
|
paramCount += ProjectionCommon.unpackVSLong(xParams, hProjection, hResponseObj)
|
|
@@ -20,7 +20,8 @@ module ADIWG
|
|
|
20
20
|
# map projection 4.1.2.1.16 (polycon) - Polyconic
|
|
21
21
|
unless xParams.empty?
|
|
22
22
|
paramCount = 0
|
|
23
|
-
hProjection[:
|
|
23
|
+
hProjection[:projection] = 'polyconic'
|
|
24
|
+
hProjection[:projectionName] = 'Polyconic'
|
|
24
25
|
|
|
25
26
|
# -> ReferenceSystemParameters.projection.longitudeOfCentralMeridian
|
|
26
27
|
paramCount += ProjectionCommon.unpackLongCM(xParams, hProjection, hResponseObj)
|
|
@@ -20,7 +20,8 @@ module ADIWG
|
|
|
20
20
|
# map projection 4.1.2.1.17 (robinson) - Robinson
|
|
21
21
|
unless xParams.empty?
|
|
22
22
|
paramCount = 0
|
|
23
|
-
hProjection[:
|
|
23
|
+
hProjection[:projection] = 'robinson'
|
|
24
|
+
hProjection[:projectionName] = 'Robinson'
|
|
24
25
|
|
|
25
26
|
# -> ReferenceSystemParameters.projection.longitudeOfProjectionCenter
|
|
26
27
|
paramCount += ProjectionCommon.unpackLongPC(xParams, hProjection, hResponseObj)
|
|
@@ -20,7 +20,8 @@ module ADIWG
|
|
|
20
20
|
# map projection 4.1.2.1.18 (sinusoid) - Sinusoidal
|
|
21
21
|
unless xParams.empty?
|
|
22
22
|
paramCount = 0
|
|
23
|
-
hProjection[:
|
|
23
|
+
hProjection[:projection] = 'sinusoidal'
|
|
24
|
+
hProjection[:projectionName] = 'Sinusoidal'
|
|
24
25
|
|
|
25
26
|
# -> ReferenceSystemParameters.projection.longitudeOfCentralMeridian
|
|
26
27
|
paramCount += ProjectionCommon.unpackLongCM(xParams, hProjection, hResponseObj)
|
|
@@ -20,7 +20,8 @@ module ADIWG
|
|
|
20
20
|
# map projection 4.1.2.1.19 (spaceobq) - Space Oblique Mercator (Landsat)
|
|
21
21
|
unless xParams.empty?
|
|
22
22
|
paramCount = 0
|
|
23
|
-
hProjection[:
|
|
23
|
+
hProjection[:projection] = 'spaceOblique'
|
|
24
|
+
hProjection[:projectionName] = 'Space Oblique Mercator (Landsat)'
|
|
24
25
|
|
|
25
26
|
# -> ReferenceSystemParameters.projection.landsatNumber
|
|
26
27
|
paramCount += ProjectionCommon.unpackLandSat(xParams, hProjection, hResponseObj)
|
|
@@ -20,7 +20,8 @@ module ADIWG
|
|
|
20
20
|
# map projection 4.1.2.1.20 (stereo) - Stereographic
|
|
21
21
|
unless xParams.empty?
|
|
22
22
|
paramCount = 0
|
|
23
|
-
hProjection[:
|
|
23
|
+
hProjection[:projection] = 'stereographic'
|
|
24
|
+
hProjection[:projectionName] = 'Stereographic'
|
|
24
25
|
|
|
25
26
|
# -> ReferenceSystemParameters.projection.longitudeOfProjectionCenter
|
|
26
27
|
paramCount += ProjectionCommon.unpackLongPC(xParams, hProjection, hResponseObj)
|
data/lib/adiwg/mdtranslator/readers/fgdc/modules/mapProjections/projection_transverseMercator.rb
CHANGED
|
@@ -19,7 +19,8 @@ module ADIWG
|
|
|
19
19
|
# map projection 4.1.2.1.21 (transmer) - Transverse Mercator
|
|
20
20
|
unless xParams.empty?
|
|
21
21
|
paramCount = 0
|
|
22
|
-
hProjection[:
|
|
22
|
+
hProjection[:projection] = 'transverseMercator'
|
|
23
|
+
hProjection[:projectionName] = 'Transverse Mercator'
|
|
23
24
|
|
|
24
25
|
# -> ReferenceSystemParameters.projection.scaleFactorAtCentralMeridian
|
|
25
26
|
paramCount += ProjectionCommon.unpackSFCM(xParams, hProjection, hResponseObj)
|
|
@@ -19,7 +19,8 @@ module ADIWG
|
|
|
19
19
|
# map projection 4.1.2.1.22 (vdgrin) - van der Grinten
|
|
20
20
|
unless xParams.empty?
|
|
21
21
|
paramCount = 0
|
|
22
|
-
hProjection[:
|
|
22
|
+
hProjection[:projection] = 'grinten'
|
|
23
|
+
hProjection[:projectionName] = 'van der Grinten'
|
|
23
24
|
|
|
24
25
|
# -> ReferenceSystemParameters.projection.longitudeOfCentralMeridian
|
|
25
26
|
paramCount += ProjectionCommon.unpackLongCM(xParams, hProjection, hResponseObj)
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
# Reader - fgdc to internal data structure
|
|
2
|
+
# unpack fgdc horizontal data geodetic reference
|
|
3
|
+
|
|
4
|
+
# History:
|
|
5
|
+
# Stan Smith 2017-12-29 original script
|
|
6
|
+
|
|
7
|
+
require 'nokogiri'
|
|
8
|
+
require 'adiwg/mdtranslator/internal/internal_metadata_obj'
|
|
9
|
+
|
|
10
|
+
module ADIWG
|
|
11
|
+
module Mdtranslator
|
|
12
|
+
module Readers
|
|
13
|
+
module Fgdc
|
|
14
|
+
|
|
15
|
+
module GeodeticReference
|
|
16
|
+
|
|
17
|
+
def self.unpack(xHorizontalRef)
|
|
18
|
+
|
|
19
|
+
# instance classes needed in script
|
|
20
|
+
intMetadataClass = InternalMetadata.new
|
|
21
|
+
|
|
22
|
+
hGeodetic = intMetadataClass.newGeodetic
|
|
23
|
+
xGeodetic = xHorizontalRef.xpath('./geodetic')
|
|
24
|
+
|
|
25
|
+
# geodetic model 4.1.4.1 (horizdn) - horizontal datum name
|
|
26
|
+
# -> referenceSystemParameters.geodetic.datumName
|
|
27
|
+
datumName = xGeodetic.xpath('./horizdn').text
|
|
28
|
+
unless datumName.empty?
|
|
29
|
+
hGeodetic[:datumName] = datumName
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
# geodetic model 4.1.4.2 (ellips) - ellipsoid name
|
|
33
|
+
# -> referenceSystemParameters.geodetic.ellipsoidName
|
|
34
|
+
ellipsoidName = xGeodetic.xpath('./ellips').text
|
|
35
|
+
unless ellipsoidName.empty?
|
|
36
|
+
hGeodetic[:ellipsoidName] = ellipsoidName
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
# geodetic model 4.1.4.3 (semiaxis) - semi-major axis
|
|
40
|
+
# -> referenceSystemParameters.geodetic.semiMajorAxis
|
|
41
|
+
semiAxis = xGeodetic.xpath('./semiaxis').text
|
|
42
|
+
unless semiAxis.empty?
|
|
43
|
+
hGeodetic[:semiMajorAxis] = semiAxis.to_f
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
# geodetic model 4.1.2.4.4 (plandu) - distance units
|
|
47
|
+
# take value from the first 'planar' section with 'plandu' specified
|
|
48
|
+
axPlanar = xHorizontalRef.xpath('./planar')
|
|
49
|
+
unless axPlanar.empty?
|
|
50
|
+
axPlanar.each do |xPlanar|
|
|
51
|
+
xPlanCI = xPlanar.xpath('./planci')
|
|
52
|
+
unless xPlanCI.empty?
|
|
53
|
+
units = xPlanCI.xpath('./plandu').text
|
|
54
|
+
unless units.empty?
|
|
55
|
+
hGeodetic[:axisUnits] = units
|
|
56
|
+
end
|
|
57
|
+
end
|
|
58
|
+
end
|
|
59
|
+
end
|
|
60
|
+
|
|
61
|
+
# geodetic model 4.1.4.4 (denflat) - denominator of flattening ratio
|
|
62
|
+
# -> referenceSystemParameters.geodetic.denominatorOfFlatteningRatio
|
|
63
|
+
flattening = xGeodetic.xpath('./denflat').text
|
|
64
|
+
unless flattening.empty?
|
|
65
|
+
hGeodetic[:denominatorOfFlatteningRatio] = flattening.to_f
|
|
66
|
+
end
|
|
67
|
+
|
|
68
|
+
hReferenceSystem = intMetadataClass.newSpatialReferenceSystem
|
|
69
|
+
hSystemParameters = intMetadataClass.newReferenceSystemParameterSet
|
|
70
|
+
hSystemParameters[:geodetic] = hGeodetic
|
|
71
|
+
hReferenceSystem[:systemParameterSet] = hSystemParameters
|
|
72
|
+
|
|
73
|
+
return hReferenceSystem
|
|
74
|
+
|
|
75
|
+
end
|
|
76
|
+
|
|
77
|
+
end
|
|
78
|
+
|
|
79
|
+
end
|
|
80
|
+
end
|
|
81
|
+
end
|
|
82
|
+
end
|