Hi Mohammed,
org.gdms.jgrapht.INode contains a com.vividsolutions.jts.geom.Geometry.
I wrote this method quickly but without testing it (code is in Groovy):
void addNodesAsNewLayer(List<INode> nodes, LayerManager layerManager) {
def schema = new FeatureSchema()
schema.addAttribute("geometry", AttributeType.GEOMETRY)
def collection = new FeatureDataset(schema)
for (INode node in nodes) {
def feature = new BasicFeature(schema)
feature.setAttribute("geometry", node.getGeometry())
collection.add(feature)
}
layerManager.addLayer(StandardCategoryNames.WORKING,
"inodes", collection)
}
Greetings,
Benjamin
2010/12/18 Mohammed Rashad <mohammedrasha...@gmail.com>
>
> How to create a layer using a list of INode Values in OpenJUMP using
> jgrapht?
> --
> Rashad
>
>
> ------------------------------------------------------------------------------
> Lotusphere 2011
> Register now for Lotusphere 2011 and learn how
> to connect the dots, take your collaborative environment
> to the next level, and enter the era of Social Business.
> http://p.sf.net/sfu/lotusphere-d2d
> _______________________________________________
> Jump-pilot-devel mailing list
> Jump-pilot-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel
>
>
------------------------------------------------------------------------------
Lotusphere 2011
Register now for Lotusphere 2011 and learn how
to connect the dots, take your collaborative environment
to the next level, and enter the era of Social Business.
http://p.sf.net/sfu/lotusphere-d2d
_______________________________________________
Jump-pilot-devel mailing list
Jump-pilot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel