[postgis-users] help with pgsql2shp error

strk strk at keybit.net
Tue Nov 9 00:29:31 PST 2010


On Mon, Nov 08, 2010 at 01:10:00PM -0500, Sam Snellings wrote:

> I didn't check the log, do you still need that to diagnose or did your
> second reply mean it's not necessary?

Until you figure out what it is I'd recommend looking at it.

> *(database geog_three, tutorial data) select
> GeomFromEWKB(asEWKB(geog::geometry)) from airports;*
> 
> 0101000020E610000075029A081B9A5DC0F085C954C1F84040
> 0101000020E61000006DC5FEB27B720440454772F90F814840
> 0101000020E610000022FDF675E0DC35C000917EFB3A085040
> 
> all of which match the entries in the_geom for that table.
[..]
> Does an EWKB validator exist?

Well, yes. The parser does validation.
The weird thing is that the parser invoked by your dumper
fails the validation, while the (supposedly) same parser
invoked by postgis succeeds.

I just tried creating a table with a single geography field,
copying the HEXEWKB above into it and then dumping it.
Had no problem. Can you try it ?

name=test`date +"%Y%m%d%H%M%S"`
psql -f - <<EOF && pgsql2shp ${USER} ${name}
create table "${name}" (g geography);
copy "${name}" from stdin;
0101000020E610000075029A081B9A5DC0F085C954C1F84040
0101000020E61000006DC5FEB27B720440454772F90F814840
0101000020E610000022FDF675E0DC35C000917EFB3A085040
\.
EOF


--strk;

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



More information about the postgis-users mailing list