[postgis-users] help with pgsql2shp error

strk strk at keybit.net
Sun Nov 7 01:15:51 PST 2010


On Sun, Nov 07, 2010 at 09:58:02AM +0100, strk wrote:
> On Sat, Nov 06, 2010 at 05:31:55PM -0400, Sam Snellings wrote:
> > *(database geog_three, tutorial data) select
> > asEWKB(setSRID(geog::geometry,-1), 'XDR') from airports;*
> > *
> > *
> > asewkb
> > *\00000000001c05d9a1b089a02754040f8c154c985f0*
> > \000000000014004727bb2fec56d4048810ff9724745
> > \00000000001c035dce075f6fd224050083afb7e9100
> 
> Can you check the postgrsql logs to confirm the dumper uses
> _that_ query ?

Ah, figured !
It's the _reader_ raising an error, not the output routing.
I was confused by the fact that the dumper _now_ uses the 
shared parser library:

result = serialized_lwgeom_from_hexwkb(&lwg_parser_result,
	hexewkb, PARSER_CHECK_ALL);

So it is the dumper, not postgis, complaining about validity.
You _might_ get the same result with:

select GeomFromEWKB(asEWKB(%s::geometry));

Your EWKB strings look weird, btw, have too few backslashes.

--strk;

  ()   Free GIS & Flash consultant/developer
  /\   http://strk.keybit.net/services.html



More information about the postgis-users mailing list