Documentation ¶
Index ¶
- Constants
- Variables
- func FromParquet(input parquet.ReaderAtSeeker, output io.Writer, convertOptions *ConvertOptions) error
- func GetMetadataValue(keyValueMetadata metadata.KeyValueMetadata) (string, error)
- type ConvertOptions
- type FeatureWriter
- type GeometryColumn
- type Metadata
- type Proj
- type ProjId
- type ReaderConfig
- type RecordReader
- type RecordWriter
- type WriterConfig
Constants ¶
View Source
const ( Version = "1.0.0" MetadataKey = "geo" EdgesPlanar = "planar" EdgesSpherical = "spherical" OrientationCounterClockwise = "counterclockwise" DefaultGeometryColumn = "geometry" DefaultGeometryEncoding = geo.EncodingWKB )
Variables ¶
View Source
var ErrDuplicateMetadata = fmt.Errorf("found more than one %s metadata key", MetadataKey)
View Source
var ErrNoMetadata = fmt.Errorf("missing %s metadata key", MetadataKey)
View Source
var GeometryTypes = []string{
"Point",
"LineString",
"Polygon",
"MultiPoint",
"MultiLineString",
"MultiPolygon",
"GeometryCollection",
"Point Z",
"LineString Z",
"Polygon Z",
"MultiPoint Z",
"MultiLineString Z",
"MultiPolygon Z",
"GeometryCollection Z",
}
Functions ¶
func FromParquet ¶ added in v0.11.0
func FromParquet(input parquet.ReaderAtSeeker, output io.Writer, convertOptions *ConvertOptions) error
func GetMetadataValue ¶ added in v0.10.0
func GetMetadataValue(keyValueMetadata metadata.KeyValueMetadata) (string, error)
Types ¶
type ConvertOptions ¶ added in v0.11.0
type FeatureWriter ¶ added in v0.14.0
type FeatureWriter struct {
// contains filtered or unexported fields
}
func NewFeatureWriter ¶ added in v0.14.0
func NewFeatureWriter(config *WriterConfig) (*FeatureWriter, error)
func (*FeatureWriter) Close ¶ added in v0.14.0
func (w *FeatureWriter) Close() error
type GeometryColumn ¶
type GeometryColumn struct { Encoding string `json:"encoding"` GeometryType any `json:"geometry_type,omitempty"` GeometryTypes any `json:"geometry_types"` CRS *Proj `json:"crs,omitempty"` Edges string `json:"edges,omitempty"` Orientation string `json:"orientation,omitempty"` Bounds []float64 `json:"bbox,omitempty"` Epoch float64 `json:"epoch,omitempty"` }
func (*GeometryColumn) GetGeometryTypes ¶
func (col *GeometryColumn) GetGeometryTypes() []string
type Metadata ¶ added in v0.10.0
type Metadata struct { Version string `json:"version"` PrimaryColumn string `json:"primary_column"` Columns map[string]*GeometryColumn `json:"columns"` }
func DefaultMetadata ¶ added in v0.10.0
func DefaultMetadata() *Metadata
func GetMetadata ¶ added in v0.10.0
func GetMetadata(keyValueMetadata metadata.KeyValueMetadata) (*Metadata, error)
type ReaderConfig ¶ added in v0.14.0
type RecordReader ¶ added in v0.14.0
type RecordReader struct {
// contains filtered or unexported fields
}
func NewRecordReader ¶ added in v0.14.0
func NewRecordReader(config *ReaderConfig) (*RecordReader, error)
func (*RecordReader) Close ¶ added in v0.14.0
func (r *RecordReader) Close() error
func (*RecordReader) Metadata ¶ added in v0.14.0
func (r *RecordReader) Metadata() *Metadata
func (*RecordReader) Schema ¶ added in v0.14.0
func (r *RecordReader) Schema() *schema.Schema
type RecordWriter ¶ added in v0.14.0
type RecordWriter struct {
// contains filtered or unexported fields
}
func NewRecordWriter ¶ added in v0.14.0
func NewRecordWriter(config *WriterConfig) (*RecordWriter, error)
func (*RecordWriter) AppendKeyValueMetadata ¶ added in v0.14.0
func (w *RecordWriter) AppendKeyValueMetadata(key string, value string) error
func (*RecordWriter) Close ¶ added in v0.14.0
func (w *RecordWriter) Close() error
type WriterConfig ¶ added in v0.14.0
type WriterConfig struct { Writer io.Writer Metadata *Metadata ParquetWriterProps *parquet.WriterProperties ArrowWriterProps *pqarrow.ArrowWriterProperties ArrowSchema *arrow.Schema }
Click to show internal directories.
Click to hide internal directories.