[postgis-devel] ST_AsBinary(geography) ?
Paul Ramsey
pramsey at opengeo.org
Wed Jan 11 07:31:49 PST 2012
On Wed, Jan 11, 2012 at 4:42 AM, Sandro Santilli <strk at keybit.net> wrote:
> While looking at qgis sources it stroke me that
> geography and geometry are threated differently:
>
> ST_AsBinary(<geometry>, <endian_spec>) and
> ST_AsBinary(<geography>)
>
> So went looking and found ST_AsBinary(<geography>, <endian_spec>)
> doesn't exist. Is there any reason why ST_AsBinary(<geography>)
> doesn't implicitly cast geography to geometry ?
>
> In other words: is there a special WKB for geography ?
And special WKT... we come here to an uncompleted compatibility change
AsText(geometry) and AsBinary(geometry) return what they always did
"OGC strict" results, which means tossing away higher dimensionality.
AsText(geography) and AsBinary(geography) return ISO SQL/MM results,
which means higher dimensions, type tokens that include the dimensions
(eg 'POINT Z') and WKB with funny offsets to indicate dimensions (eg
1001 for POINT Z).
There's probably tickets outstanding that say "convert geometry to
return ISO formatted text and wkb in the system.
I think at this point everyone is bloodyminded enough to say "just do
it, do it!", but that wasn't so earlier.
P.
>
> --strk;
>
> () Free GIS & Flash consultant/developer
> /\ http://strk.keybit.net/services.html
> _______________________________________________
> 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