Name

vfplot-geojson — vfplot GeoJSON (domain) file format

DESCRIPTION

The GeoJSON file format is used by the vfplot (1) program for representing the extent of the vector field to be plotted.

GeoJSON is a widely used JSON-based format for describing geometric and geographic features; it is codified in RFC-7946. and we refer the reader to that document for the details of layout and so-on. Here we mention only the additional constraints that are needed for a GeoJSON file to be used as domain (the extend of vector field) by the vfplot (1) program.

The extent of the vector field to be plotted will be taken from the first Polygon or MultiPolygon object found in the file, and such will be identified, as per the RFC, by the presence of the "type" entry in an object with this value. So

{
  "type": "Polygon",
  "coordinates": [
    [
      [0, 0],
      [60, 0],
      [60, 60],
      [0, 60],
      [0, 0]
    ]
  ]
}

is valid GeoJSON, and suitable as a vfplot (1) domain, describing a square.

NOTES

  • The coordinates of the parts of a polygon obey the right-hand rule: the exterior of the bounded region is on the right-hand side as one travels in coordinate order. So if the outermost part of a polygon is counter-clockwise, then the interior is finite in extent; if clockwise then infinite. The vfplot (1) program can accept only bounded regions as domains (for obvious reasons), so the outer part of polygons must be counter-clockwise.

  • One may find that some online resources will object to coordinates which are infeasible as coordinates of WSG 84 (latitudes greater that 90 and so-on), on the grounds that GeoJSON coordinates are required to be WSG 84, but this is mistaken, section 4 of RFC-7946 is quite clear that other coordinate systems may be used: The coordinate reference system for all GeoJSON coordinates is a geographic coordinate reference system, using the World Geodetic System 1984 (WGS 84) datum, with longitude and latitude units of decimal degrees ... However, where all involved parties have a prior arrangement, alternative coordinate reference systems can be used without risk of data being misinterpreted.

    The vfplot (1) program treats coordinates as projected (so in "map space") for the purpose of plotting, so places no such restrictions.

  • The optional bounding box entry in GeoJSON is ignored by the program.

AUTHOR

J.J. Green ()

SEE ALSO

vfplot (1) .