[postgis-users] Re: C question, PG_RETURN_POINTER: GPC integration
Nicolas Ribot
nicolas.ribot at scot.cnes.fr
Mon Apr 29 00:37:55 PDT 2002
Thank you for the answer, Dave.
I looked more closely at my resulting polygon: I noticed it was
clockwise-oriented, which is baaad for OpenGIS polygons.
I changed the orientation, and it worked.
(in fact, I'm not sure if it was the real cause: I think that changing the
indices of my loop to add vertices in a reverse order corrected the
problem).
Anyway, this Week-End, I interfaced the Union(pg, pg), Intersection(pg,
pg), Difference(pg, pg), SymDifference(pg, pg).
I performed some tests on VERY simple polygons, results are encouraging.
(some bugs coming from the fact that gpc and OpenGIS does not have the same
definition for a hole).
Nicolas Ribot
Dave Blasby wrote:
> I couldnt find anything wrong with your function.
>
> Just before you execute the PG_RETURN_POINTER(...), try this;
> elog(NOTICE,"WKT representation of your polygon is: %s\n",
> geometry_to_text(ppoly));
>
> This should print out the normal "WKT" representation of your geometry.
> If this prints out the correct value, I have no idea whats wrong...
>
> dave
>
> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users
More information about the postgis-users
mailing list