How to create and populate shp file with GeoTools API
问题 I need to create an empty shape file and populate it with data from my java colletion. Can someone show me an example of how to achieve this? Thanks in advance. 回答1: For full details please see the CSV to Shapefile tutorial. Basically you need to define the Shapefiles columns in a SimpleFeatureType object, the easiest way to do this is to use a SimpleFeatureTypeBuilder . Here is generated from directly using a utility method to save time. final SimpleFeatureType TYPE = DataUtilities