[postgis-devel] text(lwgeom)
strk at refractions.net
strk at refractions.net
Tue Dec 14 03:01:04 PST 2004
Hi Carl.
I've added a geometry::text implicit cast in CVS.
Thanks for pointing that out.
--strk;
On Mon, Dec 13, 2004 at 09:24:48PM -0500, Carl Anderson wrote:
>
> 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??
>
>
> _______________________________________________
> postgis-devel mailing list
> postgis-devel at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-devel
More information about the postgis-devel
mailing list