[postgis-users] WKB to native geometry using BULK COPY

Ryan Proulx Ryan.Proulx at safe.com
Wed Mar 24 09:16:15 PST 2004


Any thoughts on this yet? Or is this just a really stupid question? I am open to suggestions on how to make transfering data in and out of PostGIS easier.

Regards,
ryan

-----Original Message-----
From: Ryan Proulx 
Sent: March 4, 2004 16:02
To: PostGISUserGroup (E-mail)
Subject: [postgis-users] WKB to native geometry using BULK COPY


Greetings,

I am curious how I can use the COPY commands to insert literal geometry data. Currently this works with WKT by specifying the geometry as: 

'srid=<srid>;<the_geometry_as_wkt>'. 

However, I would like to do the same thing using WKB. Any ideas on how that might successfully be done? 

It seems I will have to get an SRID and a WKB geometry, in hex preferably, and combine the two to form a single hex literal to be inserted directly into a column of type GEOMETRY.

When I am using single INSERT statements instead of the COPY commands I use the 'geomfromwkb' function to combine the SRID and WKB hex string, so I guess what I really need to know is how this is accomplished and likely what the native underlying geometry looks like.

Regards,
ryan




_______________________________________________
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