[postgis-users] Rounding off coordinates
Charlton Purvis
cpurvis at asg.sc.edu
Mon Jun 28 06:06:15 PDT 2004
Hi, Gino:
I leave the_geom as is, w/ its beaucoup amount of precision, but
whenever I want to return something to the user, I return my own,
separate lon and lat columns which are updated by this insert/update
trigger:
new.lon := round(X(new.the_geom)::numeric,2);
new.lat := round(Y(new.the_geom)::numeric,2);
If you want to go to the trouble of intercepting your user requests and
return something other than the regular the_geom values, this works well
for me. (Don't know what you meant by not adding 'more tools'.) You're
not eliminating any precision in your db, but you are massaging the
user's perspective.
Charlton
More information about the postgis-users
mailing list