public class SHPDriver extends Object implements FileDriver
SHPDriver#initDriver(java.io.File, ShapeType, org.h2gis.drivers.dbf.internal.DbaseFileHeader)
then write row using| Constructor and Description |
|---|
SHPDriver() |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Close the file, free resources.
|
DbaseFileHeader |
getDbaseFileHeader() |
int |
getFieldCount() |
int |
getGeometryFieldIndex() |
Object[] |
getRow(long rowId) |
long |
getRowCount() |
ShapefileHeader |
getShapeFileHeader() |
int |
getSrid()
Get the SRID code
|
void |
initDriver(File shpFile,
ShapeType shapeType,
DbaseFileHeader dbaseHeader)
Init Driver for Write mode
|
void |
initDriverFromFile(File shpFile)
Init this driver from existing files, then open theses files.
|
void |
initDriverFromFile(File shpFile,
String forceEncoding)
Init this driver from existing files, then open theses files.
|
void |
insertRow(Object[] values)
Insert values in the row
|
void |
setGeometryFieldIndex(int geometryFieldIndex) |
void |
setSRID(int srid)
Set a SRID code that will be used for geometries.
|
public File prjFile
public void setGeometryFieldIndex(int geometryFieldIndex)
geometryFieldIndex - The geometry field index in getRow() array.public void insertRow(Object[] values) throws IOException
insertRow in interface FileDrivervalues - IOExceptionpublic int getGeometryFieldIndex()
public void initDriver(File shpFile, ShapeType shapeType, DbaseFileHeader dbaseHeader) throws IOException
shpFile - shapeType - dbaseHeader - IOExceptionpublic void initDriverFromFile(File shpFile) throws IOException
shpFile - Shape file path.IOExceptionpublic void initDriverFromFile(File shpFile, String forceEncoding) throws IOException
shpFile - Shape file path.forceEncoding - If defined use this encoding instead of the one defined in dbf header.IOExceptionpublic DbaseFileHeader getDbaseFileHeader()
public long getRowCount()
getRowCount in interface FileDriverpublic ShapefileHeader getShapeFileHeader()
public void close()
throws IOException
FileDriverclose in interface FileDriverIOExceptionpublic int getFieldCount()
public Object[] getRow(long rowId) throws IOException
getRow in interface FileDriverrowId - Row index [0-getRowCount()[IOException - Read errorpublic void setSRID(int srid)
srid - public int getSrid()
Copyright © 2018 CNRS. All rights reserved.