Edit page in Livemark
(2023-06-06 13:09)

Geojson Field

The field contains a JSON object according to GeoJSON or TopoJSON spec. Read more in Table Schema Standard.

Example

from frictionless import Schema, extract, fields

data = [['name'], ['{"geometry": null, "type": "Feature", "properties": {"k": "v"}}']]
rows = extract(data, schema=Schema(fields=[fields.GeojsonField(name='name')]))
print(rows)
{'memory': [{'name': {'geometry': None, 'type': 'Feature', 'properties': {'k': 'v'}}}]}

Reference

fields.GeojsonField (class)

fields.GeojsonField (class)

Field representation

Signature

(*, name: str, title: Optional[str] = None, description: Optional[str] = None, format: str = default, missing_values: List[str] = NOTHING, constraints: dict = NOTHING, rdf_type: Optional[str] = None, example: Optional[str] = None, schema: Optional[Schema] = None) -> None

Parameters

  • name (str)
  • title (Optional[str])
  • description (Optional[str])
  • format (str)
  • missing_values (List[str])
  • constraints (dict)
  • rdf_type (Optional[str])
  • example (Optional[str])
  • schema (Optional[Schema])

fields.geojsonField.name (property)

Signature

str

fields.geojsonField.type (property)

Signature

ClassVar[str]

fields.geojsonField.title (property)

Signature

Optional[str]

fields.geojsonField.description (property)

Signature

Optional[str]

fields.geojsonField.format (property)

Signature

str

fields.geojsonField.missing_values (property)

Signature

List[str]

fields.geojsonField.constraints (property)

Signature

dict

fields.geojsonField.rdf_type (property)

Signature

Optional[str]

fields.geojsonField.example (property)

Signature

Optional[str]

fields.geojsonField.schema (property)

Signature

Optional[Schema]

fields.geojsonField.builtin (property)

Signature

ClassVar[bool]

fields.geojsonField.supported_constraints (property)

Signature

ClassVar[List[str]]