From: Chris H. <ch...@op...> - 2003-10-16 14:28:45
|
First, sorry about the duplicate fidColumn stuff. My bad, I should have read the code more closely. Second, the QueryDataObject sounds good, I'll try it out with postgis today. > DefaultFeatureReader is doing this: > > if (attributeReader.hasNext()) { > attributeReader.next(); > f = readFeature(attributeReader); > } > > This is causing the first row to get missed. So I guess we need to nail down the way this should work. My assumption was this: > > hasNext() - Gets whether there are more rows. > next() - moves to the next row. > read() - gets the feature at the current row. > > An the initial position is at the first row. > > So you can go: > > while (fr.hasNext()) { > Feature f = fr.read(); > fr.next(); > } > > Is this what everyone else is thinking? Yeah, I noticed this too. My assumption was the same as yours, that attribute readers should start at the first row, and was thrown off as well when my first row was being skipped. I fixed mine to work the way DefaultFeatureType is written, as I could see it working the way it is now. But I think the second way makes more sense. Chris > > Sean. > > Sean Geoghegan > Information Exploitation Group > Command and Intelligence Environments Branch > Command and Control Division > Defence Science and Technology Organisation > sea...@ds... ph +61 08 82595895 > > > > ------------------------------------------------------- > This SF.net email is sponsored by: SF.net Giveback Program. > SourceForge.net hosts over 70,000 Open Source Projects. > See the people who have HELPED US provide better services: > Click here: http://sourceforge.net/supporters.php > _______________________________________________ > Geotools-devel mailing list > Geo...@li... > https://lists.sourceforge.net/lists/listinfo/geotools-devel > -- |