Class: NSWTopo::GeoJSON::Point
- Inherits:
-
Object
- Object
- NSWTopo::GeoJSON::Point
- Defined in:
- lib/nswtopo/gis/geojson/point.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.[](coordinates, properties = nil, &block) ⇒ Object
4 5 6 7 8 9 |
# File 'lib/nswtopo/gis/geojson/point.rb', line 4 def self.[](coordinates, properties = nil, &block) new(coordinates, properties) do @coordinates = Vector[*@coordinates] unless Vector === @coordinates block.call self if block_given? end end |
Instance Method Details
#bounds ⇒ Object
11 12 13 |
# File 'lib/nswtopo/gis/geojson/point.rb', line 11 def bounds zip.map(&:minmax) end |
#empty? ⇒ Boolean
15 16 17 |
# File 'lib/nswtopo/gis/geojson/point.rb', line 15 def empty? false end |
#rotate_by_degrees(angle) ⇒ Object
19 20 21 |
# File 'lib/nswtopo/gis/geojson/point.rb', line 19 def rotate_by_degrees(angle) Point.new @coordinates.rotate_by_degrees(angle), @properties end |