|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectes.prodevelop.gvsig.mobile.fmap.driver.vect.shp.ShpReader
This class accesses the SHP/DBF file via static JNI functions.
Constructor Summary | |
ShpReader()
|
Method Summary | |
static boolean |
closeDbfFile(long fileHandler)
Closes the file |
static boolean |
closeShpFile(long ptr)
Closes a SHP file |
static boolean |
getDbfBooleanFieldValue(long handler,
int row,
int fieldindex)
Gets a boolean value from a row and field |
static int |
getDbfFileFieldCount(long fileHandler)
Gets the field count of a DBF file |
static java.lang.String |
getDbfFileFieldNames(long fileHandler,
int size)
Gets the field names of a DBF file |
static char[] |
getDbfFileFieldTypes(long fileHandler,
int size)
Gets the field types of a DBF file |
static int[] |
getDbfFileFieldWidths(long fileHandler,
int size)
Gets the field widths of a DBF file |
static int |
getDbfFileRowCount(long fileHandler)
Gets row count |
static double |
getDbfNumberFieldValue(long handler,
int row,
int fieldindex)
Gets a numeric value from a row and field |
static java.lang.String |
getDbfStringFieldValue(long handler,
int row,
int fieldindex)
Gets a string value from a row and field |
static int[] |
getPixelTransformedShape(double[] data,
int size,
double m00,
double m11,
double m02,
double m12,
int dim)
Utility method to transform a geometry with a given affine transform. |
static double[] |
getShapeBounds(long ptr,
int index)
Gets the shapebounds of a geometry |
static double[] |
getShapeWithBox(long ptr,
int index)
Gets the shape as an array of coordinates |
static double[] |
getShpMetadata(long ptr)
Gets SHP metadata |
static long |
openDbfFile(java.lang.String canonicalPath,
boolean write_access)
Opens a DBF file. |
static long |
openShpFile(java.lang.String full_file_path,
boolean write_access)
Opens a SHP file |
static void |
touch()
Utility method to force the load of the DLL library |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public ShpReader()
Method Detail |
public static long openShpFile(java.lang.String full_file_path, boolean write_access)
full_file_path
- file pathwrite_access
- whether a write access is needed
public static boolean closeShpFile(long ptr)
ptr
- the handler of the file to be closed
public static double[] getShpMetadata(long ptr)
ptr
- handler to the SHP file
public static double[] getShapeWithBox(long ptr, int index)
ptr
- handler of the SHP fileindex
- index of the geometry of interest
public static double[] getShapeBounds(long ptr, int index)
ptr
- handler of the SHP fileindex
- index of the geometry of interest
public static int[] getPixelTransformedShape(double[] data, int size, double m00, double m11, double m02, double m12, int dim)
data
- the corrdinates to be transformedsize
- the number of verticesm00
- component of the affine transform matrixm11
- component of the affine transform matrixm02
- component of the affine transform matrixm12
- component of the affine transform matrixdim
- the dimension of the geometry
public static long openDbfFile(java.lang.String canonicalPath, boolean write_access)
canonicalPath
- file pathwrite_access
- whether write access is needed
public static int getDbfFileFieldCount(long fileHandler)
fileHandler
- teh handler of the file of interest
public static char[] getDbfFileFieldTypes(long fileHandler, int size)
fileHandler
- the handler of the file of interestsize
- field count
public static java.lang.String getDbfFileFieldNames(long fileHandler, int size)
fileHandler
- the handler of the file of interestsize
- field count
public static boolean closeDbfFile(long fileHandler)
fileHandler
- the handler of the DBF file to be closed
public static int getDbfFileRowCount(long fileHandler)
fileHandler
- the handler of the file of interest
public static int[] getDbfFileFieldWidths(long fileHandler, int size)
fileHandler
- the handler of the file of interestsize
- field count
public static double getDbfNumberFieldValue(long handler, int row, int fieldindex)
handler
- the handler of the file of interestrow
- the row indexfieldindex
- the field index
public static java.lang.String getDbfStringFieldValue(long handler, int row, int fieldindex)
handler
- the handler of the file of interestrow
- the row indexfieldindex
- the field index
public static boolean getDbfBooleanFieldValue(long handler, int row, int fieldindex)
handler
- the handler of the file of interestrow
- the row indexfieldindex
- the field index
public static void touch()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |