[postgis-users] Problem with PostGIS 1.0.0 RC1
strk at refractions.net
strk at refractions.net
Tue Jan 25 01:03:09 PST 2005
I've made all OGC WKB constructors take bytea for consistency
(in RC1 all but GeomFromWKB took a geometry, relying on implicit
casts).
This means you can't feed them an hexWKB, but you should use canonical
input for that. Example:
SELECT GeomFromWKB('\\001\\001\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000');
SELECT Geometry('010100000000000000000000000000000000000000');
--strk;
On Mon, Jan 24, 2005 at 10:51:18AM +0100, strk at refractions.net wrote:
> On Mon, Jan 24, 2005 at 09:47:52AM -0000, Mark Cave-Ayland wrote:
> >
> > > -----Original Message-----
> > > From: postgis-users-bounces at postgis.refractions.net
> > > [mailto:postgis-users-bounces at postgis.refractions.net] On
> > > Behalf Of strk at refractions.net
> > > Sent: 23 January 2005 09:11
> > > To: Markus Schaber; Mark Cave-Ayland
> > > Cc: PostGIS Users Discussion
> > > Subject: Re: [postgis-users] Problem with PostGIS 1.0.0 RC1
> >
> > (cut)
> >
> > > The only *transparent* way would be having geometry_in
> > > recognize all of HEXWKB,bytea,WKT (currently only bytea missing).
> >
> > Hmmmm so it looks like the PostgreSQL type system can't handle this in the
> > way I was expecting :(
> >
> > Given that changing GeomFromWKB from WKBHEX to bytea will already break
> > existing applications, how about a new function GeomFrom(E)WKBHEX(text) that
> > takes HEXWKB input and leaving GeomFrom(E)WKB(bytea) as it is? Is there then
> > any need to have geometry_in accept HEXWKB? (I understand that we need to
> > keep WKT as a hack so that dumps from older versions of PostGIS can be
> > restored).
>
> geometry_in *already* accepts HEXWKB, it's the canonical input/output
> representation.
> GeomFromHEXWKB is useless because canonical input accepts that.
>
> --strk;
>
> >
> >
> > Kind regards,
> >
> > Mark.
> >
> > ------------------------
> > WebBased Ltd
> > South West Technology Centre
> > Tamar Science Park
> > Plymouth
> > PL6 8BT
> >
> > T: +44 (0)1752 791021
> > F: +44 (0)1752 791023
> > W: http://www.webbased.co.uk
> >
> >
> > _______________________________________________
> > postgis-users mailing list
> > postgis-users at postgis.refractions.net
> > http://postgis.refractions.net/mailman/listinfo/postgis-users
>
> --
>
> For standing up against patentability of software,
>
> Thank You, Poland!
>
> Read the intervention: http://kwiki.ffii.org/ConsPolon041221En
> Send your thanks: thankyoupoland.info
> Read/do more: http://www.noepatents.org/
> _______________________________________________
> 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