Class | GeoRuby::SimpleFeatures::Point |
In: |
lib/geo_ruby/simple_features/point.rb
|
Parent: | Geometry |
Represents a point. It is in 3D if the Z coordinate is not nil.
x | -> | lon |
if you prefer calling the coordinates lat and lon (or lng, for GeoKit compatibility) | ||
x | -> | lng |
y | -> | lat |
from_x_y | -> | from_lon_lat |
from_x_y_z | -> | from_lon_lat_z |
from_x_y_m | -> | from_lon_lat_m |
from_x_y_z_m | -> | from_lon_lat_z_m |
m | [RW] | |
x | [RW] | |
y | [RW] | |
z | [RW] |
Ellipsoidal distance in m using Vincenty‘s formula. Lifted entirely from Chris Veness‘s code at www.movable-type.co.uk/scripts/LatLongVincenty.html and adapted for Ruby. Assumes the x and y are the lon and lat in degrees. a is the semi-major axis (equatorial radius) of the ellipsoid b is the semi-minor axis (polar radius) of the ellipsoid Their values by default are set to the ones of the WGS84 ellipsoid
Return the distance between the 2D points (ie taking care only of the x and y coordinates), assuming the points are in projected coordinates. Euclidian distance in whatever unit the x and y ordinates are.