thank you too for your further investigation. Yep, changing all the methods is a bit of an headache. I haven't found out yet (i.e. traced) if the createX() methods are really used to create a new FeatureCollection...
But it is good that you found only two algorithms. I forwarded that your email to sextante-dev. Lets see what they say... well last time it was silence ;) thanks! stefan Am 08.11.12 19:19, schrieb Michaël Michaud: > Hi Stefan, > > Good catch ! > > It would be fine if the problem could be catched earlier. > I've not a clear view of what's happening but there are at least two places > in Sextante binding where a FeatureSchema with a null type can be created : > > es.unex.sextante.openjump.core.OpenJUMPTable#create(String,Class[],String[],String) > and > es.unex.sextante.openjump.core.OpenJUMPVectorLayer#create(String,Class[],String[],String) > > If we patch these method, we must also take care of the attributes > themselves in > addRecord(final Object[]) > and addFeature(Geometry,Object[]) > > Of course, there is still the question of the conversion (to int or to > String) > > The best solution would probably be to eliminate Long.class attribute > from Sextante > algorithms. > I found only two algo which create "Long.class" attributes > FixedDistanceBufferAlgorithm > VariableDistanceBufferAlgorithm > > The attribute is used to set an id to the features, but there is little > chance to > exceed 2^31 features in a Sextante process. > Moreover, in the schema used for these algorithms, there seems to be a bug > sFieldNames[0] = "ID"; > sFieldNames[1] = "FROM"; > sFieldNames[1] = "TO"; > > my 2 cents > > Michaël > >> Hi, >> >> as I wrote earlier I discovered that the fixed buffer tool from Sextante >> results in an error message with OpenJUMP, when Sextante tries to write >> a newly created vector dataset as shapefile. >> >> Note: When Sextante creates a new layer, it does not add the layer >> in-memory/directly to OJ, but it writes the data into a shapefile first >> (using OJs shapefile writer) and then re-loads the shapefiles into OJ. >> >> Now I figured that the exception is thrown because Sextante uses the >> AttributeType long, which OJ does not know. >> I have modified ShapefileWriter now to see if an attribute has a name in >> case the AttributeType is null. If it has a name, then the attribute is >> treated as String. This way we have at least some output from Sextante. >> But it is not optimal and I wonder if there are more such things? >> >> The Long (64) values can not be safely converted to Int (32) values. So >> it would not make sense to just set the type from Long to Int (in >> AttributeType). >> >> Any ideas? or just leaving as is except my modifications to the >> shapefile writer? >> Not sure if it would have any value to implement AttributeType.LONG; I >> doubt it. >> >> cheers, >> stefan >> >> >> >> ------------------------------------------------------------------------------ >> Everyone hates slow websites. So do we. >> Make your web apps faster with AppDynamics >> Download AppDynamics Lite for free today: >> http://p.sf.net/sfu/appdyn_d2d_nov >> _______________________________________________ >> Jump-pilot-devel mailing list >> [email protected] >> https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel >> >> > > > ------------------------------------------------------------------------------ > Everyone hates slow websites. So do we. > Make your web apps faster with AppDynamics > Download AppDynamics Lite for free today: > http://p.sf.net/sfu/appdyn_d2d_nov > _______________________________________________ > Jump-pilot-devel mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel > ------------------------------------------------------------------------------ Everyone hates slow websites. So do we. Make your web apps faster with AppDynamics Download AppDynamics Lite for free today: http://p.sf.net/sfu/appdyn_d2d_nov _______________________________________________ Jump-pilot-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel
