LanguageValues and typesStandard typesGeospatial
MultiPoint
On this page
A set of points, at least one, that belong together.
Use it for the branches of one chain, held as one value. For one location, use Point. To hold each with its own data, use a FeatureCollection or your own records.
Shape
| Field | Type | Required? |
|---|---|---|
points |
List<Point> |
Yes |
Its parts keep these rules, and a value that breaks one fails with the rule's name:
altitudes_agree: every position with an altitude, or none
Example
MultiPoint { points: [ Point { latitude: 51.5072 longitude: -0.1276 altitude: none }, Point { latitude: 48.8566 longitude: 2.3522 altitude: none } ]}
Good to know
==tells you whether two are the same.<andlist.sort_bydon't take it, so sort by one of its parts instead.
In JSON
A GeoJSON geometry, with each position's longitude first, in a request, a response or json.write:
{"type":"MultiPoint","coordinates":[[-0.1276,51.5072],[2.3522,48.8566]]}{"type":"MultiPoint","coordinates":[[0,0]]}
Details
Text form, storage, how it is shown, and operations
MultiPoint is in the group Geospatial, and has been in Jadpo since 0.1.0.
Text form
It has no single text form, so text.from and text.parse don't take it.
How it is stored
It is stored in one column named for the field, of type geography. {"type":"MultiPoint","coordinates":[[0,0]]} is stored as 'SRID=4326;MULTIPOINT (0 0)'::geography.
How it is shown to people
text.format(value, locale:) shows it to people in their locale.
With locale: Locale.en_gb:
| Value | Shown |
|---|---|
{"type":"MultiPoint","coordinates":[[-0.1276,51.5072],[2.3522,48.8566]]} |
(51.5072° N, 0.1276° W; 48.8566° N, 2.3522° E) |
{"type":"MultiPoint","coordinates":[[0,0]]} |
(0°, 0°) |
Operations
geo.bounding_box(shape: T) -> BoundingBox: The smallest box of parallels and meridians holding the shape, an edge's highest or lowest point counted, across the antimeridian when that box is narrower; a shape holding a pole runs from -180 to 180.geo.centroid(shape: T) -> Point: The shape's centre on the sphere, as PostGIS'sST_Centroid(x, false)finds it: each point a unit vector, weighted by area, length or count by the shape's kind, summed, and back to latitude and longitude. It may lie outside a concave polygon.geo.contains(a: T, b: U) -> Bool: Whether no point ofblies outsidea, edges included.amay be aBoundingBox, whose sides are compared directly, or aCircle, holding the points within its radius of its centre.geo.intersects(a: T, b: U) -> Bool: Whether the two share at least one point, edges included.geo.to_wkt(shape: T) -> Text: The shape as WKT, longitude first, as PostGIS'sST_AsTextwrites it:POINT(-0.1276 51.5072),POINT Z (-0.1276 51.5072 35)with an altitude, each ring in the order it holds its points.geo.within(a: T, b: U, distance: Length?) -> Bool:geo.contains(b, a); or, withdistance:, whether two points are at most that far apart, asgeo.distancemeasures them.
It also takes text.format, json.read, json.write and ==. How every standard type behaves says how they work.
Markdown for agents: /docs/types/type-multi-point.md.Built from Jadpo main at aee2e8f.