Opened 17 years ago

Last modified 15 years ago

#133 closed defect (fixed)

GEOSCoordSeq_setZ is inconsistent

Reported by: hrz@… Owned by: strk@…
Priority: major Milestone:
Component: C-API Version: main
Severity: Content Keywords: imported, phpbugtracker
Cc:

Description (last modified by mloskot)

GEOSCoordSeq_setZ doesn't work as expected when it's called *before* either _setX or _setY. I would expect the following code to print z=43.2 but instead it prints z=78.9

    double z = 0;
    coords = GEOSCoordSeq_create(1, 3);

    GEOSCoordSeq_setZ(coords, 0, 43.2);
    GEOSCoordSeq_setX(coords, 0, 12.5);
    GEOSCoordSeq_setY(coords, 0, 78.9);

    GEOSCoordSeq_getZ(coords, 0, &z);
    printf("z=%.1fn", z);

I suppose the other alternative is that _getZ isn't working as expected!

My system is:

$ uname -a
Linux 2.6.18-gentoo-r3 #1 PREEMPT Wed Nov 29 09:26:52 GMT 2006 i686 AMD Athlon(tm) XP 2800+ AuthenticAMD GNU/Linux

and GEOS CAPI 3.0.0rc2-CAPI-1.3.0 with:
$ gcc-config -c
i686-pc-linux-gnu-4.1.1

Change History (7)

comment:1 by strk@…, 17 years ago

Confirmed, it seems that also swapping setX with setY breaks it :-!

comment:2 by hrz@…, 17 years ago

Works fine for me now, although I haven't tested for swapping setX with setY - only setZ as described in the initial report.

comment:3 by strk@…, 17 years ago

Resolution: nonefixed

comment:4 by mateusz@…, 17 years ago

This bug was fixed in 2006-12-04, by Sandro.
All versions from 3.0.0rc3 should include the fix.

comment:5 by mloskot, 16 years ago

Description: modified (diff)
Milestone: imported
Priority: 3major
Severity: UnassignedContent

comment:6 by mloskot, 16 years ago

Milestone: 3.0.0
Version: 3.0.0svn-trunk

comment:7 by (none), 15 years ago

Milestone: 3.0.0

Milestone 3.0.0 deleted

Note: See TracTickets for help on using tickets.