module STAC
Gem namespace.
Provides some utility methods.
Constants
- SPEC_VERSION
- VERSION
Attributes
default_http_client[RW]
Public Class Methods
from_file(path)
click to toggle source
Returns a STAC object resolved from the given file path.
# File lib/stac.rb, line 20 def from_file(path) from_url("file://#{File.expand_path(path)}") end
from_url(url, http_client: default_http_client)
click to toggle source
Returns a STAC object resolved from the given URL.
When the resolved object does not have rel=“self” link, adds a rel=“self” link with the give url.
# File lib/stac.rb, line 27 def from_url(url, http_client: default_http_client) object = ObjectResolver.new(http_client: http_client).resolve(url) object.self_href = url unless object.self_href object end