[postgis-users] rounding off geometry coordinates

Nicklas Avén nicklas.aven at jordogskog.no
Wed Nov 26 02:29:25 PST 2014


Hallo

ST_Snaptogrid should be what you are looking for.

HTH
Nicklas


Skickat från min Samsung Mobil.

<div>-------- Originalmeddelande --------</div><div>Från: toni hernández <toni at sigte.udg.edu> </div><div>Datum:11-26-2014  11:17  (GMT+01:00) </div><div>Till: PostGIS Users Discussion <postgis-users at lists.osgeo.org> </div><div>Rubrik: [postgis-users] rounding off geometry coordinates </div><div>
</div>Hello,

I need to round off all the coordinates of some polygon geometries.
So far I am using the st_asgeojson function to use the precision I need, 
and then I create a new geometry from the GeoJSon I have just created.

Something like this:
SELECT ST_ST_GeomFromGeoJSON(ST_AsGeoJSON(value_old,geom_precision))

Is there a more efficent way to do this?.

_______________________________________________
postgis-users mailing list
postgis-users at lists.osgeo.org
http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20141126/0e2e53d4/attachment.html>


More information about the postgis-users mailing list