Take a look at the PostGIS code for "attribute io"; it has an 
implementation of how to encode here:
- PgWKBAttributeIO.read( ResultSet, int )
>             if(useByteArray) {
>                 byte bytes[] = rs.getBytes(position);
>                 if (bytes == null) // ie. its a null column -> return 
> a null geometry!
>                     return null;
>                 return WKB2Geometry(Base64.decode(bytes));
>             } else {
>                 return WKB2Geometry(hexToBytes(rs.getString(position)));
>             }
- PgWKBAttributeIO.write( ResultSet, int, Object )
>             if(value == null) {
>                 rs.updateNull(position);
>             } else {
>                 rs.updateString(position, 
> WKBEncoder.encodeGeometryHex((Geometry) value));
>             }
When you figure it out send an email to the list and we can make a page 
for the user guide :-)

> Can someone provide me an example on how to convert a WKB to a string and
> convert back a string to a JTS geometry ? I'm not entirely sure on how to do
> this using wkb4j. Any help would be appreciated.
>
> Enam
>   


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Geotools-gt2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to