Skip to content
Back to skills

Geojson Ogc Knowledge Patch

ASecurity

GeoJSON / OGC JSON-FG

  • 25 stars
  • 0 votes
  • 0 copies
  • 5 views
  • Added September 5, 2026
developmentgoshelltestinggitapi

Works with

  • cli
  • api

Security analysis

A100/100

Pro scans all 6 files and shows the line behind each finding

Scanned December 1, 2026

npx -y skills add Nevaberry/nevaberry-plugins --skill geojson-ogc-knowledge-patch --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Geojson Ogc Knowledge Patch?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Geojson Ogc Knowledge Patch
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/nevaberry-geojson-ogc-knowledge-patch-nevaberry-plugins/badge)](https://www.skillsdirectory.com/skills/nevaberry-geojson-ogc-knowledge-patch-nevaberry-plugins)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: geojson-ogc-knowledge-patch
description: GeoJSON / OGC JSON-FG
version: "OGC JSON-FG 1.0.0"
license: MIT
metadata:
  author: Nevaberry
---


# GeoJSON and OGC JSON-FG

Load this skill when encoding or validating JSON-FG objects, choosing a CRS,
working with measures or extended geometries, describing feature schemas,
or implementing GeoJSON profiles and Web API negotiation. It also provides
GeoJSON fallback, bounding-box, and URI conversion guidance.

## Reference index

| Reference | Topics |
| --- | --- |
| [core-objects.md](references/core-objects.md) | Root declarations, validation, primary geometry, time, readers, GeoJSON fallback, polar boxes, defining members, and geo: URIs |
| [crs-and-measures.md](references/crs-and-measures.md) | CRS scope, axis order, references, epochs, measure inheritance, and feature place constraints |
| [extended-geometries.md](references/extended-geometries.md) | Polyhedra, prisms, circular strings, curve and surface aggregates, and converter support |
| [schemas-and-api.md](references/schemas-and-api.md) | Feature types, dimensions, logical schemas, community extensions, profiles, API dependencies, and validation tools |

## Schema compatibility checks

### Measures inside feature place

Annex B.3 rejects `measures` inside a feature's `place` object. Core 8.4.5
looks for that member on `place` when deciding whether a standard geometry
type can use CRS84 or CRS84h there.

For a standard GeoJSON geometry in a feature's `place`, declare `measures` on the feature or collection and use a CRS other than CRS84 or CRS84h. A projected CRS is one option. See
[CRS and measures](references/crs-and-measures.md) for the example and scope rules.

### Mixed or unknown geometry dimensions

Omit `geometryDimension` for a collection with mixed or unknown dimensions
to pass Annex B.2. The building-block description mentions null, which the
collection schema rejects.

### Root schema and time validation

Use a JSON Schema Draft 2020-12 validator with the unversioned root schema ID
`https://schemas.opengis.net/json-fg/jsonfg-root-object.json`.
An object-valued `time` requires at least one member. Date and timestamp
patterns do not replace the calendar-validity checks needed in conformance tests.

## Media type compatibility

Serve JSON-FG as `application/geo+json`. Identify its profile through
`rel="profile"` in a document link or HTTP `Link` header, using
`http://www.opengis.net/def/profile/OGC/0/` followed by the profile name.

The draft media types `application/fg+json` and `application/vnd.ogc.fg+json`
can still be supported for backward compatibility.

## Root objects and conformance

A root FeatureCollection, Feature, or standalone geometry must declare
`conformsTo` as an array containing
`http://www.opengis.net/spec/json-fg-1/1.0/conf/core`.
Nested JSON-FG objects omit the member.

Add a URI with the same prefix and the appropriate suffix for each class used:
`polyhedra`, `prisms`, `circular-arcs`, `measures`, or `types-schemas`.
A Core document must satisfy the root-object JSON Schema; readers and writers
can leave validation to conformance testing.

OGC Simple Features Access Part 1 validity rules also apply to standard geometry
types, including those embedded as curve components or prism bases.

## Choose the primary geometry

Encode ordinary unmeasured GeoJSON geometries in CRS84 or CRS84h in `geometry`,
with `place` omitted or null. Use `place` for another CRS, an extended geometry
type, or a measured geometry.

When using `place`, set `geometry` to null or a distinct WGS 84 fallback free of
JSON-FG extensions such as `coordRefSys` and `measures`.
Each feature's `geometry` and `place` must have a consistent coordinate dimension
within that geometry. `GeometryCollection` groups standard GeoJSON geometry
types in a shared CRS.

When height or depth matters, interpret a two-coordinate position in the
GeoJSON fallback as being at local ground or sea level.

## Coordinate reference systems

Declare `coordRefSys` only at the root, where it applies to `place` and JSON-FG
geometries in `properties`, including those in a collection. Follow the declared
CRS's axis order. Without a declaration, use CRS84 for two spatial coordinates
or CRS84h for three, excluding M from the count.

`coordRefSys` accepts a URI, a `Reference` object with `href` and an optional
decimal-year `epoch` for dynamic coordinates, or an array of such references
for an ad hoc compound CRS.

For a local CRS with an unknown definition, use
`http://www.opengis.net/def/crs/OGC/0/Engineering2D` or
`http://www.opengis.net/def/crs/OGC/0/Engineering3D`.

## Measures and time

The nearest `measures` object on the geometry, feature, or collection controls
whether every position appends M after the spatial axes. It requires Boolean
`enabled`, with optional `unit` and `description` when enabled. Without a
declaration, measures are disabled. The feature `place` schema constraint above
still applies.

Geometries directly embedded in `base` or `geometries` inherit the parent scope
without their own member. Declare `measures` conformance whenever any JSON-FG
object contains a `measures` member, even with `enabled: false`.

`time` can be absent, null, or an extensible object containing an RFC 3339 `date`,
a UTC `timestamp` with `Z`, and/or a closed two-element `interval`. Interval
endpoints have matching granularity, start at or before end, and `".."` for an
unbounded endpoint.

When time members occur together, their values must intersect at their respective
granularities. Clients should prefer `interval` when present.

## Feature types and schemas

Under `types-schemas`, a standalone feature needs a string `featureType`.
A collection must declare its shared code or supply a code on every feature.

For homogeneous primary geometry dimensions, declare `geometryDimension` as
`0` for points, `1` for curves, `2` for surfaces, or `3` for solids and prisms.
Use each feature's non-null `place` and otherwise its `geometry`.

At the root, `featureSchema` takes a single schema URI if all `featureType` values
agree or an object mapping feature type codes to schema URIs. These schemas
describe the logical feature model under OGC API Features Part 5. A `describedby`
link can point to a downloadable JSON Schema for validating the encoded document.

## Extended geometry selection

| Geometry | Quick reference |
| --- | --- |
| `Polyhedron` | In a 3D CRS, a nonempty array of watertight MultiPolygon-shaped shells with closed rings and XYZ or XYZM positions; exterior shell first |
| `MultiPolyhedron` | Each coordinates entry is a valid polyhedron; volumes can overlap |
| `Prism` | Extrudes a valid 2D XY or XYM base in a 3D CRS; optional `lower` is at or below `upper`, both in the third axis's valid coordinate range |
| `MultiPrism` | Complete `Prism` objects in `prisms`, with shared metadata on the enclosing object |
| `CircularString` | 3, 5, 7, 9, or 11 positions for one to five connected arcs; XY determines the curve, with Z and M linearly interpolated |
| `CompoundCurve` | `LineString` and `CircularString` components joined end-to-end in `geometries` |
| `CurvePolygon` | Closed `LineString`, `CircularString`, or `CompoundCurve` rings in `geometries`, exterior first |
| `MultiCurve` | `LineString`, `CircularString`, or `CompoundCurve` objects in `geometries` |
| `MultiSurface` | `Polygon` or `CurvePolygon` objects in `geometries` |

See [extended geometries](references/extended-geometries.md) for shell orientation,
void constraints, prism base types, arc constraints, and encoding examples.

## Profiles and Web APIs

| Profile | Behavior |
| --- | --- |
| `rfc7946` | Omits `place` and JSON-FG conformance URIs; a prior arrangement permits alternate-CRS `geometry`, with optional legacy `crs` metadata |
| `jsonfg` | Satisfies JSON-FG Core |
| `jsonfg-plus` | Satisfies Core and provides non-null `geometry` for every feature with non-null `place` |

A Web API conforming to the JSON-FG API class supports `profile` on
GeoJSON-producing GET and HEAD operations, with at least `rfc7946` and `jsonfg`.
The recommended default is `rfc7946`.

The JSON-FG in Web APIs class
(`http://www.opengis.net/spec/json-fg-1/1.0/conf/api`) depends on the Profile
Query Parameter class in OGC API Features Part 5 and indirectly on the GeoJSON
Profiles class.

## Reader and GeoJSON compatibility

Readers should ignore unknown JSON-FG members and time encodings and map unknown
`place` geometry types to null. For GeoJSON readers exposing only standard feature
members, also include values such as `time`, `place`, `coordRefSys`, `measures`,
and `featureType` in `properties`.

For a full polar cap, use west/east limits of `-180` and `180`, with north at `90`
or south at `-90`. A slice touching a pole keeps its own longitude limits.
Convert a `geo:` URI to a Point only when `u` is absent or zero, keeping altitude
as the third coordinate.

Reserve `features` for FeatureCollections, `geometry` and `properties` for
Features, and `coordinates` and `geometries` for Geometry objects. Reject these
defining members when directly on a GeoJSON object of the wrong type.

## Community schemas and implementation tools

Copy affected schemas for community extensions, give each a community-controlled
`$id` that serves its schema over HTTP GET, and use `$ref` for unchanged schemas.
See [schemas and API](references/schemas-and-api.md) for the `GeodesicString`
definition and the `oneOf` and custom fallback adjustments.

The JSON-FG 0.2 implementation list identifies `ogc-checker` for JSON Schema
validation plus additional tests, and `val3dity` for polyhedron geometry checks.
It identifies `cityjson2jsonfg` for CityJSON conversion with polyhedron support,
lists partial polyhedron support for GDAL's JSON-FG vector driver, and marks
prism support as unavailable for both converters. See the references for details.

Files in this skill

  • SKILL.md7.7 KB
  • coverage.json325 B
  • references/core-objects.md2.1 KB
  • references/crs-and-measures.md2.9 KB
  • references/extended-geometries.md2.8 KB
  • references/schemas-and-api.md2.5 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in development →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.