[postgis-users] WKB to native geometry using BULK COPY
    Ryan Proulx 
    Ryan.Proulx at safe.com
       
    Thu Mar  4 16:02:05 PST 2004
    
    
  
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
    
    
More information about the postgis-users
mailing list