Documentation ¶
Index ¶
- func Command(conf *Config) (err error)
- func GenerateIndex(ctx context.Context, seed *IndexSeed) (string, error)
- func GetUpdateCount(u string) int
- func PrepareCityGML(ctx context.Context, c *CMSWrapper, m MergeContext) (res string, err error)
- func PrepareIndex(ctx context.Context, cw *CMSWrapper, seed *IndexSeed) (err error)
- func PrepareMaxLOD(ctx context.Context, cw *CMSWrapper, mc MergeContext) (err error)
- func PreparePlateau(ctx context.Context, c *CMSWrapper, m MergeContext) (res string, err error)
- func PrepareRelated(ctx context.Context, cw *CMSWrapper, mc MergeContext) (res string, err error)
- func SpecVersion(version string) string
- func YearInt(y string) (year int)
- type CMSWrapper
- func (c *CMSWrapper) Comment(ctx context.Context, comment string)
- func (c *CMSWrapper) GetItem(ctx context.Context, id string, asset bool) (*cms.Item, error)
- func (c *CMSWrapper) NotifyError(ctx context.Context, err error, citygml, plateau, maxlod bool)
- func (c *CMSWrapper) NotifyErrorMessage(ctx context.Context, msg string, citygml, plateau, maxlod bool)
- func (c *CMSWrapper) NotifyRunning(ctx context.Context)
- func (c *CMSWrapper) UpdateDataItem(ctx context.Context, item *GspatialjpDataItem) error
- func (c *CMSWrapper) Upload(ctx context.Context, name string, body io.Reader) (string, error)
- func (c *CMSWrapper) UploadFile(ctx context.Context, path string) (string, error)
- type CityGMLZipWriter
- type CityItem
- type Config
- type FeatureItem
- type GspatialjpDataItem
- type GspatialjpIndexItem
- type GspatialjpIndexItemGroup
- type IndexItem
- type IndexSeed
- type MergeContext
- type StringOrNumber
- type Zip2zip
- type Zip2zipFn
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetUpdateCount ¶
func PrepareCityGML ¶
func PrepareCityGML(ctx context.Context, c *CMSWrapper, m MergeContext) (res string, err error)
func PrepareIndex ¶
func PrepareIndex(ctx context.Context, cw *CMSWrapper, seed *IndexSeed) (err error)
func PrepareMaxLOD ¶
func PrepareMaxLOD(ctx context.Context, cw *CMSWrapper, mc MergeContext) (err error)
func PreparePlateau ¶
func PreparePlateau(ctx context.Context, c *CMSWrapper, m MergeContext) (res string, err error)
func PrepareRelated ¶
func PrepareRelated(ctx context.Context, cw *CMSWrapper, mc MergeContext) (res string, err error)
func SpecVersion ¶
Types ¶
type CMSWrapper ¶
type CMSWrapper struct { CMS cms.Interface ProjectID string DataItemID string CityItemID string SkipCityGML bool SkipPlateau bool SkipMaxLOD bool SkipIndex bool SkipRelated bool WetRun bool }
func (*CMSWrapper) NotifyError ¶
func (c *CMSWrapper) NotifyError(ctx context.Context, err error, citygml, plateau, maxlod bool)
func (*CMSWrapper) NotifyErrorMessage ¶
func (c *CMSWrapper) NotifyErrorMessage(ctx context.Context, msg string, citygml, plateau, maxlod bool)
func (*CMSWrapper) NotifyRunning ¶
func (c *CMSWrapper) NotifyRunning(ctx context.Context)
func (*CMSWrapper) UpdateDataItem ¶
func (c *CMSWrapper) UpdateDataItem(ctx context.Context, item *GspatialjpDataItem) error
func (*CMSWrapper) UploadFile ¶
type CityGMLZipWriter ¶
type CityGMLZipWriter struct {
// contains filtered or unexported fields
}
func NewCityGMLZipWriter ¶
func NewCityGMLZipWriter(w *zip.Writer, name string) *CityGMLZipWriter
func (*CityGMLZipWriter) Close ¶
func (z *CityGMLZipWriter) Close() error
func (*CityGMLZipWriter) DownloadAndWrite ¶
func (z *CityGMLZipWriter) DownloadAndWrite(ctx context.Context, url, tempdir, ty, prefix, dir string) error
type CityItem ¶
type CityItem struct { ID string `json:"id,omitempty" cms:"id"` Prefecture string `json:"prefecture,omitempty" cms:"prefecture,select"` CityName string `json:"city_name,omitempty" cms:"city_name,text"` CityNameEn string `json:"city_name_en,omitempty" cms:"city_name_en,text"` CityCode string `json:"city_code,omitempty" cms:"city_code,text"` CodeLists string `json:"codelists,omitempty" cms:"codelists,asset"` Schemas string `json:"schemas,omitempty" cms:"schemas,asset"` Metadata string `json:"metadata,omitempty" cms:"metadata,asset"` Specification string `json:"specification,omitempty" cms:"specification,asset"` Spec string `json:"spec,omitempty" cms:"spec,select"` Misc string `json:"misc,omitempty" cms:"misc,asset"` Year string `json:"year,omitempty" cms:"year,select"` RelatedDataset string `json:"related,omitempty" cms:"related,reference"` References map[string]string `json:"references,omitempty" cms:"-"` GeospatialjpIndex string `json:"geospatialjp-index,omitempty" cms:"geospatialjp-index,reference"` GeospatialjpData string `json:"geospatialjp-data,omitempty" cms:"geospatialjp-data,reference"` }
func CityItemFrom ¶
func (*CityItem) SpecVersionMajorInt ¶
type FeatureItem ¶
type FeatureItem struct { ID string `json:"id,omitempty"` CityGML string `json:"citygml,omitempty"` Data []string `json:"data,omitempty"` MaxLOD string `json:"maxlod,omitempty"` Dic string `json:"dic,omitempty"` }
func FeatureItemFrom ¶
func FeatureItemFrom(item *cms.Item) (res FeatureItem, ok bool)
type GspatialjpDataItem ¶
type GspatialjpDataItem struct { ID string `json:"id,omitempty" cms:"id"` CityGML string `json:"citygml,omitempty" cms:"citygml,asset"` Plateau string `json:"plateau,omitempty" cms:"plateau,asset"` Related string `json:"related,omitempty" cms:"related,asset"` Generic []string `json:"generic,omitempty" cms:"generic,asset"` MaxLOD string `json:"maxlod,omitempty" cms:"maxlod,asset"` Index string `json:"desc_index,omitempty" cms:"desc_index,markdown"` MergeCityGMLStatus *cms.Tag `json:"merge_citygml_status" cms:"merge_citygml_status,tag,metadata"` MergePlateauStatus *cms.Tag `json:"merge_plateau_status" cms:"merge_plateau_status,tag,metadata"` MergeRelatedStatus *cms.Tag `json:"merge_related_status" cms:"merge_related_status,tag,metadata"` MergeMaxLODStatus *cms.Tag `json:"merge_maxlod_status" cms:"merge_maxlod_status,tag,metadata"` }
func GspatialjpDataItemFrom ¶
func GspatialjpDataItemFrom(item *cms.Item) (i *GspatialjpDataItem)
func (*GspatialjpDataItem) ShouldMergeCityGML ¶
func (g *GspatialjpDataItem) ShouldMergeCityGML() bool
func (*GspatialjpDataItem) ShouldMergeMaxLOD ¶
func (g *GspatialjpDataItem) ShouldMergeMaxLOD() bool
func (*GspatialjpDataItem) ShouldMergePlateau ¶
func (g *GspatialjpDataItem) ShouldMergePlateau() bool
func (*GspatialjpDataItem) ShouldMergeRelated ¶
func (g *GspatialjpDataItem) ShouldMergeRelated() bool
type GspatialjpIndexItem ¶
type GspatialjpIndexItem struct { ID string `json:"id,omitempty" cms:"id"` Generic []GspatialjpIndexItemGroup `json:"generic,omitempty" cms:"generic,group"` }
func GspatialjpIndexItemFrom ¶
func GspatialjpIndexItemFrom(item *cms.Item) (i *GspatialjpIndexItem)
func (*GspatialjpIndexItem) GenericMap ¶
func (g *GspatialjpIndexItem) GenericMap() map[string]string
type GspatialjpIndexItemGroup ¶
type GspatialjpIndexItemGroup struct { Name string `cms:"name,text"` Type string `cms:"type,select"` Asset map[string]any `cms:"asset,asset"` }
func (*GspatialjpIndexItemGroup) AssetURL ¶
func (g *GspatialjpIndexItemGroup) AssetURL() string
type MergeContext ¶
type StringOrNumber ¶
type StringOrNumber struct {
Value string
}
func (*StringOrNumber) String ¶
func (s *StringOrNumber) String() string
func (*StringOrNumber) UnmarshalJSON ¶
func (s *StringOrNumber) UnmarshalJSON(b []byte) error
Click to show internal directories.
Click to hide internal directories.