[postgis-users] referencing GEOMETRY object values in libpq?

Paul Ramsey pramsey at refractions.net
Mon Jun 14 12:14:21 PDT 2004


Yes, a better way would be to read the "Well Known Binary", much easier 
to transform than the text form. You can get the binary forms by 
declaring a binary cursor and pulling the data that way. There is some 
example code for this in the examples/wkb_reader directory.

Paul

sandr002 at bama.ua.edu wrote:

> I'm working on a project that requires using C, and I'm still pretty new
> to PostGIS.  I'm trying to retrieve the values  of the points on a
> polygon from a PGresult, using the libpq library.  Is there a better way
> to do this than parsing the 'GeometryAsText()' string?  I guess what I
> would like to know is if there is a way to reference
> POLYGON3D->pts->POINT3D->x/y/z to store it in a local variable of my own.  
> 
> Thanks guys,
> -Nick

-- 
       __
      /
      | Paul Ramsey
      | Refractions Research
      | Email: pramsey at refractions.net
      | Phone: (250) 885-0632
      \_



More information about the postgis-users mailing list