Your database needs to know how to encode a geometry. You can use the database 
support built into GeoTools. Our you can call the "well known text" encoder to 
turn a geometry into a string. Some geometry is larger than you can store in a 
string you you may also consider storing as "well known binary".

There are some examples here:
- http://docs.geotools.org/latest/userguide/library/jts/geometry.html
- http://tsusiatsoftware.net/jts/jts-features.html

-- 
Jody Garnett


On Thursday, 9 June 2011 at 10:33 PM, khalid Amiral wrote:

>  Hello,
> I extract feature with ((SimpleFeature) feature).getAttribute("the_geom") 
> from layer by using WFS But when i want to save the result in DB (type 
> Attribute geometry)  it give me an error of Type and I suspected that the 
> result returned is a string.
> Also, I used Geometry geom = (Geometry) feature.getDefaultGeometryProperty() 
> and it still gives me error! How can I do? 
> 
> Thank you in advance
> ------------------------------------------------------------------------------
> EditLive Enterprise is the world's most technically advanced content
> authoring tool. Experience the power of Track Changes, Inline Image
> Editing and ensure content is compliant with Accessibility Checking.
> http://p.sf.net/sfu/ephox-dev2dev
> _______________________________________________
> Geotools-gt2-users mailing list
> [email protected] 
> (mailto:[email protected])
> https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

------------------------------------------------------------------------------
EditLive Enterprise is the world's most technically advanced content
authoring tool. Experience the power of Track Changes, Inline Image
Editing and ensure content is compliant with Accessibility Checking.
http://p.sf.net/sfu/ephox-dev2dev
_______________________________________________
Geotools-gt2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to