public class OGRVectorDataSource extends VectorDataSource
swigCMemOwn
构造器和说明 |
---|
OGRVectorDataSource(long cPtr,
boolean cMemoryOwn) |
OGRVectorDataSource(Projection projection,
StyleSelector styleSelector,
OGRVectorDataBase dataBase,
int layerIndex)
Constructs a new OGR data source given style selector, OGR database and layer index in database.
|
OGRVectorDataSource(Projection projection,
StyleSelector styleSelector,
java.lang.String fileName)
Constructs a new OGR data source given style selector and OGR supported data file.
|
限定符和类型 | 方法和说明 |
---|---|
void |
add(VectorElement element)
Adds a vector element to the data source.
|
VectorElementVector |
commit()
Commits all changes to actual persistent data source.
|
boolean |
createField(java.lang.String name,
OGRFieldType type,
int width)
Creates a new field with specified name and type.
|
void |
delete() |
boolean |
deleteField(int index)
Deletes an existing field at specified index.
|
protected void |
finalize() |
java.lang.String |
getCodePage()
Returns the current code page used for decoding DBF text data.
|
static java.lang.String |
getConfigOption(java.lang.String name)
Returns the value of global OGR configuration option.
|
static long |
getCPtr(OGRVectorDataSource obj) |
MapBounds |
getDataExtent()
Returns the extent of this data source.
|
int |
getFeatureCount()
Returns the total feature count for this data source.
|
StringVector |
getFieldNames()
Returns the list of existing fields of the data source.
|
GeometrySimplifier |
getGeometrySimplifier()
Returns the active geometry simplifier of the data source.
|
OGRGeometryType |
getGeometryType()
Returns the geometry type of the data source.
|
void |
intersection(VectorElement input,
VectorElementVector listOutPut) |
boolean |
isCommitted()
Returns whether all changes to data source elements have been committed.
|
VectorData |
loadElements(CullState cullState)
Loads all the elements within the defined envelope.
|
VectorElementVector |
query(java.lang.String strSql,
int limit) |
boolean |
remove(VectorElement element)
Removes a vector element from the data source.
|
VectorElementVector |
rollback()
Rolls back all local changes to the data source.
|
void |
setCodePage(java.lang.String codePage)
Specifies the code page to use for decoding DBF text data.
|
static void |
setConfigOption(java.lang.String name,
java.lang.String value)
Sets global OGR configuration option.
|
void |
setGeometrySimplifier(GeometrySimplifier simplifier)
Attaches geometry simplifier to the data source.
|
static OGRVectorDataSource |
swigCreatePolymorphicInstance(long cPtr,
boolean cMemoryOwn)
Creates a polymorphic instance of the given native object.
|
protected void |
swigDirectorDisconnect() |
java.lang.String |
swigGetClassName()
Returns the actual class name of this object.
|
java.lang.Object |
swigGetDirectorObject()
Returns the connected director object.
|
void |
swigReleaseOwnership() |
void |
swigTakeOwnership() |
boolean |
testCapability(java.lang.String capability)
Tests the data source capability.
|
getCPtr, getProjection, notifyElementChanged, notifyElementsChanged, notifyElementsChanged
public OGRVectorDataSource(long cPtr, boolean cMemoryOwn)
public OGRVectorDataSource(Projection projection, StyleSelector styleSelector, java.lang.String fileName)
projection
- The projection to use for data coordinates. Note that if actual data is in different coordinates, coordinates will be re-projected.styleSelector
- The style selector to use when loading geometry from OGR file.fileName
- The full path of the data filejava.lang.Exception
- If the file could not be opened.public OGRVectorDataSource(Projection projection, StyleSelector styleSelector, OGRVectorDataBase dataBase, int layerIndex)
projection
- The projection to use for data coordinates. Note that if actual data is in different coordinates, coordinates will be re-projected.styleSelector
- The style selector to use when loading geometry from OGR file.dataBase
- The database for this data sourcelayerIndex
- The layer to use (layer names are available from database)public static long getCPtr(OGRVectorDataSource obj)
protected void finalize()
finalize
在类中 VectorDataSource
public void delete()
delete
在类中 VectorDataSource
protected void swigDirectorDisconnect()
public void swigReleaseOwnership()
swigReleaseOwnership
在类中 VectorDataSource
public void swigTakeOwnership()
swigTakeOwnership
在类中 VectorDataSource
public static OGRVectorDataSource swigCreatePolymorphicInstance(long cPtr, boolean cMemoryOwn)
cPtr
- The native pointer of the instance.cMemoryOwn
- The ownership flag.public java.lang.String getCodePage()
public void setCodePage(java.lang.String codePage)
codePage
- The codepage to use (for example, "CP1254", or any other iconv encoding)public GeometrySimplifier getGeometrySimplifier()
public void setGeometrySimplifier(GeometrySimplifier simplifier)
simplifier
- The new geometry simplifier to use (can be null).public MapBounds getDataExtent()
public int getFeatureCount()
public OGRGeometryType getGeometryType()
public void add(VectorElement element)
element
- The vector element to be added.public boolean remove(VectorElement element)
element
- The vector element to be removed.public boolean isCommitted()
public VectorElementVector commit()
public VectorElementVector rollback()
public StringVector getFieldNames()
public boolean createField(java.lang.String name, OGRFieldType type, int width)
name
- The name of the field (must be unique)type
- The type of the field.width
- The maximum formatting width (in characters) for string fields. Can be 0 for other field types.public boolean deleteField(int index)
index
- The index of the field to delete (starting from 0).public VectorElementVector query(java.lang.String strSql, int limit)
public VectorData loadElements(CullState cullState)
VectorDataSource
loadElements
在类中 VectorDataSource
cullState
- State for describing view parameters and conservative view envelope.public boolean testCapability(java.lang.String capability)
capability
- The name of the capability (for example, "CreateFeature", "DeleteFeature", etc)public static void setConfigOption(java.lang.String name, java.lang.String value)
name
- The name of the option parameter to set ("SHAPE_ENCODING", for example)value
- The value of the parameter.public static java.lang.String getConfigOption(java.lang.String name)
name
- The name of the the option parameter to read.public void intersection(VectorElement input, VectorElementVector listOutPut)
public java.lang.String swigGetClassName()
swigGetClassName
在类中 VectorDataSource
public java.lang.Object swigGetDirectorObject()
swigGetDirectorObject
在类中 VectorDataSource