| TerraLib 4.1

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files
- Examples

- File List
- File Members

Defines | Functions | Variables
E:/Projetos_Primeiro_Semestre_2012/TerraView/terralib/src/shapelib/dbfopen.c File Reference
`#include "shapefil.h"`
`#include <math.h>`
`#include <stdlib.h>`
`#include <ctype.h>`
`#include <string.h>`

## Defines

#define | FALSE 0
#define | TRUE 1

## Functions

DBFHandle SHPAPI_CALL | DBFOpen (const char *pszFilename, const char *pszAccess)
void SHPAPI_CALL | DBFClose (DBFHandle psDBF)
DBFHandle SHPAPI_CALL | DBFCreate (const char *pszFilename)
int SHPAPI_CALL | DBFAddField (DBFHandle psDBF, const char *pszFieldName, DBFFieldType eType, int nWidth, int nDecimals)
int SHPAPI_CALL | DBFReadIntegerAttribute (DBFHandle psDBF, int iRecord, int iField)
double SHPAPI_CALL | DBFReadDoubleAttribute (DBFHandle psDBF, int iRecord, int iField)
const char SHPAPI_CALL1 * | DBFReadStringAttribute (DBFHandle psDBF, int iRecord, int iField){return((const char *) DBFReadAttribute(psDBF, iRecord, iField, 'C')
const char SHPAPI_CALL1 * | DBFReadDateAttribute (DBFHandle psDBF, int iRecord, int iField){return((const char *) DBFReadAttribute(psDBF, iRecord, iField, 'D')
const char SHPAPI_CALL1 * | DBFReadLogicalAttribute (DBFHandle psDBF, int iRecord, int iField){return((const char *) DBFReadAttribute(psDBF, iRecord, iField, 'L')
int SHPAPI_CALL | DBFIsAttributeNULL (DBFHandle psDBF, int iRecord, int iField)
int SHPAPI_CALL | DBFGetFieldCount (DBFHandle psDBF)
int SHPAPI_CALL | DBFGetRecordCount (DBFHandle psDBF)
DBFFieldType SHPAPI_CALL | DBFGetFieldInfo (DBFHandle psDBF, int iField, char *pszFieldName, int *pnWidth, int *pnDecimals)
int | DBFWriteAttributeDirectly (DBFHandle psDBF, int hEntity, int iField, void *pValue)
int SHPAPI_CALL | DBFWriteDoubleAttribute (DBFHandle psDBF, int iRecord, int iField, double dValue)
int SHPAPI_CALL | DBFWriteIntegerAttribute (DBFHandle psDBF, int iRecord, int iField, int nValue)
int SHPAPI_CALL | DBFWriteStringAttribute (DBFHandle psDBF, int iRecord, int iField, const char *pszValue)
int SHPAPI_CALL | DBFWriteDateAttribute (DBFHandle psDBF, int iRecord, int iField, const char *pszValue)
int SHPAPI_CALL | DBFWriteNULLAttribute (DBFHandle psDBF, int iRecord, int iField)
int SHPAPI_CALL | DBFWriteLogicalAttribute (DBFHandle psDBF, int iRecord, int iField, const char lValue)
int SHPAPI_CALL | DBFWriteTuple (DBFHandle psDBF, int hEntity, void *pRawTuple)
const char SHPAPI_CALL1 * | DBFReadTuple (DBFHandle psDBF, int hEntity){intnRecordOffset;unsigned char *pabyRec;static char *pReturnTuple=NULL;static int nTupleLen=0;if(hEntity< 0||hEntity >=psDBF->nRecords) return(NULL
| if (psDBF->nCurrentRecord!=hEntity)
| if (nTupleLen< psDBF->nRecordLength)
| memcpy (pReturnTuple, pabyRec, psDBF->nRecordLength)
| return (pReturnTuple)
DBFHandle SHPAPI_CALL | DBFCloneEmpty (DBFHandle psDBF, const char *pszFilename)
char SHPAPI_CALL | DBFGetNativeFieldType (DBFHandle psDBF, int iField)
int SHPAPI_CALL | DBFGetFieldIndex (DBFHandle psDBF, const char *pszFieldName)

## Variables

| pabyRec = (unsigned char *) psDBF->pszCurrentRecord

## Define Documentation

#define FALSE 0

#define TRUE 1

## Function Documentation

int SHPAPI_CALL DBFAddField | ( | DBFHandle | psDBF,
|  | const char * | pszFieldName,
|  | DBFFieldType | eType,
|  | int | nWidth,
|  | int | nDecimals
| ) |  |

Examples:
  TePDIRaster2Vector_test.cpp, and TePDISegmentation_test.cpp.

DBFHandle SHPAPI_CALL DBFCloneEmpty | ( | DBFHandle | psDBF,
|  | const char * | pszFilename
| ) |  |

void SHPAPI_CALL DBFClose | ( | DBFHandle | psDBF | ) |

Examples:
  TePDIRaster2Vector_test.cpp, and TePDISegmentation_test.cpp.

DBFHandle SHPAPI_CALL DBFCreate | ( | const char * | pszFilename | ) |

Examples:
  TePDIRaster2Vector_test.cpp, and TePDISegmentation_test.cpp.

int SHPAPI_CALL DBFGetFieldCount | ( | DBFHandle | psDBF | ) |

int SHPAPI_CALL DBFGetFieldIndex | ( | DBFHandle | psDBF,
|  | const char * | pszFieldName
| ) |  |

DBFFieldType SHPAPI_CALL DBFGetFieldInfo | ( | DBFHandle | psDBF,
|  | int | iField,
|  | char * | pszFieldName,
|  | int * | pnWidth,
|  | int * | pnDecimals
| ) |  |

char SHPAPI_CALL DBFGetNativeFieldType | ( | DBFHandle | psDBF,
|  | int | iField
| ) |  |

int SHPAPI_CALL DBFGetRecordCount | ( | DBFHandle | psDBF | ) |

int SHPAPI_CALL DBFIsAttributeNULL | ( | DBFHandle | psDBF,
|  | int | iRecord,
|  | int | iField
| ) |  |

DBFHandle SHPAPI_CALL DBFOpen | ( | const char * | pszFilename,
|  | const char * | pszAccess
| ) |  |

const char SHPAPI_CALL1* DBFReadDateAttribute | ( | DBFHandle | psDBF,
|  | int | iRecord,
|  | int | iField
| ) |  | const

double SHPAPI_CALL DBFReadDoubleAttribute | ( | DBFHandle | psDBF,
|  | int | iRecord,
|  | int | iField
| ) |  |

int SHPAPI_CALL DBFReadIntegerAttribute | ( | DBFHandle | psDBF,
|  | int | iRecord,
|  | int | iField
| ) |  |

const char SHPAPI_CALL1* DBFReadLogicalAttribute | ( | DBFHandle | psDBF,
|  | int | iRecord,
|  | int | iField
| ) |  | const

const char SHPAPI_CALL1* DBFReadStringAttribute | ( | DBFHandle | psDBF,
|  | int | iRecord,
|  | int | iField
| ) |  | const

const char SHPAPI_CALL1* DBFReadTuple | ( | DBFHandle | psDBF,
|  | int | hEntity
| ) |  |

int DBFWriteAttributeDirectly | ( | DBFHandle | psDBF,
|  | int | hEntity,
|  | int | iField,
|  | void * | pValue
| ) |  |

int SHPAPI_CALL DBFWriteDateAttribute | ( | DBFHandle | psDBF,
|  | int | iRecord,
|  | int | iField,
|  | const char * | pszValue
| ) |  |

int SHPAPI_CALL DBFWriteDoubleAttribute | ( | DBFHandle | psDBF,
|  | int | iRecord,
|  | int | iField,
|  | double | dValue
| ) |  |

int SHPAPI_CALL DBFWriteIntegerAttribute | ( | DBFHandle | psDBF,
|  | int | iRecord,
|  | int | iField,
|  | int | nValue
| ) |  |

int SHPAPI_CALL DBFWriteLogicalAttribute | ( | DBFHandle | psDBF,
|  | int | iRecord,
|  | int | iField,
|  | const char | lValue
| ) |  |

int SHPAPI_CALL DBFWriteNULLAttribute | ( | DBFHandle | psDBF,
|  | int | iRecord,
|  | int | iField
| ) |  |

int SHPAPI_CALL DBFWriteStringAttribute | ( | DBFHandle | psDBF,
|  | int | iRecord,
|  | int | iField,
|  | const char * | pszValue
| ) |  |

Examples:
  TePDIRaster2Vector_test.cpp, and TePDISegmentation_test.cpp.

int SHPAPI_CALL DBFWriteTuple | ( | DBFHandle | psDBF,
|  | int | hEntity,
|  | void * | pRawTuple
| ) |  |

if | ( | nTupleLen< psDBF-> | nRecordLength | ) |

if | ( | psDBF->nCurrentRecord! | = `hEntity` | ) |

memcpy | ( | pReturnTuple | ,
|  | pabyRec | ,
|  | psDBF-> | nRecordLength
| ) |  |

return | ( | pReturnTuple |  | ) |

## Variable Documentation

pabyRec = (unsigned char *) psDBF->pszCurrentRecord

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines