convert
conversion functions for spatial, routing and other specialized uses
Repository
rustprooflabs/convert
https://github.com/rustprooflabs/convert
Source
convert-0.1.0.tar.gz
convert-0.1.0.tar.gz
Overview
| Package | Version | Category | License | Language |
|---|---|---|---|---|
pg_convert | 0.1.0 | FUNC | MIT | Rust |
| ID | Extension | Bin | Lib | Load | Create | Trust | Reloc | Schema |
|---|---|---|---|---|---|---|---|---|
| 4850 | convert | No | Yes | No | Yes | No | No | convert |
Version
| Type | Repo | Version | PG Ver | Package | Deps |
|---|---|---|---|---|---|
| EXT | PIGSTY | 0.1.0 | 1817161514 | pg_convert | - |
| RPM | PIGSTY | 0.1.0 | 1817161514 | pg_convert_$v | - |
| DEB | PIGSTY | 0.1.0 | 1817161514 | postgresql-$v-convert | - |
Build
You can build the RPM / DEB packages for pg_convert using pig build:
Install
You can install pg_convert directly. First, make sure the PGDG and PIGSTY repositories are added and enabled:
Install the extension using pig or apt/yum/dnf:
Install
pig
dnf
apt
Create Extension:
Usage
Provides functions for common unit conversions: distance, speed, time-to-travel, power, area, and temperature.
Distance Functions
| Function | Description |
|---|---|
dist_mi_to_ft(miles) | Miles to feet |
dist_ft_to_mi(feet) | Feet to miles |
dist_ft_to_m(feet) | Feet to meters |
dist_m_to_ft(meters) | Meters to feet |
dist_m_to_km(meters) | Meters to kilometers |
dist_km_to_m(km) | Kilometers to meters |
dist_mi_to_km(miles) | Miles to kilometers |
dist_m_to_mi(meters) | Meters to miles |
dist_km_to_mi(km) | Kilometers to miles |
Speed Functions
| Function | Description |
|---|---|
speed_mph_to_kmhr(mph) | MPH to km/h |
speed_kmhr_to_mph(kmhr) | km/h to MPH |
speed_kmhr_to_m_s(kmhr) | km/h to m/s |
speed_mph_to_m_s(mph) | MPH to m/s |
speed_m_s_to_kmhr(m_s) | m/s to km/h |
speed_m_s_to_mph(m_s) | m/s to MPH |
Area Functions
| Function | Description |
|---|---|
area_m2_to_km2(m2) | sq meters to sq km |
area_m2_to_ft2(m2) | sq meters to sq feet |
area_ft2_to_m2(ft2) | sq feet to sq meters |
area_ft2_to_mi2(ft2) | sq feet to sq miles |
area_mi2_to_ft2(mi2) | sq miles to sq feet |
area_mi2_to_acre(mi2) | sq miles to acres |
area_acre_to_mi2(acres) | Acres to sq miles |
area_acre_to_km2(acres) | Acres to sq km |
Temperature Functions
| Function | Description |
|---|---|
temp_c_to_f(celsius) | Celsius to Fahrenheit |
temp_f_to_c(fahrenheit) | Fahrenheit to Celsius |
Power Functions
| Function | Description |
|---|---|
power_dbm_to_watts(dbm) | dBm to watts |
power_watts_to_dbm(watts) | Watts to dBm |
Examples
Was this page helpful?
Thanks—your feedback helps us improve this page.
What got in the way? (optional)