GeomSf

Simple-features geometry: already-projected GeoJSON Geometry JSON strings in a data column. Point/line/polygon families (incl. GeometryCollection of one family) with even-odd holes; use coord_sf for fixed-aspect (CRS reproject deferred).

Defaults

geom
sf
default stat
sf
default position
identity
params type
SfParams

Svelte component

import { GGPlot, GeomSf } from "@ggsvelte/svelte";

<GGPlot data={rows} aes={{ x: "x", y: "y" }}>
  <GeomSf />
</GGPlot>

JSON layer

{
  "geom": "sf",
  "stat": "sf"
}

Params

geometry

string

Name of the data column holding GeoJSON Geometry JSON strings. Default "geometry". Already-projected coordinates only.

alpha

number

Mark opacity. Must be between 0 and 1 (inclusive). Default 1.

linewidth

number

Stroke width in px for lines/polygon outlines. Must be greater than 0.

size

number

Point radius in px when geometries are Point/MultiPoint.

fillPaint

GradientPaint

Within-mark gradient fill paint (polygon family; not a data scale).

strokePaint

GradientPaint

Within-mark gradient stroke paint (not a data scale).

glow

GlowSpec

Bounded within-mark glow treatment (not theme decoration).

Allowed stats

  • sf default

Allowed positions

Examples

← All geoms · Getting started