Skip to content

Commit

Permalink
added unit-conversion for point and point time series type system con…
Browse files Browse the repository at this point in the history
…version
  • Loading branch information
rahulworld committed Jul 1, 2018
1 parent f86f5c1 commit af46337
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
Binary file not shown.
12 changes: 11 additions & 1 deletion istsos/actions/retrievers/aiopg/observations.py
Expand Up @@ -407,12 +407,22 @@ def __get_array(self, offerings, request):
# "NULL::double precision", ConvertScript
# )
####################################3
convert_unit="""%s*'%s'::unit@@'%s' """%(col,ConvertUnit,To_unit)
print('Print convert query for postgresql-unit')
print(convert_unit)
cols[
columns.index(col)
] = unionColumns[columns.index(col)].replace(
"NULL::double precision",
col+"*'m'::unit@@'mm' "
convert_unit
)
#############################
# cols[
# columns.index(col)
# ] = unionColumns[columns.index(col)].replace(
# "NULL::double precision",
# col+"*'m'::unit@@'mm' "
# )
# cols[
# columns.index(col)
# ] = unionColumns[columns.index(col)].replace(
Expand Down

0 comments on commit af46337

Please sign in to comment.