[postgis-users] help with pgsql2shp error
Sam Snellings
ssnellings at gmail.com
Sat Nov 6 10:44:12 PDT 2010
Thanks for the ::geometry tip.
(database geog_test, my data) *select count(asEWKB(location::geometry)) from
global_points;*
count: 1
(database geog_three, tutorial data) *select count(asEWKB(geog::geometry))
from airports;*
count: 3
Both of those counts are correct. global_points contains a single
LINESTRING() constructed from two lat/long points (my data), airports
contains three POINT() generated using the steps in this
tutorial<http://workshops.opengeo.org/postgis-intro/geography.html#creating-a-geography-table>
.
-Sam
On Sat, Nov 6, 2010 at 10:22 AM, strk <strk at keybit.net> wrote:
> On Fri, Nov 05, 2010 at 09:43:14PM -0400, Sam Snellings wrote:
> > select count(asEWKB(the_geom)) from global_points;
> >
> > Returns the following error:
> >
> > ERROR: function asewkb(geography) does not exist
>
> Try asewkb(the_geom::geometry)
>
> > asEWKB(), ST_isValid() and ST_isValidReason() don't work with geography
> data types,
> > correct?
>
> You can cast geography to geometry using the ::geometry operator.
>
> --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/20101106/222c7d14/attachment.html>
More information about the postgis-users
mailing list