Class | GeoRuby::SimpleFeatures::Geometry |
In: |
lib/geo_ruby/simple_features/geometry.rb
|
Parent: | Object |
Root of all geometric data classes. Objects of class Geometry should not be instantiated.
srid | [R] | SRID of the geometry |
with_m | [RW] | Flag indicating if the m ordinate of the geometry is meaningful |
with_z | [RW] | Flag indicating if the z ordinate of the geometry is meaningful |
Creates a geometry based on a EWKB string. The actual class returned depends of the content of the string passed as argument. Since WKB strings are a subset of EWKB, they are also valid.
Creates a geometry based on a EWKT string. Since WKT strings are a subset of EWKT, they are also valid.
sends back an array: The first element is the goemetry based on the GeoRSS string passed as argument. The second one is the GeoRSSTags (found only with the Simple format)
Sends back a geometry from a KML encoded geometry string. Limitations : Only supports points, linestrings and polygons (no collection for now). Addapted from Pramukta‘s code
Outputs the geometry as an EWKB string. The allow_srid, allow_z and allow_m arguments allow the output to include srid, z and m respectively if they are present in the geometry. If these arguments are set to false, srid, z and m are not included, even if they are present in the geometry. By default, the output string contains all the information in the object.
Outputs the geometry in georss format. Assumes the geometries are in latlon format, with x as lon and y as lat. Pass the :dialect option to swhit format. Possible values are: :simple (default), :w3cgeo and :gml.
Outputs the geometry as a HexEWKB string. It is almost the same as a WKB string, except that each byte of a WKB string is replaced by its hexadecimal 2-character representation in a HexEWKB string.