dataconv

package
v0.0.0-...-e9a8072 Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2024 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrSkip = errors.New("skip")

Functions

func ConvertBorder

func ConvertBorder(fc *geojson.FeatureCollection, id string) (any, error)

ConvertBorder は国土数値情報を基に作成された行政界GeoJSONデータをPLATEAU VIEW用のCZMLに変換します。

func ConvertLandmark

func ConvertLandmark(fc *geojson.FeatureCollection, id string) (any, error)

ConvertLandmark は国土基本情報を基に作成されたランドマーク・鉄道駅GeoJSONデータをPLATEAU VIEW用のCZMLに変換します。

func GenerateLandmarkImage

func GenerateLandmarkImage(name string) ([]byte, error)

GenerateLandmarkImage はランドマーク用の画像を生成します。

func Handler

func Handler(conf Config) (http.Handler, error)

func WebhookHandler

func WebhookHandler(conf Config) (cmswebhook.Handler, error)

Types

type Config

type Config struct {
	Disable  bool
	CMSBase  string
	CMSToken string
	// optional
	CMSModel string
	APIToken string
}

type Item

type Item struct {
	ID         string   `json:"id" cms:"id"`
	Type       string   `json:"type" cms:"type"`
	DataFormat string   `json:"data_format" cms:"data_format,select"`
	Data       string   `json:"data" cms:"data,asset"`
	DataConv   string   `json:"data_conv" cms:"data_conv,select"`
	DataOrig   []string `json:"data_orig" cms:"data_orig,asset"`
}

func (Item) Fields

func (i Item) Fields() []*cms.Field

type Service

type Service struct {
	// contains filtered or unexported fields
}

func NewService

func NewService(conf Config) (*Service, error)

func (*Service) CMS

func (s *Service) CMS() cms.Interface

func (*Service) Convert

func (s *Service) Convert(ctx context.Context, i Item, pid string) error

Jump to

Keyboard shortcuts

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