Re: [JPP-Devel] Startpoint/Endpoint X and Y with BeanShell

2013-04-02 Thread Michaël Michaud
Hi, > I placed counter like this > > paths = new ArrayList();; > count = 0; > for (Iterator i = fc.getFeatures().iterator(); i.hasNext();) { > Feature feature = (Feature) i.next(); > LineString lineString = (LineString)feature.getGeometry(); > URL url; >

Re: [JPP-Devel] Startpoint/Endpoint X and Y with BeanShell

2013-04-02 Thread Rahkonen Jukka
Hi, I placed counter like this paths = new ArrayList();; count = 0; for (Iterator i = fc.getFeatures().iterator(); i.hasNext();) { Feature feature = (Feature) i.next(); LineString lineString = (LineString)feature.getGeometry(); URL url; try { ...SNIP.

Re: [JPP-Devel] Startpoint/Endpoint X and Y with BeanShell

2013-04-01 Thread Michaël Michaud
Hi Jukka, You can easily pick start and end point with Geometry geometry = feature.getGeometry(); // this will return something whatever the geometry is Coordinate[] cc = geometry.getCoordinates(); x_start = cc[0].x; y_start = cc[0].y; x_end = cc[cc.length-1].x; y_end = cc[cc.length-1].y; // thi