[postgis-devel] Re: Rounding off coordinates (from Postgis-users)
Paul Ramsey
pramsey at refractions.net
Tue Jun 29 07:02:01 PDT 2004
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
More information about the postgis-devel
mailing list