[postgis-users] help with pgsql2shp error

Sam Snellings ssnellings at gmail.com
Mon Nov 8 10:10:00 PST 2010


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

*(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.

*(database geog_three, tutorial data) select
count(ST_isValid(geog::geometry)) from airports;*

returns 3, the correct number of entries.

*(database geog_three, tutorial data) select
ST_isValidReason(geog::geometry) from airports;*

*st_isvalidreason*
Valid Geometry
Valid Geometry
Valid Geometry

Does an EWKB validator exist?

-Sam

On Sun, Nov 7, 2010 at 4:15 AM, strk <strk at keybit.net> wrote:

> 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
> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20101108/65b0c57d/attachment.html>


More information about the postgis-users mailing list