tiledbgnss

package
v0.20.1 Latest Latest
Warning

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

Go to latest
Published: Jun 27, 2025 License: Apache-2.0 Imports: 16 Imported by: 4

README

TileDB GNSS: Efficient Storage and Access for GNSS Data

This package provides tools for writing to and reading from TileDB arrays using schemas optimized for common GNSS (Global Navigation Satellite System) data types. TileDB's efficient storage engine and flexible querying capabilities make it ideal for managing large-scale GNSS datasets.

Benefits:

  • Scalability: Handle massive GNSS datasets with ease.
  • Performance: Optimized for fast data retrieval and analysis.
  • Cloud-Native: Seamless integration with cloud storage.
  • Multi-Dimensional Efficiently query GNSS data by time, system, satellite, and signal.

Installation

Prerequisites:

  • Golang (compatible versions: >=1.23)
  • TileDB C++ Library (link)
  • TileDB-Go (link)

Install TileDB C++ Library (Mac OS X):

From Release (version 2.27):

curl --location -o tiledb.tar.gz https://github.com/TileDB-Inc/TileDB/releases/download/2.27.2/tiledb-macos-arm64-2.27.2-1757013.tar.gz \
&& sudo tar -C /usr/local -xSf tiledb.tar.gz

From Source (version 2.27):

git clone https://github.com/TileDB-Inc/TileDB.git -b release-2.27
cd TileDB
mkdir build && cd build
cmake -DTILEDB_WERROR=OFF -DTILEDB_VCPKG=ON -DTILEDB_VERBOSE=OFF -DTILEDB_S3=ON -DTILEDB_SERIALIZATION=ON -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local ..
sudo make -j$(sysctl -n hw.ncpu) tiledb install

Install TileDB-Go Library

 go get -v github.com/TileDB-Inc/TileDB-Go@v0.35.0

Note: Golang and C++ versions must be compatible, check here for compatability

For Developers

Golang

Enable CGO CGO_ENABLED=1 when building projects that include TileDB.

Make sure either gcc or clang are installed when building with TileDB.

Mac OS X

Add the path to libtiledb.dylib to DYLD_LIBRARY_PATH

LINUX

Add the path to the C++ library to LD_LIBRARY_PATH, commonly located at /usr/local/lib

Run ldconfig to configure and update the dynamic linker run-time bindings.

VSCode Setup Mac OSX

Add the following parameter to your settings.json file.

"go.toolsEnvVars": {
    "DYLD_LIBRARY_PATH": "$DYLD_LIBRARY_PATH:/usr/local/lib"
},

Note: This assumes libtiledb.dylib is installed in /usr/local/lib

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ArrayExists added in v0.17.2

func ArrayExists(arrayPath string) bool

Check if the TileDB array exists at the given path

func ConsolidateMetadata

func ConsolidateMetadata(dir string, region string) (err error)

ConsolidateMetadata - consolidate the metadata in a given array

func ConvertBytesToUint16

func ConvertBytesToUint16(bytes []byte) (uint16, error)

ConvertBytesToUint16 converts a slice of two bytes to a uint16 using BigEndian byte order.

func ConvertUint16ToBytes

func ConvertUint16ToBytes(num uint16) []byte

ConvertUint16ToBytes converts a uint16 to a slice of two bytes assuming BigEndian byte order.

func CreateArray

func CreateArray(srcArrayPath, destArrayPath string, region string) (err error)

CreateArray creates a new TileDB array using the schema from the provided path to a reference array

func CreateTDCPArray

func CreateTDCPArray(arr, region string) (err error)

func GPSWeekSowToTime

func GPSWeekSowToTime(gpsWeek uint16, tow int32) (dt time.Time)

func GetTimeRange added in v0.16.2

func GetTimeRange(arr string, region string) (start time.Time, end time.Time, err error)

For a given array, return the time range of the data

func ReadMetArray

func ReadMetArray(arr, region string, queryParams MetQueryParams) (epochs []met.Epoch, err error)

func ReadMetV2Array

