line
ReQL command: line
Command syntax
r.line([lon1, lat1], [lon2, lat2], ...) → line r.line(point1, point2, ...) → line
Description
Construct a geometry object of type Line. The line can be specified in one of two ways:
- Two or more two-item arrays, specifying latitude and longitude numbers of the line’s vertices;
- Two or more Point objects specifying the line’s vertices.
Longitude (−180 to 180) and latitude (−90 to 90) of vertices are plotted on a perfect sphere. See Geospatial support for more information on ReQL’s coordinate system.
Example: Define a line.
r.table("geo").insert( r.hashMap("id", 101) .with("route", r.line(r.array(-122.423246, 37.779388), r.array(-121.88642, 37.329898))) ).run(conn);
Related commands
Get more help
Couldn't find what you were looking for?
- Ask a question on Stack Overflow
- Chat with us and our community on Slack
- Talk to the team on IRC on #rethinkdb@freenode.net — via Webchat
- Ping @rethinkdb on Twitter
- Post an issue on the documentation issue tracker on GitHub
© RethinkDB contributors
Licensed under the Creative Commons Attribution-ShareAlike 3.0 Unported License.
https://rethinkdb.com/api/java/line/