If you're using MemoryFeatureCollection, it's backed by a TreeMap which sorts by Feature Id. You could use LeanFeatureCollection as an alternative. I think it's slated for addition to GeoTools at some future date (not sure if it's in the 2.7-M releases), but if it's not availabe now you could just add it to your own source tree until it's available in standard GeoTools. See:
http://jira.codehaus.org/browse/GEOT-3091 and http://sourceforge.net/mailarchive/message.php?msg_name=1271954806.732931894%40192.168.2.228 -Larry On Thu, Sep 16, 2010 at 5:12 AM, GTn00b <[email protected]> wrote: > > Hello, > > I've noticed that when writing a shapefile, the original line order of the > source (e.g. csv file) is not maintained. I believe this is due to Features > being not specifically ordered within the FeatureCollection? I saw somewhere > that a FeatureList may be an option, but I'm not sure if this is still > implemented in GeoTools. > > So, is it possible to maintain the line order of the source when creating a > shapefile? > > Thanks. > -- > View this message in context: > http://osgeo-org.1803224.n2.nabble.com/Maintaining-line-order-when-creating-a-shapefile-tp5537984p5537984.html > Sent from the geotools-gt2-users mailing list archive at Nabble.com. > > ------------------------------------------------------------------------------ > Start uncovering the many advantages of virtual appliances > and start using them to simplify application deployment and > accelerate your shift to cloud computing. > http://p.sf.net/sfu/novell-sfdev2dev > _______________________________________________ > Geotools-gt2-users mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users > ------------------------------------------------------------------------------ Start uncovering the many advantages of virtual appliances and start using them to simplify application deployment and accelerate your shift to cloud computing. http://p.sf.net/sfu/novell-sfdev2dev _______________________________________________ Geotools-gt2-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
