[postgis-users] Getting geometry into ADO

Alan alankeown at southernphone.com.au
Thu May 11 13:17:49 PDT 2006


Val,
I may be completely on the wrong track here (and apologise if I am) but
could the problem have something to do with inner rings and the like... ie
Collections of Collections?
Alan Keown

-----Original Message-----
From: postgis-users-bounces at postgis.refractions.net
[mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of Val
Macduff
Sent: Wednesday, 10 May 2006 4:51 PM
To: postgis-users at postgis.refractions.net
Subject: [postgis-users] Getting geometry into ADO

I am building a GIS browser interface to PostGIS data using VB6 to read the
PostGIS table. I need to get the complete geometry field into a VB6 Variant
variable to pass to the TatukGIS DK to create a shape.  My select statement
is

    sSelectString = "SELECT SRID(" & msShapeItem & ") as ShapeSRID," & _
                          "AsBINARY(" & msShapeItem & ",'XDR') as SHAPEWKB"
& _
                          " FROM " & msTableName & _
                          " WHERE " & msShapeItem & " IS NOT NULL"

When I use this on a point dataset or a small line dataset everything works
fine but if I try to access polygon data with very large numbers of
coordinates I cannot retrieve a value at all. The statement

vntCoords = rs.Fields("SHAPEWKB").Value

causes an immediate untrappable error.  If I look at the locals before this
happens, the value of SHAPEWKB is given as

<Application-defined or object-defined error>

Trying to fetch the data AsText or raw also results in the same "value"
being shown.

Does anyone know how I can do this?

Thanks, Val



_______________________________________________
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