voruby 1.1.1 → 2.0.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.
- data/Rakefile.rb +107 -224
- data/lib/misc.rb +1 -0
- data/lib/misc/misc.rb +60 -0
- data/lib/misc/propertyfile.rb +31 -0
- data/lib/symphony.rb +1 -0
- data/lib/symphony/symphony.rb +247 -0
- data/lib/voruby.rb +186 -0
- data/lib/voruby/active_votable/active_votable.rb +468 -347
- data/lib/voruby/adql/1.0/adql.rb +2418 -0
- data/lib/voruby/adql/support.rb +2 -0
- data/lib/voruby/misc.rb +351 -0
- data/lib/voruby/misc/connection_monitor.rb +97 -0
- data/lib/voruby/misc/libxml_ext.rb +121 -0
- data/lib/voruby/misc/rexml_ext.rb +223 -0
- data/lib/voruby/resolver/resolver.rb +12 -0
- data/lib/voruby/resolver/sesame.rb +299 -0
- data/lib/voruby/sky_query/sky_query.rb +192 -0
- data/lib/voruby/stc/1.10/coords.rb +2272 -0
- data/lib/voruby/stc/1.10/region.rb +892 -0
- data/lib/voruby/stc/1.10/stc.rb +3271 -0
- data/lib/voruby/stc/1.30/stc.rb +8666 -0
- data/lib/voruby/stc/support.rb +2 -0
- data/lib/voruby/ucd/ucd.rb +173 -0
- data/lib/voruby/voevent/1.1/voevent.rb +1124 -0
- data/lib/voruby/voevent/support.rb +5 -0
- data/lib/voruby/votable/1.0/votable.rb +1807 -0
- data/lib/voruby/votable/1.1/votable.rb +2100 -0
- data/lib/voruby/votable/votable.rb +305 -0
- data/lib/voruby/wesix/wesix.rb +491 -0
- data/lib/voruby/xlink/1.2/xlink.rb +21 -0
- data/test/voruby/active_votable/complex.vot +60 -0
- data/test/voruby/active_votable/error.vot +6 -0
- data/test/voruby/active_votable/large.vot +130040 -0
- data/test/voruby/active_votable/simple1.vot +38 -0
- data/test/voruby/active_votable/simple2.vot +38 -0
- data/test/voruby/active_votable/test.rb +193 -0
- data/test/voruby/adql/1.0/adql-alias.sql +1 -0
- data/test/voruby/adql/1.0/adql-alias.xml +26 -0
- data/test/voruby/adql/1.0/adql-avg.sql +1 -0
- data/test/voruby/adql/1.0/adql-avg.xml +31 -0
- data/test/voruby/adql/1.0/adql-circle.sql +1 -0
- data/test/voruby/adql/1.0/adql-circle.xml +46 -0
- data/test/voruby/adql/1.0/adql-expr.sql +1 -0
- data/test/voruby/adql/1.0/adql-expr.xml +34 -0
- data/test/voruby/adql/1.0/adql-function.sql +1 -0
- data/test/voruby/adql/1.0/adql-function.xml +41 -0
- data/test/voruby/adql/1.0/adql-group.sql +1 -0
- data/test/voruby/adql/1.0/adql-group.xml +51 -0
- data/test/voruby/adql/1.0/adql-having.sql +1 -0
- data/test/voruby/adql/1.0/adql-having.xml +25 -0
- data/test/voruby/adql/1.0/adql-like.sql +1 -0
- data/test/voruby/adql/1.0/adql-like.xml +17 -0
- data/test/voruby/adql/1.0/adql-order.sql +1 -0
- data/test/voruby/adql/1.0/adql-order.xml +37 -0
- data/test/voruby/adql/1.0/adql-simple.sql +1 -0
- data/test/voruby/adql/1.0/adql-simple.xml +12 -0
- data/test/voruby/adql/1.0/adql-top.sql +1 -0
- data/test/voruby/adql/1.0/adql-top.xml +33 -0
- data/test/voruby/adql/1.0/test.rb +2220 -0
- data/test/voruby/misc/test.rb +32 -0
- data/test/voruby/resolver/sesame/test.rb +56 -0
- data/test/voruby/sky_query/test.rb +107 -0
- data/test/voruby/stc/1.10/coords_test.rb +3704 -0
- data/test/voruby/stc/1.10/region_test.rb +993 -0
- data/test/voruby/stc/1.10/stc-catalog-entry-location.xml +112 -0
- data/test/voruby/stc/1.10/stc-obs-data-location.xml +126 -0
- data/test/voruby/stc/1.10/stc-region-circle.xml +5 -0
- data/test/voruby/stc/1.10/stc-region-convex.xml +11 -0
- data/test/voruby/stc/1.10/stc-region-convexhull.xml +5 -0
- data/test/voruby/stc/1.10/stc-region-ellipse.xml +7 -0
- data/test/voruby/stc/1.10/stc-region-intersection.xml +25 -0
- data/test/voruby/stc/1.10/stc-region-negation.xml +7 -0
- data/test/voruby/stc/1.10/stc-region-polygon.xml +13 -0
- data/test/voruby/stc/1.10/stc-region-sector.xml +6 -0
- data/test/voruby/stc/1.10/stc-region-union.xml +25 -0
- data/test/voruby/stc/1.10/stc-resource-profile.xml +60 -0
- data/test/voruby/stc/1.10/stc-search-location.xml +54 -0
- data/test/voruby/stc/1.10/stc_test.rb +4626 -0
- data/test/voruby/stc/1.30/stc-catalog-entry-location.xml +210 -0
- data/test/voruby/stc/1.30/stc-obs-data-location-arecibo.xml +353 -0
- data/test/voruby/stc/1.30/stc-obs-data-location-fits.xml +250 -0
- data/test/voruby/stc/1.30/stc-obs-data-location-xlink.xml +63 -0
- data/test/voruby/stc/1.30/stc-obs-data-location.xml +216 -0
- data/test/voruby/stc/1.30/stc-resource-profile-unusual-ref-pos.xml +39 -0
- data/test/voruby/stc/1.30/stc-resource-profile.xml +129 -0
- data/test/voruby/stc/1.30/stc-search-location-arecibo.xml +86 -0
- data/test/voruby/stc/1.30/stc-search-location.xml +101 -0
- data/test/voruby/stc/1.30/test.rb +6274 -0
- data/test/voruby/ucd/test.rb +48 -0
- data/test/voruby/voevent/1.1/test.rb +812 -0
- data/test/{voevent/voevent_v1_1.xml → voruby/voevent/1.1/voevent.xml} +2 -2
- data/test/voruby/voregistry/0.3/test.rb +137 -0
- data/test/voruby/votable/1.0/test.rb +714 -0
- data/test/voruby/votable/1.0/votable.basic.xml +660 -0
- data/test/voruby/votable/1.0/votable.html +86 -0
- data/test/voruby/votable/1.0/votable.ns.xml +56 -0
- data/test/voruby/votable/1.1/test.rb +785 -0
- data/test/voruby/votable/1.1/votable.basic.xml +38 -0
- data/test/voruby/votable/1.1/votable.html +86 -0
- data/test/voruby/votable/1.1/votable.ns.xml +56 -0
- data/test/voruby/votable/test.rb +15 -0
- data/test/voruby/wesix/test.rb +268 -0
- data/test/voruby/wesix/testr.fits +28 -0
- metadata +234 -247
- data/REQUIREMENTS +0 -6
- data/lib/voruby/active_votable/loader.rb +0 -5
- data/lib/voruby/adql/adql.rb +0 -2787
- data/lib/voruby/adql/ext.rb +0 -14
- data/lib/voruby/adql/loader.rb +0 -6
- data/lib/voruby/adql/operations.rb +0 -54
- data/lib/voruby/adql/parser.rb +0 -160
- data/lib/voruby/adql/transforms.rb +0 -573
- data/lib/voruby/ext.rb +0 -17
- data/lib/voruby/loader.rb +0 -4
- data/lib/voruby/misc/propertyfile.rb +0 -36
- data/lib/voruby/plastic/applications.rb +0 -174
- data/lib/voruby/plastic/constants.rb +0 -30
- data/lib/voruby/plastic/loader.rb +0 -10
- data/lib/voruby/plastic/plastic.rb +0 -1
- data/lib/voruby/resources/conesearch/conesearch.rb +0 -9
- data/lib/voruby/resources/conesearch/conesearch_v0_2.rb +0 -55
- data/lib/voruby/resources/conesearch/conesearch_v0_3.rb +0 -50
- data/lib/voruby/resources/conesearch/conesearch_v1_0.rb +0 -72
- data/lib/voruby/resources/conesearch/loader.rb +0 -4
- data/lib/voruby/resources/loader.rb +0 -50
- data/lib/voruby/resources/nodes.rb +0 -190
- data/lib/voruby/resources/openskynode/loader.rb +0 -4
- data/lib/voruby/resources/openskynode/openskynode.rb +0 -9
- data/lib/voruby/resources/openskynode/openskynode_v0_1.rb +0 -54
- data/lib/voruby/resources/sia/loader.rb +0 -5
- data/lib/voruby/resources/sia/sia.rb +0 -9
- data/lib/voruby/resources/sia/sia_v0_6.rb +0 -90
- data/lib/voruby/resources/sia/sia_v0_7.rb +0 -89
- data/lib/voruby/resources/sia/sia_v1_0.rb +0 -122
- data/lib/voruby/resources/stsci.rb +0 -59
- data/lib/voruby/resources/vodataservice/coverage_v0_2.rb +0 -195
- data/lib/voruby/resources/vodataservice/coverage_v0_3.rb +0 -158
- data/lib/voruby/resources/vodataservice/loader.rb +0 -5
- data/lib/voruby/resources/vodataservice/vodataservice.rb +0 -9
- data/lib/voruby/resources/vodataservice/vodataservice_v0_4.rb +0 -189
- data/lib/voruby/resources/vodataservice/vodataservice_v0_5.rb +0 -163
- data/lib/voruby/resources/vodataservice/vodataservice_v1_0.rb +0 -221
- data/lib/voruby/resources/voregistry/loader.rb +0 -4
- data/lib/voruby/resources/voregistry/voregistry.rb +0 -9
- data/lib/voruby/resources/voregistry/voregistry_v0_2.rb +0 -40
- data/lib/voruby/resources/voregistry/voregistry_v0_3.rb +0 -30
- data/lib/voruby/resources/voregistry/voregistry_v1_0.rb +0 -86
- data/lib/voruby/resources/voresource/loader.rb +0 -17
- data/lib/voruby/resources/voresource/voresource.rb +0 -9
- data/lib/voruby/resources/voresource/voresource_v0_10.rb +0 -327
- data/lib/voruby/resources/voresource/voresource_v0_9.rb +0 -405
- data/lib/voruby/resources/voresource/voresource_v1_0.rb +0 -230
- data/lib/voruby/services/ext.rb +0 -11
- data/lib/voruby/services/gestalt/footprint.rb +0 -95
- data/lib/voruby/services/gestalt/wcs_fixer.rb +0 -105
- data/lib/voruby/services/gestalt/wesix.rb +0 -155
- data/lib/voruby/services/loader.rb +0 -7
- data/lib/voruby/services/registry/registry.rb +0 -53
- data/lib/voruby/services/resolver/resolver.rb +0 -35
- data/lib/voruby/services/schema/schema.rb +0 -644
- data/lib/voruby/sesame/loader.rb +0 -6
- data/lib/voruby/sesame/sesame_v1_0.rb +0 -64
- data/lib/voruby/simple/loader.rb +0 -6
- data/lib/voruby/simple/parameters.rb +0 -196
- data/lib/voruby/simple/sap.rb +0 -446
- data/lib/voruby/spacetime/loader.rb +0 -3
- data/lib/voruby/spacetime/spacetime.rb +0 -607
- data/lib/voruby/stc/coords_v1_20.rb +0 -900
- data/lib/voruby/stc/loader.rb +0 -55
- data/lib/voruby/stc/region_v1_20.rb +0 -274
- data/lib/voruby/stc/stc_v1_20.rb +0 -1196
- data/lib/voruby/util.rb +0 -27
- data/lib/voruby/voevent/loader.rb +0 -7
- data/lib/voruby/voevent/voevent_v1_0.rb +0 -213
- data/lib/voruby/voevent/voevent_v1_1.rb +0 -196
- data/lib/voruby/votables/chandra.rb +0 -373
- data/lib/voruby/votables/data.rb +0 -179
- data/lib/voruby/votables/galex.rb +0 -377
- data/lib/voruby/votables/int.rb +0 -354
- data/lib/voruby/votables/libxml_parser.rb +0 -411
- data/lib/voruby/votables/libxml_votable.rb +0 -67
- data/lib/voruby/votables/loader.rb +0 -10
- data/lib/voruby/votables/meta.rb +0 -763
- data/lib/voruby/votables/misc.rb +0 -51
- data/lib/voruby/votables/nsa.rb +0 -410
- data/lib/voruby/votables/rexml_parser.rb +0 -408
- data/lib/voruby/votables/rexml_votable.rb +0 -67
- data/lib/voruby/votables/sdss.rb +0 -356
- data/lib/voruby/votables/transforms.rb +0 -388
- data/lib/voruby/votables/tree.rb +0 -45
- data/lib/voruby/votables/types.rb +0 -391
- data/lib/voruby/votables/votable.rb +0 -687
- data/test/active_votable/database.yml +0 -6
- data/test/active_votable/test.vot +0 -168492
- data/test/active_votable/unittest.rb +0 -41
- data/test/adql/test1.adql +0 -49
- data/test/adql/test2.adql +0 -51
- data/test/adql/test3.adql +0 -81
- data/test/adql/test4.adql +0 -53
- data/test/adql/test5.adql +0 -55
- data/test/adql/test6.adql +0 -18
- data/test/adql/test7.adql +0 -48
- data/test/adql/unittest.rb +0 -1672
- data/test/plastic/test.rb +0 -44
- data/test/plastic/test.vot +0 -5385
- data/test/plastic/unittest.rb +0 -66
- data/test/resources/conesearch/conesearch_v0_3.xml +0 -31
- data/test/resources/conesearch/conesearch_v1_0.xml +0 -86
- data/test/resources/conesearch/unittest_v0_3.rb +0 -22
- data/test/resources/conesearch/unittest_v1_0.rb +0 -24
- data/test/resources/openskynode/open_sky_node_v0_1.xml +0 -32
- data/test/resources/openskynode/unittest_v0_1.rb +0 -31
- data/test/resources/sia/simple_image_access_v0_7.xml +0 -36
- data/test/resources/sia/simple_image_access_v1_0.xml +0 -122
- data/test/resources/sia/unittest_v0_7.rb +0 -24
- data/test/resources/sia/unittest_v1_0.rb +0 -29
- data/test/resources/stsci.xml +0 -336
- data/test/resources/unittest_stsci.rb +0 -25
- data/test/resources/vodataservice/catalog_service_resource_v1_0.xml +0 -128
- data/test/resources/vodataservice/data_collection_resource_v0_5.xml +0 -54
- data/test/resources/vodataservice/data_collection_resource_v1_0.xml +0 -117
- data/test/resources/vodataservice/data_service_resource_v1_0.xml +0 -115
- data/test/resources/vodataservice/sky_service_resource_v0_10.xml +0 -45
- data/test/resources/vodataservice/table_service_resource_v1_0.xml +0 -122
- data/test/resources/vodataservice/tabular_sky_service_resource_v0_10.xml +0 -60
- data/test/resources/vodataservice/unittest_v0_5.rb +0 -126
- data/test/resources/vodataservice/unittest_v1_0.rb +0 -151
- data/test/resources/voregistry/authority_resource_v0_3.xml +0 -20
- data/test/resources/voregistry/authority_resource_v1_0.xml +0 -82
- data/test/resources/voregistry/registry_service_v0_3.xml +0 -20
- data/test/resources/voregistry/registry_service_v1_0.xml +0 -107
- data/test/resources/voregistry/unittest_v0_3.rb +0 -31
- data/test/resources/voregistry/unittest_v1_0.rb +0 -34
- data/test/resources/voresource/organisation_resource_v1_0.xml +0 -90
- data/test/resources/voresource/resource_organisation_v0_10.xml +0 -22
- data/test/resources/voresource/resource_service_v0_10.xml +0 -19
- data/test/resources/voresource/resource_v0_10.xml +0 -19
- data/test/resources/voresource/resource_v1_0.xml +0 -79
- data/test/resources/voresource/service_resource_v1_0.xml +0 -91
- data/test/resources/voresource/unittest_v0_10.rb +0 -61
- data/test/resources/voresource/unittest_v0_9.rb +0 -4
- data/test/resources/voresource/unittest_v1_0.rb +0 -190
- data/test/services/gestalt/unittest.rb +0 -74
- data/test/services/registry/unittest.rb +0 -34
- data/test/services/resolver/unittest.rb +0 -38
- data/test/simple/unittest.rb +0 -46
- data/test/spacetime/unittest.rb +0 -39
- data/test/stc/catalog_entry_location_v1_20.xml +0 -112
- data/test/stc/obs_data_location_v1_20.xml +0 -108
- data/test/stc/search_location_v1_20.xml +0 -54
- data/test/stc/stc_resource_profile_v1_20.xml +0 -60
- data/test/stc/unittest_v1_20.rb +0 -620
- data/test/voevent/unittest_v1_0.rb +0 -79
- data/test/voevent/unittest_v1_1.rb +0 -70
- data/test/voevent/voevent_v1_0.xml +0 -96
- data/test/votables/test.vot +0 -366
- data/test/votables/unittest.rb +0 -54
data/lib/voruby/sesame/loader.rb
DELETED
@@ -1,64 +0,0 @@
|
|
1
|
-
require 'voruby/sesame/loader'
|
2
|
-
|
3
|
-
require 'voruby/spacetime/spacetime'
|
4
|
-
|
5
|
-
include VORuby::CoordinateSystems
|
6
|
-
|
7
|
-
module VORuby
|
8
|
-
module Sesame
|
9
|
-
module V1_0
|
10
|
-
|
11
|
-
# Forward declarations
|
12
|
-
class Sesame; end
|
13
|
-
class Target; end
|
14
|
-
class SimpleString; end
|
15
|
-
class Resolver; end
|
16
|
-
|
17
|
-
# Sesame is the root element.
|
18
|
-
class Sesame
|
19
|
-
include XML::Mapping
|
20
|
-
|
21
|
-
array_node :info, 'INFO', :class => SimpleString, :optional => true, :default_value => []
|
22
|
-
array_node :errors, 'ERROR', :class => SimpleString, :optional => true, :default_value => []
|
23
|
-
array_node :resolvers, 'Resolver', :class => Resolver, :optional => false
|
24
|
-
|
25
|
-
object_node :target, 'target', :class => Target, :optional => false
|
26
|
-
end
|
27
|
-
|
28
|
-
class Target
|
29
|
-
include XML::Mapping
|
30
|
-
|
31
|
-
text_node :value, '', :optional => false
|
32
|
-
text_node :option, '@option', :optional => false
|
33
|
-
end
|
34
|
-
|
35
|
-
class SimpleString
|
36
|
-
include XML::Mapping
|
37
|
-
|
38
|
-
text_node :value, '', :optional => false
|
39
|
-
end
|
40
|
-
|
41
|
-
class Resolver
|
42
|
-
include XML::Mapping
|
43
|
-
|
44
|
-
array_node :info, 'INFO', :class => SimpleString, :optional => true, :default_value => []
|
45
|
-
array_node :errors, 'ERROR', :class => SimpleString, :optional => true, :default_value => []
|
46
|
-
array_node :aliases, 'alias', :class => SimpleString, :optional => true, :default_value => []
|
47
|
-
|
48
|
-
text_node :otype, 'otype', :optional => true
|
49
|
-
text_node :jpos, 'jpos', :optional => true
|
50
|
-
text_node :ref_pos, 'refPos', :optional => true
|
51
|
-
text_node :oname, 'oname', :optional => true
|
52
|
-
text_node :name, '@name', :optional => false
|
53
|
-
text_node :code, '@code', :optional => true
|
54
|
-
|
55
|
-
numeric_node :jradeg, 'jradeg', :optional => true
|
56
|
-
numeric_node :jdedeg, 'jdedeg', :optional => true
|
57
|
-
numeric_node :err_ra_mas, 'errRAmas', :optional => true
|
58
|
-
numeric_node :err_de_mas, 'errDEmas', :optional => true
|
59
|
-
numeric_node :nrefs, 'nrefs', :optional => true
|
60
|
-
end
|
61
|
-
|
62
|
-
end
|
63
|
-
end
|
64
|
-
end
|
data/lib/voruby/simple/loader.rb
DELETED
@@ -1,196 +0,0 @@
|
|
1
|
-
require 'uri'
|
2
|
-
|
3
|
-
module VORuby
|
4
|
-
|
5
|
-
module Simple
|
6
|
-
|
7
|
-
# Classes representing the different sorts of parameters commonly used
|
8
|
-
# in the REST-based services like SIAP, SSAP and SCS.
|
9
|
-
module Parameters
|
10
|
-
|
11
|
-
# Represents a search radius.
|
12
|
-
class Radius
|
13
|
-
def initialize(radius)
|
14
|
-
@radius = radius(radius)
|
15
|
-
end
|
16
|
-
|
17
|
-
def radius(radius=nil)
|
18
|
-
if radius == nil
|
19
|
-
return @radius
|
20
|
-
else
|
21
|
-
@radius = radius.to_f()
|
22
|
-
end
|
23
|
-
end
|
24
|
-
|
25
|
-
def to_s
|
26
|
-
URI.escape(sprintf("SR=%.2f", @radius))
|
27
|
-
end
|
28
|
-
end
|
29
|
-
|
30
|
-
# Represents astronomical longitude.
|
31
|
-
class RightAscension
|
32
|
-
def initialize(ra)
|
33
|
-
ra(ra)
|
34
|
-
end
|
35
|
-
|
36
|
-
def ra(ra=nil)
|
37
|
-
if ra == nil
|
38
|
-
return @ra
|
39
|
-
else
|
40
|
-
if ra.instance_of?(String)
|
41
|
-
if ra =~ /[-+]\d+:\d+:\d+(\.\d+)?/
|
42
|
-
@ra = RightAscension.convert_to_decimal_degrees(ra)
|
43
|
-
else
|
44
|
-
@ra = ra.to_f()
|
45
|
-
end
|
46
|
-
else
|
47
|
-
@ra = ra.to_f()
|
48
|
-
end
|
49
|
-
end
|
50
|
-
end
|
51
|
-
|
52
|
-
def to_s
|
53
|
-
URI.escape(sprintf("RA=%.3f", @ra))
|
54
|
-
end
|
55
|
-
|
56
|
-
# Convert an RA in h:m:s format to decimal degrees.
|
57
|
-
def self.convert_to_decimal_degrees(ra)
|
58
|
-
hours, min, sec = ra.split(':')
|
59
|
-
|
60
|
-
degrees =
|
61
|
-
(hours.to_f() * 15.0) +
|
62
|
-
(min.to_f() * 15.0 / 60.0) +
|
63
|
-
(sec.to_f() * 15.0 / (60.0 * 60.0))
|
64
|
-
|
65
|
-
return degrees
|
66
|
-
end
|
67
|
-
end
|
68
|
-
|
69
|
-
# Represents astronomical latitude.
|
70
|
-
class Declination
|
71
|
-
def initialize(dec)
|
72
|
-
dec(dec)
|
73
|
-
end
|
74
|
-
|
75
|
-
def dec(dec=nil)
|
76
|
-
if dec == nil
|
77
|
-
return @dec
|
78
|
-
else
|
79
|
-
if dec.instance_of?(String)
|
80
|
-
@dec = Declination.convert_to_decimal_degrees(dec)
|
81
|
-
else
|
82
|
-
@dec = dec.to_f()
|
83
|
-
end
|
84
|
-
end
|
85
|
-
end
|
86
|
-
|
87
|
-
def to_s
|
88
|
-
URI.escape(sprintf("DEC=%.3f", @dec))
|
89
|
-
end
|
90
|
-
|
91
|
-
# Convert a Dec in d:m:s format to decimal degrees.
|
92
|
-
def self.convert_to_decimal_degrees(dec)
|
93
|
-
degree, arcmin, arcsec = dec.split(':')
|
94
|
-
|
95
|
-
degree_f = degree.to_f()
|
96
|
-
arcmin_f = (arcmin.to_f() / 60.0)
|
97
|
-
arcsec_f = (arcsec.to_f() / (60.0 * 60.0))
|
98
|
-
|
99
|
-
return (degree_f - arcmin_f - arcsec_f) if degree_f < 0
|
100
|
-
return degree_f + arcmin_f + arcsec_f
|
101
|
-
end
|
102
|
-
end
|
103
|
-
|
104
|
-
# Represents an angular size on the sky.
|
105
|
-
class Size
|
106
|
-
def initialize(ra_width, dec_width=nil)
|
107
|
-
if dec_width == nil
|
108
|
-
ra_width(ra_width)
|
109
|
-
dec_width(ra_width)
|
110
|
-
else
|
111
|
-
ra_width(ra_width)
|
112
|
-
dec_width(dec_width)
|
113
|
-
end
|
114
|
-
end
|
115
|
-
|
116
|
-
# Set or get the value of the RA width.
|
117
|
-
# The width is specifed in decimal degrees.
|
118
|
-
def ra_width(ra_width=nil)
|
119
|
-
if ra_width == nil
|
120
|
-
return @ra_width
|
121
|
-
else
|
122
|
-
@ra_width = ra_width.to_f()
|
123
|
-
end
|
124
|
-
end
|
125
|
-
|
126
|
-
# Set or get the value of the declination width.
|
127
|
-
# The width is specified in decimal degrees.
|
128
|
-
def dec_width(dec_width=nil)
|
129
|
-
if dec_width == nil
|
130
|
-
return @dec_width
|
131
|
-
else
|
132
|
-
@dec_width = dec_width.to_f()
|
133
|
-
end
|
134
|
-
end
|
135
|
-
|
136
|
-
# Convert the size to its SIAP-compliant form.
|
137
|
-
def to_s
|
138
|
-
if @ra_width == @dec_width
|
139
|
-
# size = 0 is a special case--it test whether
|
140
|
-
# the given point is in an image.
|
141
|
-
if @ra_width == 0.0
|
142
|
-
return URI.escape("SIZE=0")
|
143
|
-
else
|
144
|
-
return URI.escape(sprintf("SIZE=%.4f", @ra_width))
|
145
|
-
end
|
146
|
-
else
|
147
|
-
return URI.escape(sprintf("SIZE=%.4f,%.4f", @ra_width, @dec_width))
|
148
|
-
end
|
149
|
-
end
|
150
|
-
end
|
151
|
-
|
152
|
-
# Represents a position on the sky.
|
153
|
-
class Position
|
154
|
-
def initialize(ra, dec)
|
155
|
-
ra(ra)
|
156
|
-
dec(dec)
|
157
|
-
end
|
158
|
-
|
159
|
-
# Set or get the value of the right ascension.
|
160
|
-
# The RA may be a decimal or a string in standard sexigesimal format.
|
161
|
-
def ra(ra=nil)
|
162
|
-
if ra == nil
|
163
|
-
return @ra
|
164
|
-
else
|
165
|
-
if ra.instance_of?(RightAscension)
|
166
|
-
@ra = ra
|
167
|
-
else
|
168
|
-
@ra = RightAscension.new(ra)
|
169
|
-
end
|
170
|
-
end
|
171
|
-
end
|
172
|
-
|
173
|
-
# Set or get the value of the declination.
|
174
|
-
# The declination may be a decimal or a string in standard sexigesimal format.
|
175
|
-
def dec(dec=nil)
|
176
|
-
if dec == nil
|
177
|
-
return @dec
|
178
|
-
else
|
179
|
-
if dec.instance_of?(Declination)
|
180
|
-
@dec = dec
|
181
|
-
else
|
182
|
-
@dec = Declination.new(dec)
|
183
|
-
end
|
184
|
-
end
|
185
|
-
end
|
186
|
-
|
187
|
-
# Convert the position to its SIAP-compliant form.
|
188
|
-
def to_s
|
189
|
-
URI.escape(sprintf("POS=%.3f,%.3f", @ra.ra(), @dec.dec()))
|
190
|
-
end
|
191
|
-
end
|
192
|
-
|
193
|
-
end
|
194
|
-
end
|
195
|
-
|
196
|
-
end
|
data/lib/voruby/simple/sap.rb
DELETED
@@ -1,446 +0,0 @@
|
|
1
|
-
require 'voruby/simple/loader'
|
2
|
-
|
3
|
-
module VORuby
|
4
|
-
# A number of classes for dealing with standard VO protocols like SIAP, SSAP and
|
5
|
-
# SCS.
|
6
|
-
module Simple
|
7
|
-
# Executes a series of queries, each in its own thread.
|
8
|
-
# Typical use might be something like this:
|
9
|
-
# # Convert the query results into an object representation.
|
10
|
-
# objectifier = Proc.new { |query|
|
11
|
-
# query.marshall().votable().votable()
|
12
|
-
# }
|
13
|
-
#
|
14
|
-
# # Prepare a SIAP query
|
15
|
-
# nsa_siap = Simple::ImageAccess.new('http://archive.noao.edu/nvo/sim/voquery.php',
|
16
|
-
# '23:00:00, 2:00:00', 7, nil, 30, 'rexml')
|
17
|
-
#
|
18
|
-
# # Prepare a SSAP query
|
19
|
-
# iso_ssap = Simple::SpectralAccess.new('http://pma.iso.vilspa.esa.es:8080/aio/jsp/siap.jsp',
|
20
|
-
# '53.084, -27.873', 10, {:format => 'votable'}, 30, 'rexml')
|
21
|
-
# # Prepare a cone search query
|
22
|
-
# mast_cone = Simple::ConeSearch.new('http://archive.stsci.edu/hst/search.php',
|
23
|
-
# 53.084, -27.873, 0.01, nil, 30, 'rexml')
|
24
|
-
#
|
25
|
-
# # Execute the queries asynchronously.
|
26
|
-
# Simple::QueryExecutor.new([nsa_siap, iso_ssap, mast_cone], objectifier).results().each do |query, votable|
|
27
|
-
# # Just to prove things are working, output the list of field UCDs for each table.
|
28
|
-
# puts "#{query.to_s()}..."
|
29
|
-
# votable.fields().each do |field|
|
30
|
-
# puts "#{field.id()}, #{field.name()}, #{field.ucd().value() if field.ucd() != nil}"
|
31
|
-
# end
|
32
|
-
#
|
33
|
-
# votable.rows().each do |row|
|
34
|
-
# puts row
|
35
|
-
# end
|
36
|
-
#
|
37
|
-
# puts "\n"
|
38
|
-
# end
|
39
|
-
class QueryExecutor
|
40
|
-
attr_accessor :queries, :converter
|
41
|
-
attr_reader :results
|
42
|
-
|
43
|
-
# [_queries_:]
|
44
|
-
# A list of valid query objects. Good examples of these are:
|
45
|
-
# * Simple::SpectralAccess (Simple Spectral Access Protocol queries)
|
46
|
-
# * Simple::ImageAccess (Simple Image Access Protocol queries)
|
47
|
-
# * Simple::ConeSearch (Simple Cone Search queries)
|
48
|
-
# [_converter_:]
|
49
|
-
# An anonymous subroutine that can be used to convert the result of a
|
50
|
-
# query into another form--often a VOTable::VOTable for our purposes.
|
51
|
-
# By default, it simply returns the completed query.
|
52
|
-
# [_abort_on_exeception_:]
|
53
|
-
# A flag which indicates whether or not if one query fails, the other queries
|
54
|
-
# should abort, too.
|
55
|
-
# Each query must also have a _fetch_ method. One way to get this is to mixin
|
56
|
-
# the Simple::HTTPGetQuery module.
|
57
|
-
def initialize(queries=[], converter=Proc.new{|qo| qo}, abort_on_exception=false)
|
58
|
-
@queries = queries
|
59
|
-
@converter = converter
|
60
|
-
Thread::abort_on_exception = abort_on_exception
|
61
|
-
|
62
|
-
@results = {}
|
63
|
-
begin_queries()
|
64
|
-
end
|
65
|
-
|
66
|
-
# Kick off each query into its own thread.
|
67
|
-
def begin_queries
|
68
|
-
threads = []
|
69
|
-
|
70
|
-
# Place each query in its own thread.
|
71
|
-
queries.each do |query|
|
72
|
-
threads << Thread.new(query){ |the_query|
|
73
|
-
the_query.fetch()
|
74
|
-
# Convert the query into something (maybe itself).
|
75
|
-
@results[the_query] = converter.call(the_query)
|
76
|
-
}
|
77
|
-
end
|
78
|
-
|
79
|
-
# Make sure each thread finishes before the program
|
80
|
-
# exits.
|
81
|
-
threads.each{ |thread| thread.join() }
|
82
|
-
end
|
83
|
-
end
|
84
|
-
|
85
|
-
# Mixin a generic GET-type HTTP query.
|
86
|
-
# Requires that the main object has a query_uri() method defined
|
87
|
-
# that returns a valid URI as a string.
|
88
|
-
module HTTPGetQuery
|
89
|
-
# Using an HTTP get, fetch the response that corresponds to the
|
90
|
-
# query parameters.
|
91
|
-
def fetch
|
92
|
-
uri = URI.parse(query_uri())
|
93
|
-
|
94
|
-
http = Net::HTTP.new(uri.host, uri.port)
|
95
|
-
http.read_timeout = query_timeout()
|
96
|
-
|
97
|
-
uri_params = required_parameters()
|
98
|
-
# Other parameters
|
99
|
-
parameters().each do |param, value|
|
100
|
-
uri_params.push(URI.escape("#{param.to_s().upcase()}=#{value}"))
|
101
|
-
end
|
102
|
-
|
103
|
-
res = http.start {|http|
|
104
|
-
http.get(uri.path + '?' + uri_params.join('&'))
|
105
|
-
}
|
106
|
-
self.response = res.body
|
107
|
-
end
|
108
|
-
|
109
|
-
# Convert to a form suitable for use in a URL. The required_parameters
|
110
|
-
# and parameters methods must exist.
|
111
|
-
def query_uri
|
112
|
-
uri_params = required_parameters()
|
113
|
-
|
114
|
-
# Other parameters
|
115
|
-
parameters().each do |param, value|
|
116
|
-
uri_params.push(URI.escape("#{param.to_s().upcase()}=#{value}"))
|
117
|
-
end
|
118
|
-
|
119
|
-
"#{uri()}?" + uri_params.join('&')
|
120
|
-
end
|
121
|
-
end
|
122
|
-
|
123
|
-
# Mixin a method that converts an XML VOTable into an object using
|
124
|
-
# a VOTable::TreeParsedVOTable.
|
125
|
-
module VOTableMarshaller
|
126
|
-
# Interpret the response into an object.
|
127
|
-
def marshall
|
128
|
-
tmp_file = Tempfile.new('response_') # Open a temporary file.
|
129
|
-
|
130
|
-
# Write the response.
|
131
|
-
tmp_file.write(response())
|
132
|
-
tmp_file.flush()
|
133
|
-
|
134
|
-
# Create the votable
|
135
|
-
votable = VORuby::VOTables::VOTable::TreeParsedVOTable.new(tmp_file.path(), parser())
|
136
|
-
|
137
|
-
tmp_file.close()
|
138
|
-
|
139
|
-
votable
|
140
|
-
end
|
141
|
-
end
|
142
|
-
|
143
|
-
# Represents a query to a cone search server.
|
144
|
-
# mast_cone = Simple::ConeSearch.new('http://archive.stsci.edu/hst/search.php',
|
145
|
-
# 53.084, -27.873, 0.01, nil, 30, 'rexml')
|
146
|
-
# mast_cone.fetch()
|
147
|
-
# votable = mast_cone.marshall()
|
148
|
-
class ConeSearch
|
149
|
-
include HTTPGetQuery
|
150
|
-
include VOTableMarshaller
|
151
|
-
|
152
|
-
attr_accessor :uri, :parameters, :query_timeout, :parser, :response
|
153
|
-
|
154
|
-
# [_uri_:]
|
155
|
-
# The base URI of the cone service.
|
156
|
-
# [_ra_:]
|
157
|
-
# The right ascension search center of the query. May be a floating
|
158
|
-
# point number (in degrees), or a full Simple::Parameters::RightAscension
|
159
|
-
# object.
|
160
|
-
# [_dec_:]
|
161
|
-
# The declination search center of the query. May be a floating
|
162
|
-
# point number (in degrees), or a full Simple::Parameters::Declination
|
163
|
-
# object.
|
164
|
-
# [_radius_:]
|
165
|
-
# The size of the search radius in degrees.
|
166
|
-
# [_parameters_:]
|
167
|
-
# A hash of extra parameters to pass to the cone service. Typically
|
168
|
-
# this list is empty, but some cone servers permit "extra" parameters
|
169
|
-
# to be used.
|
170
|
-
# [_:query_timeout_:]
|
171
|
-
# Period of time to wait until the remote host don't respond.
|
172
|
-
# [_parser_:]
|
173
|
-
# A string representing the underlying XML parser to use. Choices
|
174
|
-
# right now are 'rexml' and 'libxml'. rexml ships with Ruby, but is
|
175
|
-
# slow. libxml is much faster, but of course must be installed
|
176
|
-
# separately.
|
177
|
-
def initialize(uri, ra, dec, radius, parameters={}, query_timeout=30, parser='rexml')
|
178
|
-
parameters ||= {}
|
179
|
-
|
180
|
-
@uri = uri
|
181
|
-
ra(ra)
|
182
|
-
dec(dec)
|
183
|
-
radius(radius)
|
184
|
-
@parameters = parameters
|
185
|
-
@query_timeout = query_timeout
|
186
|
-
@parser = parser
|
187
|
-
|
188
|
-
@response = nil
|
189
|
-
end
|
190
|
-
|
191
|
-
# Set or get the value of the RA.
|
192
|
-
# Allows a lazy mode where a string representing
|
193
|
-
# the right ascension is passed in instead of a full
|
194
|
-
# Simple::Parameters::RightAscension object.
|
195
|
-
def ra(ra=nil)
|
196
|
-
if ra == nil
|
197
|
-
return @ra
|
198
|
-
else
|
199
|
-
if ra.instance_of?(Parameters::RightAscension)
|
200
|
-
@ra = ra
|
201
|
-
elsif ra.instance_of?(String) or ra.instance_of?(Float) or ra.instance_of?(Fixnum)
|
202
|
-
@ra = Parameters::RightAscension.new(ra)
|
203
|
-
else
|
204
|
-
raise "Right ascension must be RightAscension object or an interparable string."
|
205
|
-
end
|
206
|
-
end
|
207
|
-
end
|
208
|
-
|
209
|
-
# Set or get the value of the dec.
|
210
|
-
# Allows a lazy mode where a string representing
|
211
|
-
# the declination is passed in instead of a full
|
212
|
-
# Simple::Parameters::Declination object.
|
213
|
-
def dec(dec=nil)
|
214
|
-
if dec == nil
|
215
|
-
return @dec
|
216
|
-
else
|
217
|
-
if dec.instance_of?(Parameters::Declination)
|
218
|
-
@dec = dec
|
219
|
-
elsif dec.instance_of?(String) or dec.instance_of?(Float) or dec.instance_of?(Fixnum)
|
220
|
-
@dec = Parameters::Declination.new(dec)
|
221
|
-
else
|
222
|
-
raise "Declination must be a Declination object or an interparable string."
|
223
|
-
end
|
224
|
-
end
|
225
|
-
end
|
226
|
-
|
227
|
-
# Set or get the value of the search radius (in degrees).
|
228
|
-
# Allows a lazy mode where an integer representing the radius
|
229
|
-
# is passed in instead of a full
|
230
|
-
# Simple::Parameters::Radius object.
|
231
|
-
def radius(radius=nil)
|
232
|
-
if radius == nil
|
233
|
-
return @radius
|
234
|
-
else
|
235
|
-
if radius.instance_of?(Parameters::Radius)
|
236
|
-
@radius = radius
|
237
|
-
else
|
238
|
-
@radius = Parameters::Radius.new(radius)
|
239
|
-
end
|
240
|
-
end
|
241
|
-
end
|
242
|
-
|
243
|
-
# Retrieve the list of required parameters. In this case: ra, dec and radius.
|
244
|
-
def required_parameters
|
245
|
-
[@ra.to_s(), @dec.to_s(), @radius.to_s()]
|
246
|
-
end
|
247
|
-
|
248
|
-
# Convert the query into a valid URL.
|
249
|
-
def to_s
|
250
|
-
query_uri()
|
251
|
-
end
|
252
|
-
end
|
253
|
-
|
254
|
-
# Represents a query to single SSAP server.
|
255
|
-
# iso_ssap = Simple::SpectralAccess.new('http://pma.iso.vilspa.esa.es:8080/aio/jsp/siap.jsp',
|
256
|
-
# '53.084, -27.873', 10, {:format => 'votable'},
|
257
|
-
# 30, 'rexml')
|
258
|
-
# iso_ssap.fetch()
|
259
|
-
# votable = iso_ssap.marshall()
|
260
|
-
class SpectralAccess
|
261
|
-
include HTTPGetQuery
|
262
|
-
include VOTableMarshaller
|
263
|
-
|
264
|
-
attr_accessor :uri, :parameters, :query_timeout, :parser, :response
|
265
|
-
|
266
|
-
# [_uri_:]
|
267
|
-
# The base URI of the SSAP service.
|
268
|
-
# [_pos_:]
|
269
|
-
# The RA and dec position of the search center for the query. May be a string
|
270
|
-
# of the form '53.084, -27.873', or a full Simple::Parameters::Position
|
271
|
-
# object.
|
272
|
-
# [_size_:]
|
273
|
-
# The size (in degrees) of the search area.
|
274
|
-
# [_parameters_:]
|
275
|
-
# A hash of additional parameters to pass to the SSAP service.
|
276
|
-
# [_:query_timeout_:]
|
277
|
-
# Period of time to wait until the remote host don't respond.
|
278
|
-
# [_parser_:]
|
279
|
-
# A string representing the underlying XML parser to use. Choices
|
280
|
-
# right now are 'rexml' and 'libxml'. rexml ships with Ruby, but is
|
281
|
-
# slow. libxml is much faster, but of course must be installed
|
282
|
-
# separately.
|
283
|
-
def initialize(uri, pos, size, parameters={}, query_timeout=30, parser='rexml')
|
284
|
-
parameters ||= {}
|
285
|
-
|
286
|
-
@uri = uri
|
287
|
-
pos(pos)
|
288
|
-
size(size)
|
289
|
-
@parameters = parameters
|
290
|
-
@query_timeout = query_timeout
|
291
|
-
@parser = parser
|
292
|
-
|
293
|
-
@response = nil
|
294
|
-
end
|
295
|
-
|
296
|
-
# Set or get the value of the position.
|
297
|
-
# Allows a lazy mode where a string representing
|
298
|
-
# the position like '53.084, -27.873'is passed in
|
299
|
-
# instead of a full Position object.
|
300
|
-
def pos(pos=nil)
|
301
|
-
if pos == nil
|
302
|
-
return @pos
|
303
|
-
else
|
304
|
-
# Position. Allow a lazy mode where a string representing
|
305
|
-
# the position is passed in instead of a full Position object.
|
306
|
-
if pos.instance_of?(Parameters::Position)
|
307
|
-
@pos = pos
|
308
|
-
elsif pos.instance_of?(String)
|
309
|
-
ra_dec, dec_dec = pos.split(/\s*,\s*/)
|
310
|
-
@pos = Parameters::Position.new(ra_dec, dec_dec)
|
311
|
-
else
|
312
|
-
raise "Position must be a Position object or a string like " +
|
313
|
-
"'ra_in_decimal_degrees, dec_in_decimal_degrees'"
|
314
|
-
end
|
315
|
-
end
|
316
|
-
end
|
317
|
-
|
318
|
-
# Set or get the value of the angular size.
|
319
|
-
# Allows a lazy mode where a floating point number representing
|
320
|
-
# the size is passed in instead of a full Size object.
|
321
|
-
def size(size=nil)
|
322
|
-
if size == nil
|
323
|
-
return @size
|
324
|
-
else
|
325
|
-
if size.instance_of?(Parameters::Size)
|
326
|
-
@size = size
|
327
|
-
elsif size.instance_of?(String)
|
328
|
-
ra_width, dec_width = size.split(/\s*,\s*/)
|
329
|
-
@size = Parameters::Size.new(ra_width, dec_width)
|
330
|
-
elsif size.instance_of?(Float) or size.instance_of?(Fixnum)
|
331
|
-
@size = Parameters::Size.new(size.to_f())
|
332
|
-
else
|
333
|
-
raise "Size must be a Size object or a string like " +
|
334
|
-
"'ra_width_in_decimal_degrees, dec_width_in_decimal_degrees'"
|
335
|
-
end
|
336
|
-
end
|
337
|
-
end
|
338
|
-
|
339
|
-
# Retrieve the list of required parameters. In this case: pos and size.
|
340
|
-
def required_parameters
|
341
|
-
[@pos.to_s(), @size.to_s()]
|
342
|
-
end
|
343
|
-
|
344
|
-
# Convert the query into a valid URL.
|
345
|
-
def to_s
|
346
|
-
query_uri()
|
347
|
-
end
|
348
|
-
end
|
349
|
-
|
350
|
-
# Represents a query to single SIAP server.
|
351
|
-
# nsa_siap = Simple::ImageAccess.new('http://archive.noao.edu/nvo/sim/voquery.php',
|
352
|
-
# '23:00:00, 2:00:00', 7, nil, 30, 'rexml')
|
353
|
-
# nsa_siap.fetch()
|
354
|
-
# votable = nsa_siap.marshall()
|
355
|
-
class ImageAccess
|
356
|
-
include HTTPGetQuery
|
357
|
-
include VOTableMarshaller
|
358
|
-
|
359
|
-
attr_accessor :uri, :parameters, :query_timeout, :parser, :response
|
360
|
-
|
361
|
-
# [_uri_:]
|
362
|
-
# The base URI of the SIAP service.
|
363
|
-
# [_pos_:]
|
364
|
-
# The RA and dec position of the search center for the query. May be a string
|
365
|
-
# of the form '53.084, -27.873', or a full Simple::Parameters::Position
|
366
|
-
# object.
|
367
|
-
# [_size_:]
|
368
|
-
# The size (in degrees) of the search area.
|
369
|
-
# [_parameters_:]
|
370
|
-
# A hash of additional parameters to pass to the SIAP service.
|
371
|
-
# [_:query_timeout_:]
|
372
|
-
# Period of time to wait until the remote host don't respond.
|
373
|
-
# [_parser_:]
|
374
|
-
# A string representing the underlying XML parser to use. Choices
|
375
|
-
# right now are 'rexml' and 'libxml'. rexml ships with Ruby, but is
|
376
|
-
# slow. libxml is much faster, but of course must be installed
|
377
|
-
# separately.
|
378
|
-
def initialize(uri, pos, size, parameters={}, query_timeout=30, parser='rexml')
|
379
|
-
parameters ||= {}
|
380
|
-
|
381
|
-
@uri = uri
|
382
|
-
pos(pos)
|
383
|
-
size(size)
|
384
|
-
@parameters = parameters
|
385
|
-
@query_timeout = query_timeout
|
386
|
-
@parser = parser
|
387
|
-
|
388
|
-
@response = nil
|
389
|
-
end
|
390
|
-
|
391
|
-
# Set or get the value of the position.
|
392
|
-
# Allows a lazy mode where a string representing
|
393
|
-
# the position like '53.084, -27.873'is passed in
|
394
|
-
# instead of a full Position object.
|
395
|
-
def pos(pos=nil)
|
396
|
-
if pos == nil
|
397
|
-
return @pos
|
398
|
-
else
|
399
|
-
# Position. Allow a lazy mode where a string representing
|
400
|
-
# the position is passed in instead of a full Position object.
|
401
|
-
if pos.instance_of?(Parameters::Position)
|
402
|
-
@pos = pos
|
403
|
-
elsif pos.instance_of?(String)
|
404
|
-
ra_dec, dec_dec = pos.split(/\s*,\s*/)
|
405
|
-
@pos = Parameters::Position.new(ra_dec, dec_dec)
|
406
|
-
else
|
407
|
-
raise "Position must be a Position object or a string like " +
|
408
|
-
"'ra_in_decimal_degrees, dec_in_decimal_degrees'"
|
409
|
-
end
|
410
|
-
end
|
411
|
-
end
|
412
|
-
|
413
|
-
# Set or get the value of the angular size.
|
414
|
-
# Allows a lazy mode where a floating point number representing
|
415
|
-
# the size is passed in instead of a full Size object.
|
416
|
-
def size(size=nil)
|
417
|
-
if size == nil
|
418
|
-
return @size
|
419
|
-
else
|
420
|
-
if size.instance_of?(Parameters::Size)
|
421
|
-
@size = size
|
422
|
-
elsif size.instance_of?(String)
|
423
|
-
ra_width, dec_width = size.split(/\s*,\s*/)
|
424
|
-
@size = Parameters::Size.new(ra_width, dec_width)
|
425
|
-
elsif size.instance_of?(Float) or size.instance_of?(Fixnum)
|
426
|
-
@size = Parameters::Size.new(size.to_f())
|
427
|
-
else
|
428
|
-
raise "Size must be a Size object or a string like " +
|
429
|
-
"'ra_width_in_decimal_degrees, dec_width_in_decimal_degrees'"
|
430
|
-
end
|
431
|
-
end
|
432
|
-
end
|
433
|
-
|
434
|
-
# Retrieve the list of required parameters. In this case: pos and size.
|
435
|
-
def required_parameters
|
436
|
-
[@pos.to_s(), @size.to_s()]
|
437
|
-
end
|
438
|
-
|
439
|
-
# Convert the query into a valid URL.
|
440
|
-
def to_s
|
441
|
-
query_uri()
|
442
|
-
end
|
443
|
-
end
|
444
|
-
|
445
|
-
end
|
446
|
-
end
|