geojsonld

package module
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 22, 2021 License: BSD-3-Clause Imports: 8 Imported by: 6

README

go-geojson-ld

Go package for converting GeoJSON Feature records in to GeoJSON-LD records.

Documentation

Go Reference

Example

package main

import (
	"context"
	"flag"
	"fmt"
	"github.com/sfomuseum/go-geojsonld"
	"os"
)

func main() {

	flag.Parse()

	ctx := context.Background()

	for _, path := range flag.Args() {
	
		fh, _ := os.Open(path)
		
		body, _ := geojsonld.AsGeoJSONLDWithReader(ctx, fh)
		fmt.Println(string(body))
	}
}

See also

Documentation

Overview

package geojsonld provides methods for converting GeoJSON features in to GeoJSON-LD features.

Index

Constants

View Source
const NS_GEOJSON string = "https://purl.org/geojson/vocab#"

NS_GEOJSON is the default namespace for GeoJSON-LD

Variables

This section is empty.

Functions

func AsGeoJSONLD

func AsGeoJSONLD(ctx context.Context, body []byte) ([]byte, error)

AsGeoJSONLDWithReader convert GeoJSON Feature data contained in body in to GeoJSON-LD.

func AsGeoJSONLDWithReader

func AsGeoJSONLDWithReader(ctx context.Context, r io.Reader) ([]byte, error)

AsGeoJSONLDWithReader convert GeoJSON Feature data contained in r in to GeoJSON-LD.

func DefaultGeoJSONLDContext

func DefaultGeoJSONLDContext() map[string]interface{}

DefaultGeoJSONLDContext return a dictionary mapping GeoJSON property keys to their GeoJSON-LD @context equivalents.

Types

This section is empty.

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL