Peppe,
but still Mike is right. for best performance you should wrap the
FeatureCollection in a TableModel and _not_ duplicate all attributes in memory
as you do now.
..ede
On 13.12.2017 15:45, Giuseppe Aruta wrote:
> On the previous way I can exclude all the search/build of geometry string
On the previous way I can exclude all the search/build of geometry string
and it could be faster (I don't need to get all those POLYGON etc)
public static TableModel setTableModelFromFeatureCollection() {
final DefaultTableModel model = new DefaultTableModel();
String[]
Hi,
May be you can do something even more direct if you put the
featureCollection in an indexed list
ArrayList list = new ArrayList(featureCollection.getFeatures())
Then use the sample in JTable javadoc to build the model :
TableModel dataModel = new AbstractTableModel() {
public
hey Peppe,
looks proper. performancewise i would no convert Lists to Arrays, but iterate
them directly. always keep in mind that datasets might get huge.
..ede
On 13.12.2017 11:01, Giuseppe Aruta wrote:
> Hi Ede
> I checked. It looks complicate for me to load a featurecollection into a
>
Hi Ede
I checked. It looks complicate for me to load a featurecollection into a
JTable.
I found a quick way from Sextante gui, that I modified.
It generates a loop to fill all JTable records with feature values.
I post the code below.
public static TableModel setTableModelFromFeatureCollection(
Peppe,
did you check the AttributeTable plugin? if there is, it will probably be in
use there?
..ede
On 12.12.2017 17:50, Giuseppe Aruta wrote:
> Hi all
> does OJ alreay have a way to load a featurecollection into a JTable?
> I know Geotools has a such way
>
Hi all
does OJ alreay have a way to load a featurecollection into a JTable?
I know Geotools has a such way (
http://docs.geotools.org/stable/userguide/tutorial/filter/query.html):
JTable table
SimpleFeatureCollection features
FeatureCollectionTableModel model = new