On 2012-08-21 23:00, leiche im teich wrote:
> Hi,
>
> i use most of the code from the Csv2Shape example 
> http://docs.geotools.org/latest/userguide/tutorial/feature/csv2shp.html to 
> generate a shape file from my own special csv file. The problem is, 
> that i need the same order of the features as in the csv file. I add 
> the features in the same order as in the csv file, but in the 
> resulting shape file i get an other order :-(
>
> How can i ensure the same order in the shapefile?
>
>

You can't, but you can add an attribute with the original line number 
from the CSV and sort on that.

Like the results from a SQL SELECT, the order is implementation 
dependent and not guaranteed unless you use ORDER BY.

Matthijs


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
GeoTools-Devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel

Reply via email to