Luca,

Can you post your whole source code file? Can you describe what you
are trying to do? Are you writing a plug-in?

If I can look at all of the Java class file I might be able to help
you figure out what is going on. Stefan is likely correct about
needing to use an EditTransaction object. I can't remember the last
time I did this, but we can figure it out. If nothing else, this will
allow the user to undo the changes your plug-in will enable.

Send us that source code file. :]

The Sunburned Surveyor


On Tue, Jan 5, 2010 at 2:03 AM, Stefan Steiniger <sst...@geo.uzh.ch> wrote:
> Hei Luca,
>
> I think you would need to use EditTransaction's if you operate on a
> layer directly and not create a new layer from the results.
>
> see for instance this class:
> org.openjump.core.ui.plugin.mousemenu.MoveAlongAnglePlugIn
>
> or this:
> com.vividsolutions.jump.workbench.ui.cursortool.editing.DeleteVertexTool.java
>
> stefan
>
> luca marletta schrieb:
>> Hi all and Good New Year!!
>>
>> I'm trying to use the class deleteVertices from
>>  import com.vividsolutions.jump.workbench.ui.GeometryEditor;
>>
>> Geometry newGeom = new GeometryEditor().deleteVertices( (Geometry)
>> g.clone(), (List) badPts );
>>
>>
>> Under Eclipse all is good, compiled and works but no effect on
>> geometry, it doesn't remove vertex in the collection
>>
>>                               BasicFeature fixedf = new 
>> BasicFeature(fixedfs);
>>                               FeatureUtil.copyAttributes(fc.get(j), fixedf);
>>                               Geometry newGeom = new 
>> GeometryEditor().deleteVertices( (Geometry)
>> g.clone(), (List) badPts );
>>                               if (newGeom.isValid()) 
>> fixedf.setGeometry(newGeom);
>>                               fixedFC.add(fixedf);
>>
>>
>> could someone posts some line of code for add, move or remove vertices
>>
>>
>> thanks
>>
>> luca
>>
>> luca marletta
>> www.beopen.it
>>
>> ------------------------------------------------------------------------------
>> This SF.Net email is sponsored by the Verizon Developer Community
>> Take advantage of Verizon's best-in-class app development support
>> A streamlined, 14 day to market process makes app distribution fast and easy
>> Join now and get one step closer to millions of Verizon customers
>> http://p.sf.net/sfu/verizon-dev2dev
>> _______________________________________________
>> Jump-pilot-devel mailing list
>> Jump-pilot-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel
>>
>>
>
> ------------------------------------------------------------------------------
> This SF.Net email is sponsored by the Verizon Developer Community
> Take advantage of Verizon's best-in-class app development support
> A streamlined, 14 day to market process makes app distribution fast and easy
> Join now and get one step closer to millions of Verizon customers
> http://p.sf.net/sfu/verizon-dev2dev
> _______________________________________________
> Jump-pilot-devel mailing list
> Jump-pilot-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel
>

------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev 
_______________________________________________
Jump-pilot-devel mailing list
Jump-pilot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel

Reply via email to