[postgis-devel] Re: Rounding off coordinates (from Postgis-users)
strk
strk at keybit.net
Tue Jun 29 17:08:05 PDT 2004
Gino, about removing points:
- You'll never introduce self-intersections
- You might make LineString collaps to Point
- You might make Polygon collaps to LineString or Point
Collapses can be handled by either add up to the required amount
of points for the geometry (I'd suggest this - although I'm not
sure about OGC compliance) or modify geometry type (could drive
clients crazy) or set them to NULL (could be needed to localize a
feature).
--strk;
On Tue, Jun 29, 2004 at 07:02:01AM -0700, Paul Ramsey wrote:
> Gino,
> Good help to be had on postgis-devel.
> The only "internal" debugging scheme in pgsql is classic "print your
> state until you die" debugging, which you can do using the pgsql
> logging facility (there should be lots of commented out examples in the
> postgis code). For more advanced debugging, you should use the standard
> GNU debugger, gdb. The trick there is to not attach gdb to the main
> postmaster, but to the postgres backend you are actually running the
> command within.
> P
>
> On Tuesday, June 29, 2004, at 06:14 AM, Gino Lucrezi wrote:
>
> >>Write up the function... base it on the parameters of the standard
> >>pgsql
> >>round function that Charlton has demonstrated below, it would be a
> >>useful addition.
> >
> >I started writing both a ROUND and a TRUNC function.
> >
> >I got yesterday's CVS build, and started browsing the code to see
> >where I could add it.
> >
> >My model is the translate function, which works in a similar way; it
> >has a geometry argument and some numeric arguments, it scans all
> >points in the geometry and performs some manipulation on them based on
> >the numeric arguments.
> >
> >It compiles perfectly, but it crashes PostgreSQL with no explaination.
> >
> >I need of some debugging tips... is there any debug facility in
> >PostgreSQL/Postgis?
> >
> >By the way, I was also thinking about Markus and strk's comments. It's
> >not just a matter of rounding off point coordinates, you'd have to
> >remove duplicates and I fear it might still cause some incorrect
> >geometries. It would still be OK for human reading.
> >Any suggestions would be welcome, too.
> >
> >Gino Lucrezi
> >Penta Consulting Services Srl
> >
> >
> >
> Paul Ramsey
> Refractions Research
> Email: pramsey at refractions.net
> Phone: (250) 885-0632
>
> _______________________________________________
> postgis-devel mailing list
> postgis-devel at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-devel
More information about the postgis-devel
mailing list