У меня есть массив объектов JTS Geometry, которые мне нужно поместить в файл формы. У меня также есть некоторые другие атрибуты, которые должны быть в файле DBase. Мне также нужно проиндексировать пространственные объекты и при необходимости создать файл проекции. Есть ли способ сделать это с помощью JTS/GeoTools. Я попробовал ShapeFileWriter, но этого оказалось недостаточно (например, нет поддержки dbf).
public Shape(String shpFileName, String shxFileName) throws FileNotFoundException {
RandomAccessFile shpFile = new RandomAccessFile(shpFileName, "rw");
this.shpChannel = shpFile.getChannel();
RandomAccessFile shxFile = new RandomAccessFile(shxFileName, "rw");
this.shxChannel = shxFile.getChannel();
}
public void createShapeFile(GeometryCollection geometries, ShapeType shapeType) throws IOException {
ShapefileWriter writer = new ShapefileWriter(this.shpChannel, this.shxChannel);
writer.write(geometries, shapeType);
writer.close();
}