|
View:
New views
3 Messages
—
Rating Filter:
Alert me
|
|
|
Math OperatorsHi
I have an expression such as -
select ST_distance(st_centroid(p_id.p_id.the_geom),
st_boundary(p_id.p_id.the_geom))/2 + 15000
from p_id.p_id where p_id.p_id.process_id = '1012' ; This works
I can access the number 15000 from a table as a
variable.
I want to be able to also access the + (or -)
from a table as a variable but can't figure out how to do this.
Is it possible to store math operators and access
them from a table??
Bob
_______________________________________________ postgis-users mailing list postgis-users@... http://postgis.refractions.net/mailman/listinfo/postgis-users |
|
|
Re: Math OperatorsCould you store the numbers "1"
and "-1", and then do + (one_or_minus_one * 15000) That is, subtraction is the same as
addition of the negative? From:
postgis-users-bounces@...
[mailto:postgis-users-bounces@...] On Behalf Of Bob Pawley Hi I have an expression such as - select ST_distance(st_centroid(p_id.p_id.the_geom),
st_boundary(p_id.p_id.the_geom))/2 + 15000 This works I can access the number 15000 from a table as a
variable. I want to be able to also access the + (or -) from a
table as a variable but can't figure out how to do this. Is it possible to store math operators and access them from
a table?? Bob _______________________________________________ postgis-users mailing list postgis-users@... http://postgis.refractions.net/mailman/listinfo/postgis-users |
|
|
Re: Math OperatorsIt's not clear what you're trying to do but can you simply store the 15000 as positive or negative? Then you always add. Adding a negative is same as subtracting. Sean On Jul 1, 2:35 pm, "Bob Pawley" <rjpaw...@...> wrote: > Hi > > I have an expression such as - > > select ST_distance(st_centroid(p_id.p_id.the_geom), st_boundary(p_id.p_id.the_geom))/2 + 15000 > from p_id.p_id > where p_id.p_id.process_id = '1012' ; > > This works > > I can access the number 15000 from a table as a variable. > > I want to be able to also access the + (or -) from a table as a variable but can't figure out how to do this. > > Is it possible to store math operators and access them from a table?? > > Bob > > _______________________________________________ > postgis-users mailing list > postgis-us...@...://postgis.refractions.net/mailman/listinfo/postgis-users postgis-users mailing list postgis-users@... http://postgis.refractions.net/mailman/listinfo/postgis-users |
| Free embeddable forum powered by Nabble | Forum Help |