[postgis-users] ST_SnapToGrid question

James Tippett james.tippett at gmail.com
Sat Aug 13 10:30:11 PDT 2011


Hello all,

As a total n00b I have been trying to get my head around a number of postgis issues, and also troubleshoot some early stage failures I seem to be running across.

I would be delighted if someone could tell me what I am doing wrong here:

> SELECT name, ST_AsEWKT(the_geom), ST_AsEWKT(ST_SnapToGrid(the_geom, 360.0)) FROM "countries" WHERE "countries"."gid" = 1 LIMIT 1
>> "Aruba";"MULTIPOLYGON(((-69.8991387600357 12.4520051131644,-69.8956764390721 12.4230146346486,-69.9421593899187 12.4385175643362,-70.0041452704528 12.5005034448703,-70.0661311509868 12.5469863957168,-70.0508607652446 12.5970866968238,-70.0351252916118 12.614114081264,-69.9731394110777 12.5676311304174,-69.9117994859472 12.4804788273572,-69.8991387600357 12.4520051131644)))";"GEOMETRYCOLLECTION EMPTY"

I had thought to be doing something different here; I wanted to reduce the number of points to unique points on a 360*360 grid. "GEOMETRYCOLLECTION EMPTY" is unexpected.

Can someone please point out where I have gone stupidly wrong?

thanks,

James


More information about the postgis-users mailing list