Class: GeoRuby::GeorssParser
- Inherits:
-
Object
- Object
- GeoRuby::GeorssParser
- Includes:
- SimpleFeatures
- Defined in:
- lib/geo_ruby/georss.rb
Overview
Parses GeoRSS strings You can also use directly the static method Geometry.from_georss
Constant Summary collapse
- GEORSS_REGEX =
/=['"]([^"']*)['"]/
Constants included from SimpleFeatures
SimpleFeatures::DEFAULT_SRID, SimpleFeatures::GEORSS_NS, SimpleFeatures::GML_NS, SimpleFeatures::KML_NS, SimpleFeatures::M_MASK, SimpleFeatures::SRID_MASK, SimpleFeatures::W3CGEO_NS, SimpleFeatures::Z_MASK
Instance Attribute Summary collapse
-
#geometry ⇒ Object
readonly
Returns the value of attribute geometry.
-
#georss_tags ⇒ Object
readonly
Returns the value of attribute georss_tags.
Instance Method Summary collapse
-
#parse(georss, with_tags = false) ⇒ Object
Parses the georss geometry passed as argument and notifies the factory of events the parser assumes.
Instance Attribute Details
#geometry ⇒ Object (readonly)
Returns the value of attribute geometry.
15 16 17 |
# File 'lib/geo_ruby/georss.rb', line 15 def geometry @geometry end |
#georss_tags ⇒ Object (readonly)
Returns the value of attribute georss_tags.
15 16 17 |
# File 'lib/geo_ruby/georss.rb', line 15 def @georss_tags end |
Instance Method Details
#parse(georss, with_tags = false) ⇒ Object
Parses the georss geometry passed as argument and notifies the factory of events the parser assumes
21 22 23 24 25 |
# File 'lib/geo_ruby/georss.rb', line 21 def parse(georss, = false) @geometry = nil @georss_tags = GeorssTags.new parse_geometry(georss, ) end |