func ReadMetV2Array(arr, region string, queryParams MetV2QueryParams) (epochs []met.Epoch, err error)

func ReadNavArray

func ReadNavArray(arr string, region string, queryParams NavQueryParams) (ephems []ephemeris.GenericEphemeris, err error)

func ReadNavV2Array

func ReadNavV2Array(arr string, region string, queryParams NavV2QueryParams) (ephems []ephemeris.GenericEphemeris, err error)

func ReadObsV3Array

func ReadObsV3Array(arr string, region string, queryParams ObsQueryParams) (epochs []observation.Epoch, err error)

ReadObsV3Array reads GNSS observations to a TileDB array

func ReadPosArray

func ReadPosArray()

func VacuumMetadata

func VacuumMetadata(dir string, region string) (err error)

Vacuum the metadata in a given array

func WriteBottleArray

func WriteBottleArray(arr string, region string, bSlice []bottle.Bottle3DFloat64) (err error)

WriteBottleArray writes strain observations to a TileDB array

func WriteMetArray

func WriteMetArray(arr, edid, region string, epochs []met.Epoch) (err error)

WriteMetArray - writes meteorolgical data to a TileDB array

func WriteMetV2Array

func WriteMetV2Array(arr, region string, epochs []met.Epoch) (err error)

WriteMetArray - writes meteorolgical data to a TileDB array

func WriteNavArray

func WriteNavArray(arr string, edid string, region string, ephs []ephemeris.GenericEphemeris) (err error)

WriteNavArray -

func WriteNavV2Array

func WriteNavV2Array(arr string, region string, ephs []ephemeris.GenericEphemeris) (err error)

WriteNavV2Array -

func WriteObsV3Array

func WriteObsV3Array(arr string, region string, epochs []observation.Epoch) (err error)

WriteObsV3Array writes GNSS observations to a TileDB array

func WritePosArray

func WritePosArray(arr string, region string, positionEpochs []position.GAGEPosition) (err error)

func WriteSP3Array

func WriteSP3Array(arr string, region string, tag string, epochs []precise.SP3Epoch) (err error)

func WriteTDCPArray

func WriteTDCPArray(arr, region, edid string, tdcpResults []tdcp.Velocity) (err error)

Types

type MetQueryParams

type MetQueryParams struct {
	EDID []StringRange `json:"edid"`
	Time []TimeRange   `json:"time"`
	Key  []StringRange `json:"key"`
}

type MetV2QueryParams

type MetV2QueryParams struct {
	Time []TimeRange   `json:"time"`
	Key  []StringRange `json:"key"`
}
type NavQueryParams struct {
	EDID []StringRange `json:"edid"`
	Time []TimeRange   `json:"time"`
	Key  []StringRange `json:"key"`
}
type NavV2QueryParams struct {
	Time []TimeRange   `json:"time"`
	Sys  []Uint8Range  `json:"system"`
	SvID []Uint8Range  `json:"svid"`
	Key  []StringRange `json:"key"`
}

type ObsQueryParams

type ObsQueryParams struct {
	Time []TimeRange   `json:"time"`
	Sys  []Uint8Range  `json:"system"`
	SvID []Uint8Range  `json:"svid"`
	Obs  []StringRange `json:"obs"`
}

type ObsV2QueryParams

type ObsV2QueryParams struct {
	EDID      []StringRange `json:"edid"`
	Time      []TimeRange   `json:"time"`
	Satellite []StringRange `json:"sat"`
	Obs       []StringRange `json:"obs"`
}

type StringRange

type StringRange struct {
	Start string `json:"start"`
	End   string `json:"end"`
}

type TimeRange

type TimeRange struct {
	Start time.Time `json:"start"`
	End   time.Time `json:"end"`
}

func GetDateArranged added in v0.16.2

func GetDateArranged(start time.Time, end time.Time) []TimeRange

type Uint8Range

type Uint8Range struct {
	Start uint8 `json:"start"`
	End   uint8 `json:"end"`
}

Jump to

Keyboard shortcuts

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