[postgis-devel] text(lwgeom)

Carl Anderson carl.anderson at vadose.org
Mon Dec 13 18:24:48 PST 2004


I believe that text(lwgeom) is necessary if we want a WKB-ish CSTRING 
format to be the default
representation for a geometry in scripting.

Inside PLPGSQL I have found that I need to

FOR a in EXECUTE \'select mytab.the_geom
          from mytab,
                 (select geometry(\'||quote_literal(text(GEOM))||\') as 
the_geom ) as e
              where
                   mytab.the_geom && e.the_geom and
                   intersects(mytab.the_geom, e.the_geom)\'  LOOP
       blah;
       blah;
END LOOP; 
      
in this instance I expect that text(GEOM) ==  the CSTRING rep of a LWGEOM
but in a TEXT wrapper. 

This would cause
       text(LWGEOM)          text rep of CSTRING representation
       astext(LWGEOM)       OGIS WKT rep
       asbinary(LWGEOM)   OGIS WKB rep

I can't
   setsrid(geometry(asbinary(\'||asbinary(GEOM)||\')),\'||mysrid||\')\'
because there does not exist a clear path from BYTEA to TEXT or BPCHAR;
And the precision issues with WKT vs WKB need to be quickly eliminiated when
trakicg down a problem.

Such a text(geometry) would simply be

 text-izing LWGEOM_out as the attached patch exhibits.

C.


ps.

postgis-devel seems dead-ush.  Should this discussion occur in 
postgis-users??


-------------- next part --------------
A non-text attachment was scrubbed...
Name: lwgeom_t.patch
Type: text/x-patch
Size: 1070 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/postgis-devel/attachments/20041213/9628661b/attachment.bin>


More information about the postgis-devel mailing list