OGReMeC++ C++ API

OGRFeature类

classOGRFeature

A simple feature, including geometry and attributes.

公共职能

OGRFeature(OGRFeatureDefn*)

Constructor.

Note that the OGRFeature will increment the reference count of its defining OGRFeatureDefn. Destruction of the OGRFeatureDefn before destruction of all OGRFeatures that depend on it is likely to result in a crash.

This method is the same as the C function OGR_F_Create().

Parameters

  • poDefnIn: feature class (layer) definition to which the feature will adhere.

ConstFieldIteratorbegin()const

Return begin of field value iterator.

Using this iterator for standard range-based loops is safe, but due to implementation limitations, you shouldn't try to access (dereference) more than one iterator step at a time, since you will get a reference to the same object (FieldValue) at each iteration step.

Since

GDAL 2.3

ConstFieldIteratorend()const

Return end of field value iterator.

constFieldValueoperator[](int iField)const

Return a field value.

Return

the field value.

Since

GDAL 2.3

Parameters

  • iField: the field to fetch, from 0 to GetFieldCount()-1. This is not checked by the method !

FieldValueoperator[](int iField)

Return a field value.

Return

the field value.

Since

GDAL 2.3

Parameters

  • iField: the field to fetch, from 0 to GetFieldCount()-1. This is not checked by the method !

constFieldValueoperator[](const char *pszFieldName)const

Return a field value.

Return

the field value, or throw a FieldNotFoundException if not found.

Since

GDAL 2.3

Parameters

  • pszFieldName: field name

FieldValueoperator[](const char *pszFieldName)

Return a field value.

Return

the field value, or throw a FieldNotFoundException if not found.

Since

GDAL 2.3

Parameters

  • pszFieldName: field name

OGRFeatureDefn *GetDefnRef()

Fetch feature definition.

This method is the same as the C function OGR_F_GetDefnRef().

This method is the same as the C function

OGR_F_GetDefnRef().

Return

a reference to the feature definition object.

Return

a reference to the feature definition object.

Since

GDAL 2.3

OGRErrSetGeometryDirectly(OGRGeometry*)

Set feature geometry.

This method updates the features geometry, and operate exactly as SetGeometry(), except that this method assumes ownership of the passed geometry (even in case of failure of that function).

This method is the same as the C function OGR_F_SetGeometryDirectly().

Note

This method has only an effect on the in-memory feature object. If this object comes from a layer and the modifications must be serialized back to the datasource, OGR_L_SetFeature() must be used afterwards. Or if this is a new feature, OGR_L_CreateFeature() must be used afterwards.

Return

OGRERR_NONE if successful, or OGR_UNSUPPORTED_GEOMETRY_TYPE if the geometry type is illegal for the OGRFeatureDefn (checking not yet implemented).

Parameters

  • poGeomIn: new geometry to apply to feature. Passing NULL value here is correct and it will result in deallocation of currently assigned geometry without assigning new one.

OGRErrSetGeometry(constOGRGeometry*)

Set feature geometry.

This method updates the features geometry, and operate exactly as SetGeometryDirectly(), except that this method does not assume ownership of the passed geometry, but instead makes a copy of it.

This method is the same as the C function OGR_F_SetGeometry().

Note

This method has only an effect on the in-memory feature object. If this object comes from a layer and the modifications must be serialized back to the datasource, OGR_L_SetFeature() must be used afterwards. Or if this is a new feature, OGR_L_CreateFeature() must be used afterwards.

Return

OGRERR_NONE if successful, or OGR_UNSUPPORTED_GEOMETRY_TYPE if the geometry type is illegal for the OGRFeatureDefn (checking not yet implemented).

Parameters

  • poGeomIn: new geometry to apply to feature. Passing NULL value here is correct and it will result in deallocation of currently assigned geometry without assigning new one.

OGRGeometry *GetGeometryRef()

Fetch pointer to feature geometry.

This method is essentially the same as the C function OGR_F_GetGeometryRef(). (the only difference is that the C function honours OGRGetNonLinearGeometriesEnabledFlag())

Starting with GDAL 1.11, this is equivalent to calling OGRFeature::GetGeomFieldRef(0).

This method is essentially the same as the C function

OGR_F_GetGeometryRef(). (the only difference is that the C function honours OGRGetNonLinearGeometriesEnabledFlag())

Return

pointer to internal feature geometry. This object should not be modified.

Return

pointer to internal feature geometry. This object should not be modified.

Since

GDAL 2.3

OGRGeometry *StealGeometry()

Take away ownership of geometry.

Fetch the geometry from this feature, and clear the reference to the geometry on the feature. This is a mechanism for the application to take over ownership of the geometry from the feature without copying. Sort of an inverse to SetGeometryDirectly().

After this call the OGRFeature will have a NULL geometry.

Return

the pointer to the geometry.

int GetGeomFieldCount()const

Fetch number of geometry fields on this feature. This will always be the same as the geometry field count for the OGRFeatureDefn.

This method is the same as the C function OGR_F_GetGeomFieldCount().

Return

count of geometry fields.

Since

GDAL 1.11

OGRGeomFieldDefn *GetGeomFieldDefnRef(int iField)

Fetch definition for this geometry field.

This method is the same as the C function OGR_F_GetGeomFieldDefnRef().

Return

the field definition (from the OGRFeatureDefn). This is an internal reference, and should not be deleted or modified.

Since

GDAL 1.11

Parameters

  • iGeomField: the field to fetch, from 0 to GetGeomFieldCount()-1.

constOGRGeomFieldDefn *GetGeomFieldDefnRef(int iField)const

Fetch definition for this geometry field.

This method is the same as the C function OGR_F_GetGeomFieldDefnRef().

Return

the field definition (from the OGRFeatureDefn). This is an internal reference, and should not be deleted or modified.

Since

GDAL 2.3

Parameters

  • iGeomField: the field to fetch, from 0 to GetGeomFieldCount()-1.

int GetGeomFieldIndex(const char *pszName)const

Fetch the geometry field index given geometry field name.

This is a cover for the OGRFeatureDefn::GetGeomFieldIndex() method.

This method is the same as the C function OGR_F_GetGeomFieldIndex().

Return

the geometry field index, or -1 if no matching geometry field is found.

Since

GDAL 1.11

Parameters

  • pszName: the name of the geometry field to search for.

OGRGeometry *GetGeomFieldRef(int iField)

Fetch pointer to feature geometry.

This method is the same as the C function OGR_F_GetGeomFieldRef().

Return

pointer to internal feature geometry. This object should not be modified.

Since

GDAL 1.11

Parameters

  • iField: geometry field to get.

constOGRGeometry *GetGeomFieldRef(int iField)const

Fetch pointer to feature geometry.

This method is the same as the C function OGR_F_GetGeomFieldRef().

Return

pointer to internal feature geometry. This object should not be modified.

Since

GDAL 2.3

Parameters

  • iField: geometry field to get.

OGRGeometry *StealGeometry(int iField)

Take away ownership of geometry.

Fetch the geometry from this feature, and clear the reference to the geometry on the feature. This is a mechanism for the application to take over ownership of the geometry from the feature without copying. Sort of an inverse to SetGeometryDirectly().

After this call the OGRFeature will have a NULL geometry.

Return

the pointer to the geometry.

Parameters

  • iGeomField: index of the geometry field.

OGRGeometry *GetGeomFieldRef(const char *pszFName)

Fetch pointer to feature geometry.

Return

pointer to internal feature geometry. This object should not be modified.

Since

GDAL 1.11

Parameters

  • pszFName: name of geometry field to get.

constOGRGeometry *GetGeomFieldRef(const char *pszFName)const

Fetch pointer to feature geometry.

Return

pointer to internal feature geometry. This object should not be modified.

Since

GDAL 2.3

Parameters

  • pszFName: name of geometry field to get.

OGRErrSetGeomFieldDirectly(int iField, OGRGeometry*)

Set feature geometry of a specified geometry field.

This method updates the features geometry, and operate exactly as SetGeomField(), except that this method assumes ownership of the passed geometry (even in case of failure of that function).

This method is the same as the C function OGR_F_SetGeomFieldDirectly().

Return

OGRERR_NONE if successful, or OGRERR_FAILURE if the index is invalid, or OGRERR_UNSUPPORTED_GEOMETRY_TYPE if the geometry type is illegal for the OGRFeatureDefn (checking not yet implemented).

Since

GDAL 1.11

Parameters

  • iField: geometry field to set.

  • poGeomIn: new geometry to apply to feature. Passing NULL value here is correct and it will result in deallocation of currently assigned geometry without assigning new one.

OGRErrSetGeomField(int iFieldconstOGRGeometry*)

Set feature geometry of a specified geometry field.

This method updates the features geometry, and operate exactly as SetGeomFieldDirectly(), except that this method does not assume ownership of the passed geometry, but instead makes a copy of it.

This method is the same as the C function OGR_F_SetGeomField().

Return

OGRERR_NONE if successful, or OGRERR_FAILURE if the index is invalid, or OGR_UNSUPPORTED_GEOMETRY_TYPE if the geometry type is illegal for the OGRFeatureDefn (checking not yet implemented).

Since

GDAL 1.11

Parameters

  • iField: geometry field to set.

  • poGeomIn: new geometry to apply to feature. Passing NULL value here is correct and it will result in deallocation of currently assigned geometry without assigning new one.

OGRFeature *Clone()const

Duplicate feature.

The newly created feature is owned by the caller, and will have its own reference to the OGRFeatureDefn.

This method is the same as the C function OGR_F_Clone().

Return

new feature, exactly matching this feature. Or, starting with GDAL 2.1, NULL in case of out of memory situation.

OGRBooleanEqual(constOGRFeature *poFeature)const

Test if two features are the same.

Two features are considered equal if the share them (pointer equality) same OGRFeatureDefn, have the same field values, and the same geometry (as tested by OGRGeometry::Equal()) as well as the same feature id.

This method is the same as the C function OGR_F_Equal().

Return

TRUE if they are equal, otherwise FALSE.

Parameters

  • poFeature: the other feature to test this one against.

int GetFieldCount()const

Fetch number of fields on this feature. This will always be the same as the field count for the OGRFeatureDefn.

This method is the same as the C function OGR_F_GetFieldCount().

Return

count of fields.

constOGRFieldDefn *GetFieldDefnRef(int iField)const

Fetch definition for this field.

This method is the same as the C function OGR_F_GetFieldDefnRef().

Return

the field definition (from the OGRFeatureDefn). This is an internal reference, and should not be deleted or modified.

Since

GDAL 2.3

Parameters

  • iField: the field to fetch, from 0 to GetFieldCount()-1.

OGRFieldDefn *GetFieldDefnRef(int iField)

Fetch definition for this field.

This method is the same as the C function OGR_F_GetFieldDefnRef().

Return

the field definition (from the OGRFeatureDefn). This is an internal reference, and should not be deleted or modified.

Parameters

  • iField: the field to fetch, from 0 to GetFieldCount()-1.

int GetFieldIndex(const char *pszName)const

Fetch the field index given field name.

This is a cover for the OGRFeatureDefn::GetFieldIndex() method.

This method is the same as the C function OGR_F_GetFieldIndex().

Return

the field index, or -1 if no matching field is found.

Parameters

  • pszName: the name of the field to search for.

int IsFieldSet(int iField)const

Test if a field has ever been assigned a value or not.

This method is the same as the C function OGR_F_IsFieldSet().

Return

TRUE if the field has been set, otherwise false.

Parameters

  • iField: the field to test.

void UnsetField(int iField)

Clear a field, marking it as unset.

This method is the same as the C function OGR_F_UnsetField().

Parameters

  • iField: the field to unset.

bool IsFieldNull(int iField)const

Test if a field is null.

This method is the same as the C function OGR_F_IsFieldNull().

Return

TRUE if the field is null, otherwise false.

Since

GDAL 2.2

Parameters

  • iField: the field to test.

void SetFieldNull(int iField)

Clear a field, marking it as null.

This method is the same as the C function OGR_F_SetFieldNull().

Since

GDAL 2.2

Parameters

  • iField: the field to set to null.

bool IsFieldSetAndNotNull(int iField)const

Test if a field is set and not null.

This method is the same as the C function OGR_F_IsFieldSetAndNotNull().

Return

TRUE if the field is set and not null, otherwise false.

Since

GDAL 2.2

Parameters

  • iField: the field to test.

OGRField *GetRawFieldRef(int i)

Fetch a pointer to the internal field value given the index.

This method is the same as the C function OGR_F_GetRawFieldRef().

Return

the returned pointer is to an internal data structure, and should not be freed, or modified.

Parameters

  • iField: the field to fetch, from 0 to GetFieldCount()-1.

constOGRField *GetRawFieldRef(int i)const

Fetch a pointer to the internal field value given the index.

This method is the same as the C function OGR_F_GetRawFieldRef().

Return

the returned pointer is to an internal data structure, and should not be freed, or modified.

Since

GDAL 2.3

Parameters

  • iField: the field to fetch, from 0 to GetFieldCount()-1.

int GetFieldAsInteger(int i)const

Fetch field value as integer.

OFTString features will be translated using atoi(). OFTReal fields will be cast to integer. OFTInteger64 are demoted to 32 bit, with clamping if out-of-range. Other field types, or errors will result in a return value of zero.

This method is the same as the C function OGR_F_GetFieldAsInteger().

Return

the field value.

Parameters

  • iField: the field to fetch, from 0 to GetFieldCount()-1.

GIntBigGetFieldAsInteger64(int i)const

Fetch field value as integer 64 bit.

OFTInteger are promoted to 64 bit. OFTString features will be translated using CPLAtoGIntBig(). OFTReal fields will be cast to integer. Other field types, or errors will result in a return value of zero.

This method is the same as the C function OGR_F_GetFieldAsInteger64().

Return

the field value.

Since

GDAL 2.0

Parameters

  • iField: the field to fetch, from 0 to GetFieldCount()-1.

double GetFieldAsDouble(int i)const

Fetch field value as a double.

OFTString features will be translated using CPLAtof(). OFTInteger and OFTInteger64 fields will be cast to double. Other field types, or errors will result in a return value of zero.

This method is the same as the C function OGR_F_GetFieldAsDouble().

Return

the field value.

Parameters

  • iField: the field to fetch, from 0 to GetFieldCount()-1.

const char *GetFieldAsString(int i)const

Fetch field value as a string.

OFTReal and OFTInteger fields will be translated to string using sprintf(), but not necessarily using the established formatting rules. Other field types, or errors will result in a return value of zero.

This method is the same as the C function OGR_F_GetFieldAsString().

Return

the field value. This string is internal, and should not be modified, or freed. Its lifetime may be very brief.

Parameters

  • iField: the field to fetch, from 0 to GetFieldCount()-1.

const int *GetFieldAsIntegerList(int i, int *pnCount)const

Fetch field value as a list of integers.

Currently this method only works for OFTIntegerList fields.

This method is the same as the C function OGR_F_GetFieldAsIntegerList().

Return

the field value. This list is internal, and should not be modified, or freed. Its lifetime may be very brief. If *pnCount is zero on return the returned pointer may be NULL or non-NULL.

Parameters

  • iField: the field to fetch, from 0 to GetFieldCount()-1.

  • pnCount: an integer to put the list count (number of integers) into.

constGIntBig *GetFieldAsInteger64List(int i, int *pnCount)const

Fetch field value as a list of 64 bit integers.

Currently this method only works for OFTInteger64List fields.

This method is the same as the C function OGR_F_GetFieldAsInteger64List().

Return

the field value. This list is internal, and should not be modified, or freed. Its lifetime may be very brief. If *pnCount is zero on return the returned pointer may be NULL or non-NULL.

Since

GDAL 2.0

Parameters

  • iField: the field to fetch, from 0 to GetFieldCount()-1.

  • pnCount: an integer to put the list count (number of integers) into.

const double *GetFieldAsDoubleList(int i, int *pnCount)const

Fetch field value as a list of doubles.

Currently this method only works for OFTRealList fields.

This method is the same as the C function OGR_F_GetFieldAsDoubleList().

Return

the field value. This list is internal, and should not be modified, or freed. Its lifetime may be very brief. If *pnCount is zero on return the returned pointer may be NULL or non-NULL.

Parameters

  • iField: the field to fetch, from 0 to GetFieldCount()-1.

  • pnCount: an integer to put the list count (number of doubles) into.

char **GetFieldAsStringList(int i)const

Fetch field value as a list of strings.

Currently this method only works for OFTStringList fields.

The returned list is terminated by a NULL pointer. The number of elements can also be calculated using CSLCount().

This method is the same as the C function OGR_F_GetFieldAsStringList().

Return

the field value. This list is internal, and should not be modified, or freed. Its lifetime may be very brief.

Parameters

  • iField: the field to fetch, from 0 to GetFieldCount()-1.

GByte *GetFieldAsBinary(int i, int *pnCount)const

Fetch field value as binary data.

This method only works for OFTBinary and OFTString fields.

This method is the same as the C function OGR_F_GetFieldAsBinary().

Return

the field value. This data is internal, and should not be modified, or freed. Its lifetime may be very brief.

Parameters

  • iField: the field to fetch, from 0 to GetFieldCount()-1.

  • pnBytes: location to put the number of bytes returned.

int GetFieldAsDateTime(int i, int *pnYear, int *pnMonth, int *pnDay, int *pnHour, int *pnMinute, int *pnSecond, int *pnTZFlag)const

Fetch field value as date and time.

Currently this method only works for OFTDate, OFTTime and OFTDateTime fields.

This method is the same as the C function OGR_F_GetFieldAsDateTime().

Return

TRUE on success or FALSE on failure.

Parameters

  • iField: the field to fetch, from 0 to GetFieldCount()-1.

  • pnYear: (including century)

  • pnMonth: (1-12)

  • pnDay: (1-31)

  • pnHour: (0-23)

  • pnMinute: (0-59)

  • pnSecond: (0-59)

  • pnTZFlag: (0=unknown, 1=localtime, 100=GMT, see data model for details)

int GetFieldAsDateTime(int i, int *pnYear, int *pnMonth, int *pnDay, int *pnHour, int *pnMinute, float *pfSecond, int *pnTZFlag)const

Fetch field value as date and time.

Currently this method only works for OFTDate, OFTTime and OFTDateTime fields.

This method is the same as the C function OGR_F_GetFieldAsDateTime().

Return

TRUE on success or FALSE on failure.

Parameters

  • iField: the field to fetch, from 0 to GetFieldCount()-1.

  • pnYear: (including century)

  • pnMonth: (1-12)

  • pnDay: (1-31)

  • pnHour: (0-23)

  • pnMinute: (0-59)

  • pfSecond: (0-59 with millisecond accuracy)

  • pnTZFlag: (0=unknown, 1=localtime, 100=GMT, see data model for details)

char *GetFieldAsSerializedJSon(int i)const

Fetch field value as a serialized JSon object.

Currently this method only works for OFTStringList, OFTIntegerList, OFTInteger64List and OFTRealList

Return

a string that must be de-allocate with CPLFree()

Since

GDAL 2.2

Parameters

  • iField: the field to fetch, from 0 to GetFieldCount()-1.

int GetFieldAsInteger(const char *pszFName)const

Fetch field value as integer.

OFTString features will be translated using atoi(). OFTReal fields will be cast to integer. OFTInteger64 are demoted to 32 bit, with clamping if out-of-range. Other field types, or errors will result in a return value of zero.

Return

the field value.

Parameters

  • pszFName: the name of the field to fetch.

GIntBigGetFieldAsInteger64(const char *pszFName)const

Fetch field value as integer 64 bit.

OFTInteger are promoted to 64 bit. OFTString features will be translated using CPLAtoGIntBig(). OFTReal fields will be cast to integer. Other field types, or errors will result in a return value of zero.

Return

the field value.

Parameters

  • pszFName: the name of the field to fetch.

double GetFieldAsDouble(const char *pszFName)const

Fetch field value as a double.

OFTString features will be translated using CPLAtof(). OFTInteger and OFTInteger64 fields will be cast to double. Other field types, or errors will result in a return value of zero.

Return

the field value.

Parameters

  • pszFName: the name of the field to fetch.

const char *GetFieldAsString(const char *pszFName)const

Fetch field value as a string.

OFTReal and OFTInteger fields will be translated to string using sprintf(), but not necessarily using the established formatting rules. Other field types, or errors will result in a return value of zero.

Return

the field value. This string is internal, and should not be modified, or freed. Its lifetime may be very brief.

Parameters

  • pszFName: the name of the field to fetch.

const int *GetFieldAsIntegerList(const char *pszFName, int *pnCount)const

Fetch field value as a list of integers.

Currently this method only works for OFTIntegerList fields.

Return

the field value. This list is internal, and should not be modified, or freed. Its lifetime may be very brief. If *pnCount is zero on return the returned pointer may be NULL or non-NULL. OFTReal and OFTInteger fields will be translated to string using sprintf(), but not necessarily using the established formatting rules. Other field types, or errors will result in a return value of zero.

Parameters

  • pszFName: the name of the field to fetch.

  • pnCount: an integer to put the list count (number of integers) into.

constGIntBig *GetFieldAsInteger64List(const char *pszFName, int *pnCount)const

Fetch field value as a list of 64 bit integers.

Currently this method only works for OFTInteger64List fields.

Return

the field value. This list is internal, and should not be modified, or freed. Its lifetime may be very brief. If *pnCount is zero on return the returned pointer may be NULL or non-NULL.

Since

GDAL 2.0

Parameters

  • pszFName: the name of the field to fetch.

  • pnCount: an integer to put the list count (number of integers) into.

const double *GetFieldAsDoubleList(const char *pszFName, int *pnCount)const

Fetch field value as a list of doubles.

Currently this method only works for OFTRealList fields.

Return

the field value. This list is internal, and should not be modified, or freed. Its lifetime may be very brief. If *pnCount is zero on return the returned pointer may be NULL or non-NULL.

Parameters

  • pszFName: the name of the field to fetch.

  • pnCount: an integer to put the list count (number of doubles) into.

char **GetFieldAsStringList(const char *pszFName)const

Fetch field value as a list of strings.

Currently this method only works for OFTStringList fields.

The returned list is terminated by a NULL pointer. The number of elements can also be calculated using CSLCount().

Return

the field value. This list is internal, and should not be modified, or freed. Its lifetime may be very brief.

Parameters

  • pszFName: the name of the field to fetch.

void SetField(int i, int nValue)

Set field to integer value.

OFTInteger, OFTInteger64 and OFTReal fields will be set directly. OFTString fields will be assigned a string representation of the value, but not necessarily taking into account formatting constraints on this field. Other field types may be unaffected.

This method is the same as the C function OGR_F_SetFieldInteger().

Note

This method has only an effect on the in-memory feature object. If this object comes from a layer and the modifications must be serialized back to the datasource, OGR_L_SetFeature() must be used afterwards. Or if this is a new feature, OGR_L_CreateFeature() must be used afterwards.

Parameters

  • iField: the field to fetch, from 0 to GetFieldCount()-1.

  • nValue: the value to assign.

void SetField(int i, GIntBignValue)

Set field to 64 bit integer value.

OFTInteger, OFTInteger64 and OFTReal fields will be set directly. OFTString fields will be assigned a string representation of the value, but not necessarily taking into account formatting constraints on this field. Other field types may be unaffected.

This method is the same as the C function OGR_F_SetFieldInteger64().

Note

This method has only an effect on the in-memory feature object. If this object comes from a layer and the modifications must be serialized back to the datasource, OGR_L_SetFeature() must be used afterwards. Or if this is a new feature, OGR_L_CreateFeature() must be used afterwards.

Since

GDAL 2.0

Parameters

  • iField: the field to fetch, from 0 to GetFieldCount()-1.

  • nValue: the value to assign.

void SetField(int i, double dfValue)

Set field to double value.

OFTInteger, OFTInteger64 and OFTReal fields will be set directly. OFTString fields will be assigned a string representation of the value, but not necessarily taking into account formatting constraints on this field. Other field types may be unaffected.

This method is the same as the C function OGR_F_SetFieldDouble().

Note

This method has only an effect on the in-memory feature object. If this object comes from a layer and the modifications must be serialized back to the datasource, OGR_L_SetFeature() must be used afterwards. Or if this is a new feature, OGR_L_CreateFeature() must be used afterwards.

Parameters

  • iField: the field to fetch, from 0 to GetFieldCount()-1.

  • dfValue: the value to assign.

void SetField(int iconst char *pszValue)

Set field to string value.

OFTInteger fields will be set based on an atoi() conversion of the string. OFTInteger64 fields will be set based on an CPLAtoGIntBig() conversion of the string. OFTReal fields will be set based on an CPLAtof() conversion of the string. Other field types may be unaffected.

This method is the same as the C function OGR_F_SetFieldString().

Note

This method has only an effect on the in-memory feature object. If this object comes from a layer and the modifications must be serialized back to the datasource, OGR_L_SetFeature() must be used afterwards. Or if this is a new feature, OGR_L_CreateFeature() must be used afterwards.

Parameters

  • iField: the field to fetch, from 0 to GetFieldCount()-1.

  • pszValue: the value to assign.

void SetField(int i, int nCountconst int *panValues)

Set field to list of integers value.

This method currently on has an effect of OFTIntegerList, OFTInteger64List and OFTRealList fields.

This method is the same as the C function OGR_F_SetFieldIntegerList().

Note

This method has only an effect on the in-memory feature object. If this object comes from a layer and the modifications must be serialized back to the datasource, OGR_L_SetFeature() must be used afterwards. Or if this is a new feature, OGR_L_CreateFeature() must be used afterwards.

Parameters

  • iField: the field to set, from 0 to GetFieldCount()-1.

  • nCount: the number of values in the list being assigned.

  • panValues: the values to assign.

void SetField(int i, int nCountconstGIntBig *panValues)

Set field to list of 64 bit integers value.

This method currently on has an effect of OFTIntegerList, OFTInteger64List and OFTRealList fields.

This method is the same as the C function OGR_F_SetFieldInteger64List().

Note

This method has only an effect on the in-memory feature object. If this object comes from a layer and the modifications must be serialized back to the datasource, OGR_L_SetFeature() must be used afterwards. Or if this is a new feature, OGR_L_CreateFeature() must be used afterwards.

Since

GDAL 2.0

Parameters

  • iField: the field to set, from 0 to GetFieldCount()-1.

  • nCount: the number of values in the list being assigned.

  • panValues: the values to assign.

void SetField(int i, int nCountconst double *padfValues)

Set field to list of doubles value.

This method currently on has an effect of OFTIntegerList, OFTInteger64List, OFTRealList fields.

This method is the same as the C function OGR_F_SetFieldDoubleList().

Note

This method has only an effect on the in-memory feature object. If this object comes from a layer and the modifications must be serialized back to the datasource, OGR_L_SetFeature() must be used afterwards. Or if this is a new feature, OGR_L_CreateFeature() must be used afterwards.

Parameters

  • iField: the field to set, from 0 to GetFieldCount()-1.

  • nCount: the number of values in the list being assigned.

  • padfValues: the values to assign.

void SetField(int iconst char *const *papszValues)

Set field to list of strings value.

This method currently on has an effect of OFTStringList fields.

This method is the same as the C function OGR_F_SetFieldStringList().

Note

This method has only an effect on the in-memory feature object. If this object comes from a layer and the modifications must be serialized back to the datasource, OGR_L_SetFeature() must be used afterwards. Or if this is a new feature, OGR_L_CreateFeature() must be used afterwards.

Parameters

  • iField: the field to set, from 0 to GetFieldCount()-1.

  • papszValues: the values to assign. List of NUL-terminated string, ending with a NULL pointer.

void SetField(int i, OGRField *puValue)

Set field.

The passed value OGRField must be of exactly the same type as the target field, or an application crash may occur. The passed value is copied, and will not be affected. It remains the responsibility of the caller.

This method is the same as the C function OGR_F_SetFieldRaw().

Note

This method has only an effect on the in-memory feature object. If this object comes from a layer and the modifications must be serialized back to the datasource, OGR_L_SetFeature() must be used afterwards. Or if this is a new feature, OGR_L_CreateFeature() must be used afterwards.

Parameters

  • iField: the field to fetch, from 0 to GetFieldCount()-1.

  • puValue: the value to assign.

void SetField(int i, int nCountconst void *pabyBinary)

Set field to binary data.

This method currently on has an effect of OFTBinary fields.

This method is the same as the C function OGR_F_SetFieldBinary().

Note

This method has only an effect on the in-memory feature object. If this object comes from a layer and the modifications must be serialized back to the datasource, OGR_L_SetFeature() must be used afterwards. Or if this is a new feature, OGR_L_CreateFeature() must be used afterwards.

Parameters

  • iField: the field to set, from 0 to GetFieldCount()-1.

  • nBytes: bytes of data being set.

  • pabyData: the raw data being applied.

void SetField(int i, int nYear, int nMonth, int nDay, int nHour = 0, int nMinute = 0, float fSecond = 0.f, int nTZFlag = 0)

Set field to date.

This method currently only has an effect for OFTDate, OFTTime and OFTDateTime fields.

This method is the same as the C function OGR_F_SetFieldDateTime().

Note

This method has only an effect on the in-memory feature object. If this object comes from a layer and the modifications must be serialized back to the datasource, OGR_L_SetFeature() must be used afterwards. Or if this is a new feature, OGR_L_CreateFeature() must be used afterwards.

Parameters

  • iField: the field to set, from 0 to GetFieldCount()-1.

  • nYear: (including century)

  • nMonth: (1-12)

  • nDay: (1-31)

  • nHour: (0-23)

  • nMinute: (0-59)

  • fSecond: (0-59, with millisecond accuracy)

  • nTZFlag: (0=unknown, 1=localtime, 100=GMT, see data model for details)

void SetField(const char *pszFName, int nValue)

Set field to integer value. OFTInteger, OFTInteger64 and OFTReal fields will be set directly. OFTString fields will be assigned a string representation of the value, but not necessarily taking into account formatting constraints on this field. Other field types may be unaffected.

Note

This method has only an effect on the in-memory feature object. If this object comes from a layer and the modifications must be serialized back to the datasource, OGR_L_SetFeature() must be used afterwards. Or if this is a new feature, OGR_L_CreateFeature() must be used afterwards.

Parameters

  • pszFName: the name of the field to set.

  • nValue: the value to assign.

void SetField(const char *pszFName, GIntBignValue)

Set field to 64 bit integer value. OFTInteger, OFTInteger64 and OFTReal fields will be set directly. OFTString fields will be assigned a string representation of the value, but not necessarily taking into account formatting constraints on this field. Other field types may be unaffected.

Note

This method has only an effect on the in-memory feature object. If this object comes from a layer and the modifications must be serialized back to the datasource, OGR_L_SetFeature() must be used afterwards. Or if this is a new feature, OGR_L_CreateFeature() must be used afterwards.

Parameters

  • pszFName: the name of the field to set.

  • nValue: the value to assign.

void SetField(const char *pszFName, double dfValue)

Set field to double value.

OFTInteger, OFTInteger64 and OFTReal fields will be set directly. OFTString fields will be assigned a string representation of the value, but not necessarily taking into account formatting constraints on this field. Other field types may be unaffected.

Note

This method has only an effect on the in-memory feature object. If this object comes from a layer and the modifications must be serialized back to the datasource, OGR_L_SetFeature() must be used afterwards. Or if this is a new feature, OGR_L_CreateFeature() must be used afterwards.

Parameters

  • pszFName: the name of the field to set.

  • dfValue: the value to assign.

void SetField(const char *pszFNameconst char *pszValue)

Set field to string value.

OFTInteger fields will be set based on an atoi() conversion of the string. OFTInteger64 fields will be set based on an CPLAtoGIntBig() conversion of the string. OFTReal fields will be set based on an CPLAtof() conversion of the string. Other field types may be unaffected.

Note

This method has only an effect on the in-memory feature object. If this object comes from a layer and the modifications must be serialized back to the datasource, OGR_L_SetFeature() must be used afterwards. Or if this is a new feature, OGR_L_CreateFeature() must be used afterwards.

Parameters

  • pszFName: the name of the field to set.

  • pszValue: the value to assign.

void SetField(const char *pszFName, int nCountconst int *panValues)

Set field to list of integers value.

This method currently on has an effect of OFTIntegerList, OFTInteger64List and OFTRealList fields.

Note

This method has only an effect on the in-memory feature object. If this object comes from a layer and the modifications must be serialized back to the datasource, OGR_L_SetFeature() must be used afterwards. Or if this is a new feature, OGR_L_CreateFeature() must be used afterwards.

Parameters

  • pszFName: the name of the field to set.

  • nCount: the number of values in the list being assigned.

  • panValues: the values to assign.

void SetField(const char *pszFName, int nCountconstGIntBig *panValues)

Set field to list of 64 bit integers value.

This method currently on has an effect of OFTIntegerList, OFTInteger64List and OFTRealList fields.

Note

This method has only an effect on the in-memory feature object. If this object comes from a layer and the modifications must be serialized back to the datasource, OGR_L_SetFeature() must be used afterwards. Or if this is a new feature, OGR_L_CreateFeature() must be used afterwards.

Parameters

  • pszFName: the name of the field to set.

  • nCount: the number of values in the list being assigned.

  • panValues: the values to assign.

void SetField(const char *pszFName, int nCountconst double *padfValues)

Set field to list of doubles value.

This method currently on has an effect of OFTIntegerList, OFTInteger64List, OFTRealList fields.

Note

This method has only an effect on the in-memory feature object. If this object comes from a layer and the modifications must be serialized back to the datasource, OGR_L_SetFeature() must be used afterwards. Or if this is a new feature, OGR_L_CreateFeature() must be used afterwards.

Parameters

  • pszFName: the name of the field to set.

  • nCount: the number of values in the list being assigned.

  • padfValues: the values to assign.

void SetField(const char *pszFNameconst char *const *papszValues)

Set field to list of strings value.

This method currently on has an effect of OFTStringList fields.

Note

This method has only an effect on the in-memory feature object. If this object comes from a layer and the modifications must be serialized back to the datasource, OGR_L_SetFeature() must be used afterwards. Or if this is a new feature, OGR_L_CreateFeature() must be used afterwards.

Parameters

  • pszFName: the name of the field to set.

  • papszValues: the values to assign. List of NUL-terminated string, ending with a NULL pointer.

void SetField(const char *pszFName, OGRField *puValue)

Set field.

The passed value OGRField must be of exactly the same type as the target field, or an application crash may occur. The passed value is copied, and will not be affected. It remains the responsibility of the caller.

Note

This method has only an effect on the in-memory feature object. If this object comes from a layer and the modifications must be serialized back to the datasource, OGR_L_SetFeature() must be used afterwards. Or if this is a new feature, OGR_L_CreateFeature() must be used afterwards.

Parameters

  • pszFName: the name of the field to set.

  • puValue: the value to assign.

void SetField(const char *pszFName, int nYear, int nMonth, int nDay, int nHour = 0, int nMinute = 0, float fSecond = 0.f, int nTZFlag = 0)

Set field to date.

This method currently only has an effect for OFTDate, OFTTime and OFTDateTime fields.

Note

This method has only an effect on the in-memory feature object. If this object comes from a layer and the modifications must be serialized back to the datasource, OGR_L_SetFeature() must be used afterwards. Or if this is a new feature, OGR_L_CreateFeature() must be used afterwards.

Parameters

  • pszFName: the name of the field to set.

  • nYear: (including century)

  • nMonth: (1-12)

  • nDay: (1-31)

  • nHour: (0-23)

  • nMinute: (0-59)

  • fSecond: (0-59, with millisecond accuracy)

  • nTZFlag: (0=unknown, 1=localtime, 100=GMT, see data model for details)

GIntBigGetFID()const

Get feature identifier.

This method is the same as the C function OGR_F_GetFID(). Note: since GDAL 2.0, this method returns a GIntBig (previously a long)

Return

feature id or OGRNullFID if none has been assigned.

OGRErrSetFID(GIntBignFIDIn)

Set the feature identifier.

For specific types of features this operation may fail on illegal features ids. Generally it always succeeds. Feature ids should be greater than or equal to zero, with the exception of OGRNullFID (-1) indicating that the feature id is unknown.

This method is the same as the C function OGR_F_SetFID().

Return

On success OGRERR_NONE, or on failure some other value.

Parameters

  • nFIDIn: the new feature identifier value to assign.

void DumpReadable(FILE*, char **papszOptions = nullptr)const

Dump this feature in a human readable form.

This dumps the attributes, and geometry; however, it doesn't definition information (other than field types and names), nor does it report the geometry spatial reference system.

A few options can be defined to change the default dump :

  • DISPLAY_FIELDS=NO : to hide the dump of the attributes

  • DISPLAY_STYLE=NO : to hide the dump of the style string

  • DISPLAY_GEOMETRY=NO : to hide the dump of the geometry

  • DISPLAY_GEOMETRY=SUMMARY : to get only a summary of the geometry

This method is the same as the C function OGR_F_DumpReadable().

Parameters

  • fpOut: the stream to write to, such as stdout. If NULL stdout will be used.

  • papszOptions: NULL terminated list of options (may be NULL)

OGRErrSetFrom(constOGRFeature*, int = TRUE)

Set one feature from another.

Overwrite the contents of this feature from the geometry and attributes of another. The poSrcFeature does not need to have the same OGRFeatureDefn. Field values are copied by corresponding field names. Field types do not have to exactly match. SetField() method conversion rules will be applied as needed.

This method is the same as the C function OGR_F_SetFrom().

Return

OGRERR_NONE if the operation succeeds, even if some values are not transferred, otherwise an error code.

Parameters

  • poSrcFeature: the feature from which geometry, and field values will be copied.

  • bForgiving: TRUE if the operation should continue despite lacking output fields matching some of the source fields.

OGRErrSetFrom(constOGRFeature*, const int*, int = TRUE)

Set one feature from another.

Overwrite the contents of this feature from the geometry and attributes of another. The poSrcFeature does not need to have the same OGRFeatureDefn. Field values are copied according to the provided indices map. Field types do not have to exactly match. SetField() method conversion rules will be applied as needed. This is more efficient than OGR_F_SetFrom() in that this doesn't lookup the fields by their names. Particularly useful when the field names don't match.

This method is the same as the C function OGR_F_SetFromWithMap().

Return

OGRERR_NONE if the operation succeeds, even if some values are not transferred, otherwise an error code.

Parameters

  • poSrcFeature: the feature from which geometry, and field values will be copied.

  • panMap: Array of the indices of the feature's fields stored at the corresponding index of the source feature's fields. A value of -1 should be used to ignore the source's field. The array should not be NULL and be as long as the number of fields in the source feature.

  • bForgiving: TRUE if the operation should continue despite lacking output fields matching some of the source fields.

OGRErrSetFieldsFrom(constOGRFeature*, const int*, int = TRUE)

Set fields from another feature.

Overwrite the fields of this feature from the attributes of another. The FID and the style string are not set. The poSrcFeature does not need to have the same OGRFeatureDefn. Field values are copied according to the provided indices map. Field types do not have to exactly match. SetField() method conversion rules will be applied as needed. This is more efficient than OGR_F_SetFrom() in that this doesn't lookup the fields by their names. Particularly useful when the field names don't match.

Return

OGRERR_NONE if the operation succeeds, even if some values are not transferred, otherwise an error code.

Parameters

  • poSrcFeature: the feature from which geometry, and field values will be copied.

  • panMap: Array of the indices of the feature's fields stored at the corresponding index of the source feature's fields. A value of -1 should be used to ignore the source's field. The array should not be NULL and be as long as the number of fields in the source feature.

  • bForgiving: TRUE if the operation should continue despite lacking output fields matching some of the source fields.

int Validate(int nValidateFlags, int bEmitError)const

Validate that a feature meets constraints of its schema.

The scope of test is specified with the nValidateFlags parameter.

Regarding OGR_F_VAL_WIDTH, the test is done assuming the string width must be interpreted as the number of UTF-8 characters. Some drivers might interpret the width as the number of bytes instead. So this test is rather conservative (if it fails, then it will fail for all interpretations).

This method is the same as the C function OGR_F_Validate().

Return

TRUE if all enabled validation tests pass.

Since

GDAL 2.0

Parameters

  • nValidateFlags: OGR_F_VAL_ALL or combination of OGR_F_VAL_NULL, OGR_F_VAL_GEOM_TYPE, OGR_F_VAL_WIDTH and OGR_F_VAL_ALLOW_NULL_WHEN_DEFAULT, OGR_F_VAL_ALLOW_DIFFERENT_GEOM_DIM with '|' operator

  • bEmitError: TRUE if a CPLError() must be emitted when a check fails

void FillUnsetWithDefault(int bNotNullableOnly, char **papszOptions)

Fill unset fields with default values that might be defined.

This method is the same as the C function OGR_F_FillUnsetWithDefault().

Since

GDAL 2.0

Parameters

  • bNotNullableOnly: if we should fill only unset fields with a not-null constraint.

  • papszOptions: unused currently. Must be set to NULL.

const char *GetStyleString()const

Fetch style string for this feature.

Set the OGR Feature Style Specification for details on the format of this string, and ogr_featurestyle.h for services available to parse it.

This method is the same as the C function OGR_F_GetStyleString().

Return

a reference to a representation in string format, or NULL if there isn't one.

void SetStyleString(const char*)

Set feature style string.

This method operate exactly as OGRFeature::SetStyleStringDirectly() except that it does not assume ownership of the passed string, but instead makes a copy of it.

This method is the same as the C function OGR_F_SetStyleString().

Parameters

  • pszString: the style string to apply to this feature, cannot be NULL.

void SetStyleStringDirectly(char*)

Set feature style string.

This method operate exactly as OGRFeature::SetStyleString() except that it assumes ownership of the passed string.

This method is the same as the C function OGR_F_SetStyleStringDirectly().

Parameters

  • pszString: the style string to apply to this feature, cannot be NULL.

OGRStyleTable *GetStyleTable()const

Return style table.

Return

style table.

void SetStyleTable(OGRStyleTable *poStyleTable)

Set style table.

Parameters

  • poStyleTable: new style table (will be cloned)

void SetStyleTableDirectly(OGRStyleTable *poStyleTable)

Set style table.

Parameters

  • poStyleTable: new style table (ownership transferred to the object)

const char *GetNativeData()const

Returns the native data for the feature.

The native data is the representation in a "natural" form that comes from the driver that created this feature, or that is aimed at an output driver. The native data may be in different format, which is indicated by GetNativeMediaType().

Note that most drivers do not support storing the native data in the feature object, and if they do, generally the NATIVE_DATA open option must be passed at dataset opening.

The "native data" does not imply it is something more performant or powerful than what can be obtained with the rest of the API, but it may be useful in round-tripping scenarios where some characteristics of the underlying format are not captured otherwise by the OGR abstraction.

This function is the same as the C function OGR_F_GetNativeData().

Return

a string with the native data, or NULL if there is none.

Since

GDAL 2.1

See

rfc60_improved_roundtripping_in_ogr – GDAL

const char *GetNativeMediaType()const

Returns the native media type for the feature.

The native media type is the identifier for the format of the native data. It follows the IANA RFC 2045 (see https://en.wikipedia.org/wiki/Media_type), e.g. "application/vnd.geo+json" for JSon.

This function is the same as the C function OGR_F_GetNativeMediaType().

Return

a string with the native media type, or NULL if there is none.

Since

GDAL 2.1

See

rfc60_improved_roundtripping_in_ogr – GDAL

void SetNativeData(const char *pszNativeData)

Sets the native data for the feature.

The native data is the representation in a "natural" form that comes from the driver that created this feature, or that is aimed at an output driver. The native data may be in different format, which is indicated by GetNativeMediaType().

This function is the same as the C function OGR_F_SetNativeData().

Since

GDAL 2.1

See

rfc60_improved_roundtripping_in_ogr – GDAL

Parameters

  • pszNativeData: a string with the native data, or NULL if there is none.

void SetNativeMediaType(const char *pszNativeMediaType)

Sets the native media type for the feature.

The native media type is the identifier for the format of the native data. It follows the IANA RFC 2045 (see https://en.wikipedia.org/wiki/Media_type), e.g. "application/vnd.geo+json" for JSon.

This function is the same as the C function OGR_F_SetNativeMediaType().

Since

GDAL 2.1

See

rfc60_improved_roundtripping_in_ogr – GDAL

Parameters

  • pszNativeMediaType: a string with the native media type, or NULL if there is none.

公共静态函数

OGRFeature *CreateFeature(OGRFeatureDefn*)

Feature factory.

This is essentially a feature factory, useful for applications creating features but wanting to ensure they are created out of the OGR/GDAL heap.

This method is the same as the C function OGR_F_Create().

Return

new feature object with null fields and no geometry, or, starting with GDAL 2.1, NULL in case of out of memory situation. May be deleted with DestroyFeature().

Parameters

  • poDefn: Feature definition defining schema.

void DestroyFeature(OGRFeature*)

Destroy feature.

The feature is deleted, but within the context of the GDAL/OGR heap. This is necessary when higher level applications use GDAL/OGR from a DLL and they want to delete a feature created within the DLL. If the delete is done in the calling application the memory will be freed onto the application heap which is inappropriate.

This method is the same as the C function OGR_F_Destroy().

Parameters

  • poFeature: the feature to delete.

OGRFeatureHToHandle(OGRFeature *poFeature)

Convert a OGRFeature* to a OGRFeatureH.

Since

GDAL 2.3

OGRFeature *FromHandle(OGRFeatureHhFeature)

Convert a OGRFeatureH to a OGRFeature*.

Since

GDAL 2.3

classConstFieldIterator

Field value iterator class.

structPrivate

classFieldNotFoundException : public exception

Exception raised by operator[](const char*) when a field is not found.

classFieldValue

Field value.

公共职能

FieldValue &operator=(constFieldValue &oOther)

Set a field value from another one.

FieldValue &operator=(int nVal)

Set an integer value to the field.

FieldValue &operator=(GIntBignVal)

Set an integer value to the field.

FieldValue &operator=(double dfVal)

Set a real value to the field.

FieldValue &operator=(const char *pszVal)

Set a string value to the field.

FieldValue &operator=(const std::string &osVal)

Set a string value to the field.

FieldValue &operator=(const std::vector<int> &oArray)

Set an array of integer to the field.

FieldValue &operator=(const std::vector<GIntBig> &oArray)

Set an array of big integer to the field.

FieldValue &operator=(const std::vector<double> &oArray)

Set an array of double to the field.

FieldValue &operator=(const std::vector<std::string> &oArray)

Set an array of strings to the field.

FieldValue &operator=(CSLConstListpapszValues)

Set an array of strings to the field.

void SetNull()

Set a null value to the field.

void clear()

Unset the field.

void Unset()

Unset the field.

void SetDateTime(int nYear, int nMonth, int nDay, int nHour = 0, int nMinute = 0, float fSecond = 0.f, int nTZFlag = 0)

Set date time value/.

int GetIndex()const

Return field index.

constOGRFieldDefn *GetDefn()const

Return field definition.

const char *GetName()const

Return field name.

OGRFieldTypeGetType()const

Return field type.

OGRFieldSubTypeGetSubType()const

Return field subtype.

bool empty()const

Return whether the field value is unset/empty.

bool IsUnset()const

Return whether the field value is unset/empty.

bool IsNull()const

Return whether the field value is null.

constOGRField *GetRawValue()const

Return the raw field value.

int GetInteger()const

Return the integer value.

Only use that method if and only if GetType() == OFTInteger.

GIntBigGetInteger64()const

Return the 64-bit integer value.

Only use that method if and only if GetType() == OFTInteger64.

double GetDouble()const

Return the double value.

Only use that method if and only if GetType() == OFTReal.

const char *GetString()const

Return the string value.

Only use that method if and only if GetType() == OFTString.

bool GetDateTime(int *pnYear, int *pnMonth, int *pnDay, int *pnHour, int *pnMinute, float *pfSecond, int *pnTZFlag)const

Return the date/time/datetime value.

operator int()const

Return the field value as integer, with potential conversion.

operator GIntBig()const

Return the field value as 64-bit integer, with potential conversion.

operator double()const

Return the field value as double, with potential conversion.

operator const char*()const

Return the field value as string, with potential conversion.

operator const std::vector<int>&()const

Return the field value as integer list, with potential conversion.

operator const std::vector<GIntBig>&()const

Return the field value as 64-bit integer list, with potential conversion.

operator const std::vector<double>&()const

Return the field value as double list, with potential conversion.

operator const std::vector<std::string>&()const

Return the field value as string list, with potential conversion.

operator CSLConstList()const

Return the field value as string list, with potential conversion.

int GetAsInteger()const

Return the field value as integer, with potential conversion.

GIntBigGetAsInteger64()const

Return the field value as 64-bit integer, with potential conversion.

double GetAsDouble()const

Return the field value as double, with potential conversion.

const char *GetAsString()const

Return the field value as string, with potential conversion.

const std::vector<int> &GetAsIntegerList()const

Return the field value as integer list, with potential conversion.

const std::vector<GIntBig> &GetAsInteger64List()const

Return the field value as 64-bit integer list, with potential conversion.

const std::vector<double> &GetAsDoubleList()const

Return the field value as double list, with potential conversion.

const std::vector<std::string> &GetAsStringList()const

Return the field value as string list, with potential conversion.

structPrivate

OGRFeatureDefn类

classOGRFeatureDefn

Definition of a feature class or feature layer.

This object contains schema information for a set of OGRFeatures. In table based systems, an OGRFeatureDefn is essentially a layer. In more object oriented approaches (such as SF CORBA) this can represent a class of features but doesn't necessarily relate to all of a layer, or just one layer.

This object also can contain some other information such as a name and potentially other metadata.

It is essentially a collection of field descriptions (OGRFieldDefn class). Starting with GDAL 1.11, in addition to attribute fields, it can also contain multiple geometry fields (OGRGeomFieldDefn class).

It is reasonable for different translators to derive classes from OGRFeatureDefn with additional translator specific information.

公共职能

OGRFeatureDefn(const char *pszName = nullptr)

Constructor.

The OGRFeatureDefn maintains a reference count, but this starts at zero. It is mainly intended to represent a count of OGRFeature's based on this definition.

This method is the same as the C function OGR_FD_Create().

Parameters

  • pszName: the name to be assigned to this layer/class. It does not need to be unique.

void SetName(const char *pszName)

Change name of this OGRFeatureDefn.

Since

GDAL 2.3

Parameters

  • pszName: feature definition name

const char *GetName()const

Get name of this OGRFeatureDefn.

This method is the same as the C function OGR_FD_GetName().

Return

the name. This name is internal and should not be modified, or freed.

int GetFieldCount()const

Fetch number of fields on this feature.

This method is the same as the C function OGR_FD_GetFieldCount().

Return

count of fields.

OGRFieldDefn *GetFieldDefn(int i)

Fetch field definition.

This method is the same as the C function OGR_FD_GetFieldDefn().

Return

a pointer to an internal field definition object or NULL if invalid index. This object should not be modified or freed by the application.

Parameters

  • iField: the field to fetch, between 0 and GetFieldCount() - 1.

constOGRFieldDefn *GetFieldDefn(int i)const

Fetch field definition.

This method is the same as the C function OGR_FD_GetFieldDefn().

Return

a pointer to an internal field definition object or NULL if invalid index. This object should not be modified or freed by the application.

Since

GDAL 2.3

Parameters

  • iField: the field to fetch, between 0 and GetFieldCount() - 1.

int GetFieldIndex(const char*)const

Find field by name.

The field index of the first field matching the passed field name (case insensitively) is returned.

This method is the same as the C function OGR_FD_GetFieldIndex().

Return

the field index, or -1 if no match found.

Parameters

  • pszFieldName: the field name to search for.

int GetFieldIndexCaseSensitive(const char*)const

Find field by name, in a case sensitive way.

The field index of the first field matching the passed field name is returned.

Return

the field index, or -1 if no match found.

Parameters

  • pszFieldName: the field name to search for.

void AddFieldDefn(OGRFieldDefn*)

Add a new field definition.

To add a new field definition to a layer definition, do not use this function directly, but use OGRLayer::CreateField() instead.

This method should only be called while there are no OGRFeature objects in existence based on this OGRFeatureDefn. The OGRFieldDefn passed in is copied, and remains the responsibility of the caller.

This method is the same as the C function OGR_FD_AddFieldDefn().

Parameters

  • poNewDefn: the definition of the new field.

OGRErrDeleteFieldDefn(int iField)

Delete an existing field definition.

To delete an existing field definition from a layer definition, do not use this function directly, but use OGRLayer::DeleteField() instead.

This method should only be called while there are no OGRFeature objects in existence based on this OGRFeatureDefn.

This method is the same as the C function OGR_FD_DeleteFieldDefn().

Return

OGRERR_NONE in case of success.

Since

OGR 1.9.0

Parameters

  • iField: the index of the field definition.

OGRErrReorderFieldDefns(int *panMap)

Reorder the field definitions in the array of the feature definition.

To reorder the field definitions in a layer definition, do not use this function directly, but use OGR_L_ReorderFields() instead.

This method should only be called while there are no OGRFeature objects in existence based on this OGRFeatureDefn.

This method is the same as the C function OGR_FD_ReorderFieldDefns().

Return

OGRERR_NONE in case of success.

Since

OGR 1.9.0

Parameters

  • panMap: an array of GetFieldCount() elements which is a permutation of [0, GetFieldCount()-1]. panMap is such that, for each field definition at position i after reordering, its position before reordering was panMap[i].

int GetGeomFieldCount()const

Fetch number of geometry fields on this feature.

This method is the same as the C function OGR_FD_GetGeomFieldCount().

Return

count of geometry fields.

Since

GDAL 1.11

OGRGeomFieldDefn *GetGeomFieldDefn(int i)

Fetch geometry field definition.

This method is the same as the C function OGR_FD_GetGeomFieldDefn().

Return

a pointer to an internal field definition object or NULL if invalid index. This object should not be modified or freed by the application.

Since

GDAL 1.11

Parameters

  • iGeomField: the geometry field to fetch, between 0 and GetGeomFieldCount() - 1.

constOGRGeomFieldDefn *GetGeomFieldDefn(int i)const

Fetch geometry field definition.

This method is the same as the C function OGR_FD_GetGeomFieldDefn().

Return

a pointer to an internal field definition object or NULL if invalid index. This object should not be modified or freed by the application.

Since

GDAL 2.3

Parameters

  • iGeomField: the geometry field to fetch, between 0 and GetGeomFieldCount() - 1.

int GetGeomFieldIndex(const char*)const

Find geometry field by name.

The geometry field index of the first geometry field matching the passed field name (case insensitively) is returned.

This method is the same as the C function OGR_FD_GetGeomFieldIndex().

Return

the geometry field index, or -1 if no match found.

Parameters

  • pszGeomFieldName: the geometry field name to search for.

void AddGeomFieldDefn(OGRGeomFieldDefn*, int bCopy = TRUE)

Add a new geometry field definition.

To add a new geometry field definition to a layer definition, do not use this function directly, but use OGRLayer::CreateGeomField() instead.

This method does an internal copy of the passed geometry field definition, unless bCopy is set to FALSE (in which case it takes ownership of the field definition.

This method should only be called while there are no OGRFeature objects in existence based on this OGRFeatureDefn. The OGRGeomFieldDefn passed in is copied, and remains the responsibility of the caller.

This method is the same as the C function OGR_FD_AddGeomFieldDefn().

Since

GDAL 1.11

Parameters

  • poNewDefn: the definition of the new geometry field.

  • bCopy: whether poNewDefn should be copied.

OGRErrDeleteGeomFieldDefn(int iGeomField)

Delete an existing geometry field definition.

To delete an existing field definition from a layer definition, do not use this function directly, but use OGRLayer::DeleteGeomField() instead.

This method should only be called while there are no OGRFeature objects in existence based on this OGRFeatureDefn.

This method is the same as the C function OGR_FD_DeleteGeomFieldDefn().

Return

OGRERR_NONE in case of success.

Since

GDAL 1.11

Parameters

  • iGeomField: the index of the geometry field definition.

OGRwkbGeometryTypeGetGeomType()const

Fetch the geometry base type.

Note that some drivers are unable to determine a specific geometry type for a layer, in which case wkbUnknown is returned. A value of wkbNone indicates no geometry is available for the layer at all. Many drivers do not properly mark the geometry type as 25D even if some or all geometries are in fact 25D. A few (broken) drivers return wkbPolygon for layers that also include wkbMultiPolygon.

Starting with GDAL 1.11, this method returns GetGeomFieldDefn(0)->GetType().

This method is the same as the C function OGR_FD_GetGeomType().

Return

the base type for all geometry related to this definition.

void SetGeomType(OGRwkbGeometryType)

Assign the base geometry type for this layer.

All geometry objects using this type must be of the defined type or a derived type. The default upon creation is wkbUnknown which allows for any geometry type. The geometry type should generally not be changed after any OGRFeatures have been created against this definition.

This method is the same as the C function OGR_FD_SetGeomType().

Starting with GDAL 1.11, this method calls GetGeomFieldDefn(0)->SetType().

Parameters

  • eNewType: the new type to assign.

OGRFeatureDefn *Clone()const

Create a copy of this feature definition.

Creates a deep copy of the feature definition.

Return

the copy.

int Reference()

Increments the reference count by one.

The reference count is used keep track of the number of OGRFeature objects referencing this definition.

This method is the same as the C function OGR_FD_Reference().

Return

the updated reference count.

int Dereference()

Decrements the reference count by one.

This method is the same as the C function OGR_FD_Dereference().

Return

the updated reference count.

int GetReferenceCount()const

Fetch current reference count.

This method is the same as the C function OGR_FD_GetReferenceCount().

Return

the current reference count.

void Release()

Drop a reference to this object, and destroy if no longer referenced.

int IsGeometryIgnored()const

Determine whether the geometry can be omitted when fetching features.

This method is the same as the C function OGR_FD_IsGeometryIgnored().

Starting with GDAL 1.11, this method returns GetGeomFieldDefn(0)->IsIgnored().

Return

ignore state

void SetGeometryIgnored(int bIgnore)

Set whether the geometry can be omitted when fetching features.

This method is the same as the C function OGR_FD_SetGeometryIgnored().

Starting with GDAL 1.11, this method calls GetGeomFieldDefn(0)->SetIgnored().

Parameters

  • bIgnore: ignore state

int IsStyleIgnored()const

Determine whether the style can be omitted when fetching features.

This method is the same as the C function OGR_FD_IsStyleIgnored().

Return

ignore state

void SetStyleIgnored(int bIgnore)

Set whether the style can be omitted when fetching features.

This method is the same as the C function OGR_FD_SetStyleIgnored().

Parameters

  • bIgnore: ignore state

int IsSame(constOGRFeatureDefn *poOtherFeatureDefn)const

Test if the feature definition is identical to the other one.

Return

TRUE if the feature definition is identical to the other one.

Parameters

  • poOtherFeatureDefn: the other feature definition to compare to.

std::vector<int> ComputeMapForSetFrom(constOGRFeatureDefn *poSrcFDefn, bool bForgiving = true)const

Compute the map from source to target field that can be passed to SetFrom().

Return

an array of size poSrcFDefn->GetFieldCount() if everything succeeds, or empty in case a source field definition was not found in the target layer and bForgiving == true.

Since

GDAL 2.3

Parameters

  • poSrcFDefn: the feature definition of source features later passed to SetFrom()

  • bForgiving: true if the operation should continue despite lacking output fields matching some of the source fields.

公共静态函数

OGRFeatureDefn *CreateFeatureDefn(const char *pszName = nullptr)

Create a new feature definition object.

Return

new feature definition object.

Parameters

  • pszName: name

void DestroyFeatureDefn(OGRFeatureDefn*)

Destroy a feature definition.

Parameters

  • poDefn: feature definition.

OGRFeatureDefnHToHandle(OGRFeatureDefn *poFeatureDefn)

Convert a OGRFeatureDefn* to a OGRFeatureDefnH.

Since

GDAL 2.3

OGRFeatureDefn *FromHandle(OGRFeatureDefnHhFeatureDefn)

Convert a OGRFeatureDefnH to a OGRFeatureDefn*.

Since

GDAL 2.3

OGRFieldDefn类

classOGRFieldDefn

Definition of an attribute of an OGRFeatureDefn.

A field is described by :

  • a name. See SetName() / GetNameRef()

  • an alternative name (optional): alternative descriptive name for the field (sometimes referred to as an "alias"). See SetAlternativeName() / GetAlternativeNameRef()

  • a type: OFTString, OFTInteger, OFTReal, ... See SetType() / GetType()

  • a subtype (optional): OFSTBoolean, ... See SetSubType() / GetSubType()

  • a width (optional): maximal number of characters. See SetWidth() / GetWidth()

  • a precision (optional): number of digits after decimal point. See SetPrecision() / GetPrecision()

  • a NOT NULL constraint (optional). See SetNullable() / IsNullable()

  • a UNIQUE constraint (optional). See SetUnique() / IsUnique()

  • a default value (optional). See SetDefault() / GetDefault()

  • a boolean to indicate whether it should be ignored when retrieving features. See SetIgnored() / IsIgnored()

公共职能

OGRFieldDefn(const char*, OGRFieldType)

Constructor.

By default, fields have no width, precision, are nullable and not ignored.

Parameters

  • pszNameIn: the name of the new field.

  • eTypeIn: the type of the new field.

OGRFieldDefn(constOGRFieldDefn*)

Constructor.

Create by cloning an existing field definition.

Parameters

  • poPrototype: the field definition to clone.

void SetName(const char*)

Reset the name of this field.

This method is the same as the C function OGR_Fld_SetName().

Parameters

  • pszNameIn: the new name to apply.

const char *GetNameRef()const

Fetch name of this field.

This method is the same as the C function OGR_Fld_GetNameRef().

Return

pointer to an internal name string that should not be freed or modified.

void SetAlternativeName(const char*)

Reset the alternative name (or "alias") for this field.

The alternative name is an optional attribute for a field which can provide a more user-friendly, descriptive name of a field which is not subject to the usual naming constraints defined by the data provider.

This is a metadata style attribute only: the alternative name cannot be used in place of the actual field name during SQL queries or other field name dependent API calls.

This method is the same as the C function OGR_Fld_SetAlternativeName().

Since

GDAL 3.2

Parameters

  • pszAlternativeNameIn: the new alternative name to apply.

const char *GetAlternativeNameRef()const

Fetch the alternative name (or "alias") for this field.

The alternative name is an optional attribute for a field which can provide a more user-friendly, descriptive name of a field which is not subject to the usual naming constraints defined by the data provider.

This is a metadata style attribute only: the alternative name cannot be used in place of the actual field name during SQL queries or other field name dependent API calls.

This method is the same as the C function OGR_Fld_GetAlternativeNameRef().

Return

pointer to an internal alternative name string that should not be freed or modified.

Since

GDAL 3.2

OGRFieldTypeGetType()const

Fetch type of this field.

This method is the same as the C function OGR_Fld_GetType().

Return

field type.

void SetType(OGRFieldTypeeTypeIn)

Set the type of this field.

This should never be done to an OGRFieldDefn that is already part of an OGRFeatureDefn.

This method is the same as the C function OGR_Fld_SetType().

Parameters

  • eTypeIn: the new field type.

OGRFieldSubTypeGetSubType()const

Fetch subtype of this field.

This method is the same as the C function OGR_Fld_GetSubType().

Return

field subtype.

Since

GDAL 2.0

void SetSubType(OGRFieldSubTypeeSubTypeIn)

Set the subtype of this field.

This should never be done to an OGRFieldDefn that is already part of an OGRFeatureDefn.

This method is the same as the C function OGR_Fld_SetSubType().

Since

GDAL 2.0

Parameters

  • eSubTypeIn: the new field subtype.

OGRJustificationGetJustify()const

Get the justification for this field.

Note: no driver is know to use the concept of field justification.

This method is the same as the C function OGR_Fld_GetJustify().

Return

the justification.

void SetJustify(OGRJustificationeJustifyIn)

Set the justification for this field.

Note: no driver is know to use the concept of field justification.

This method is the same as the C function OGR_Fld_SetJustify().

Parameters

  • eJustify: the new justification.

int GetWidth()const

Get the formatting width for this field.

This method is the same as the C function OGR_Fld_GetWidth().

Return

the width, zero means no specified width.

void SetWidth(int nWidthIn)

Set the formatting width for this field in characters.

This method is the same as the C function OGR_Fld_SetWidth().

Parameters

  • nWidth: the new width.

int GetPrecision()const

Get the formatting precision for this field. This should normally be zero for fields of types other than OFTReal.

This method is the same as the C function OGR_Fld_GetPrecision().

Return

the precision.

void SetPrecision(int nPrecisionIn)

Set the formatting precision for this field in characters.

This should normally be zero for fields of types other than OFTReal.

This method is the same as the C function OGR_Fld_SetPrecision().

Parameters

  • nPrecision: the new precision.

void Set(const char*, OGRFieldType, int = 0, int = 0, OGRJustification = OJUndefined)

Set defining parameters for a field in one call.

This method is the same as the C function OGR_Fld_Set().

Parameters

  • pszNameIn: the new name to assign.

  • eTypeIn: the new type (one of the OFT values like OFTInteger).

  • nWidthIn: the preferred formatting width. Defaults to zero indicating undefined.

  • nPrecisionIn: number of decimals places for formatting, defaults to zero indicating undefined.

  • eJustifyIn: the formatting justification (OJLeft or OJRight), defaults to OJUndefined.

void SetDefault(const char*)

Set default field value.

The default field value is taken into account by drivers (generally those with a SQL interface) that support it at field creation time. OGR will generally not automatically set the default field value to null fields by itself when calling OGRFeature::CreateFeature() / OGRFeature::SetFeature(), but will let the low-level layers to do the job. So retrieving the feature from the layer is recommended.

The accepted values are NULL, a numeric value, a literal value enclosed between single quote characters (and inner single quote characters escaped by repetition of the single quote character), CURRENT_TIMESTAMP, CURRENT_TIME, CURRENT_DATE or a driver specific expression (that might be ignored by other drivers). For a datetime literal value, format should be 'YYYY/MM/DD HH:MM:SS[.sss]' (considered as UTC time).

Drivers that support writing DEFAULT clauses will advertise the GDAL_DCAP_DEFAULT_FIELDS driver metadata item.

This function is the same as the C function OGR_Fld_SetDefault().

Since

GDAL 2.0

Parameters

  • pszDefaultIn: new default field value or NULL pointer.

const char *GetDefault()const

Get default field value.

This function is the same as the C function OGR_Fld_GetDefault().

Return

default field value or NULL.

Since

GDAL 2.0

int IsDefaultDriverSpecific()const

Returns whether the default value is driver specific.

Driver specific default values are those that are not NULL, a numeric value, a literal value enclosed between single quote characters, CURRENT_TIMESTAMP, CURRENT_TIME, CURRENT_DATE or datetime literal value.

This method is the same as the C function OGR_Fld_IsDefaultDriverSpecific().

Return

TRUE if the default value is driver specific.

Since

GDAL 2.0

int IsIgnored()const

Return whether this field should be omitted when fetching features.

This method is the same as the C function OGR_Fld_IsIgnored().

Return

ignore state

void SetIgnored(int bIgnoreIn)

Set whether this field should be omitted when fetching features.

This method is the same as the C function OGR_Fld_SetIgnored().

Parameters

  • ignore: ignore state

int IsNullable()const

Return whether this field can receive null values.

By default, fields are nullable.

Even if this method returns FALSE (i.e not-nullable field), it doesn't mean that OGRFeature::IsFieldSet() will necessary return TRUE, as fields can be temporary unset and null/not-null validation is usually done when OGRLayer::CreateFeature()/SetFeature() is called.

This method is the same as the C function OGR_Fld_IsNullable().

Return

TRUE if the field is authorized to be null.

Since

GDAL 2.0

void SetNullable(int bNullableIn)

Set whether this field can receive null values.

By default, fields are nullable, so this method is generally called with FALSE to set a not-null constraint.

Drivers that support writing not-null constraint will advertise the GDAL_DCAP_NOTNULL_FIELDS driver metadata item.

This method is the same as the C function OGR_Fld_SetNullable().

Since

GDAL 2.0

Parameters

  • bNullableIn: FALSE if the field must have a not-null constraint.

int IsUnique()const

Return whether this field has a unique constraint.

By default, fields have no unique constraint.

This method is the same as the C function OGR_Fld_IsUnique().

Return

TRUE if the field has a unique constraint.

Since

GDAL 3.2

void SetUnique(int bUniqueIn)

Set whether this field has a unique constraint.

By default, fields have no unique constraint, so this method is generally called with TRUE to set a unique constraint.

Drivers that support writing unique constraint will advertise the GDAL_DCAP_UNIQUE_FIELDS driver metadata item.

This method is the same as the C function OGR_Fld_SetUnique().

Since

GDAL 3.2

Parameters

  • bUniqueIn: TRUE if the field must have a unique constraint.

int IsSame(constOGRFieldDefn*)const

Test if the field definition is identical to the other one.

Return

TRUE if the field definition is identical to the other one.

Parameters

  • poOtherFieldDefn: the other field definition to compare to.

公共静态函数

const char *GetFieldTypeName(OGRFieldType)

Fetch human readable name for a field type.

This static method is the same as the C function OGR_GetFieldTypeName().

Return

pointer to an internal static name string. It should not be modified or freed.

Parameters

  • eType: the field type to get name for.

const char *GetFieldSubTypeName(OGRFieldSubType)

Fetch human readable name for a field subtype.

This static method is the same as the C function OGR_GetFieldSubTypeName().

Return

pointer to an internal static name string. It should not be modified or freed.

Since

GDAL 2.0

Parameters

  • eSubType: the field subtype to get name for.

OGRFieldDefnHToHandle(OGRFieldDefn *poFieldDefn)

Convert a OGRFieldDefn* to a OGRFieldDefnH.

Since

GDAL 2.3

OGRFieldDefn *FromHandle(OGRFieldDefnHhFieldDefn)

Convert a OGRFieldDefnH to a OGRFieldDefn*.

Since

GDAL 2.3

ogrgeomfieldefn类

classOGRGeomFieldDefn

Definition of a geometry field of an OGRFeatureDefn.

A geometry field is described by :

  • a name. See SetName() / GetNameRef()

  • a type: wkbPoint, wkbLineString, ... See SetType() / GetType()

  • a spatial reference system (optional). See SetSpatialRef() / GetSpatialRef()

  • a NOT NULL constraint (optional). See SetNullable() / IsNullable()

  • a boolean to indicate whether it should be ignored when retrieving features. See SetIgnored() / IsIgnored()

Since

OGR 1.11

公共职能

OGRGeomFieldDefn(const char *pszNameIn, OGRwkbGeometryTypeeGeomTypeIn)

Constructor.

Since

GDAL 1.11

Parameters

  • pszNameIn: the name of the new field.

  • eGeomTypeIn: the type of the new field.

OGRGeomFieldDefn(constOGRGeomFieldDefn*)

Constructor.

Create by cloning an existing geometry field definition.

Since

GDAL 1.11

Parameters

  • poPrototype: the geometry field definition to clone.

void SetName(const char*)

Reset the name of this field.

This method is the same as the C function OGR_GFld_SetName().

Since

GDAL 1.11

Parameters

  • pszNameIn: the new name to apply.

const char *GetNameRef()const

Fetch name of this field.

This method is the same as the C function OGR_GFld_GetNameRef().

Return

pointer to an internal name string that should not be freed or modified.

Since

GDAL 1.11

OGRwkbGeometryTypeGetType()const

Fetch geometry type of this field.

This method is the same as the C function OGR_GFld_GetType().

Return

field geometry type.

Since

GDAL 1.11

void SetType(OGRwkbGeometryTypeeTypeIn)

Set the geometry type of this field.

This should never be done to an OGRGeomFieldDefn that is already part of an OGRFeatureDefn.

This method is the same as the C function OGR_GFld_SetType().

Since

GDAL 1.11

Parameters

  • eTypeIn: the new field geometry type.

OGRSpatialReference *GetSpatialRef()const

Fetch spatial reference system of this field.

This method is the same as the C function OGR_GFld_GetSpatialRef().

Return

field spatial reference system.

Since

GDAL 1.11

void SetSpatialRef(OGRSpatialReference *poSRSIn)

Set the spatial reference of this field.

This method is the same as the C function OGR_GFld_SetSpatialRef().

This method drops the reference of the previously set SRS object and acquires a new reference on the passed object (if non-NULL).

Since

GDAL 1.11

Parameters

  • poSRSIn: the new SRS to apply.

int IsIgnored()const

Return whether this field should be omitted when fetching features.

This method is the same as the C function OGR_GFld_IsIgnored().

Return

ignore state

Since

GDAL 1.11

void SetIgnored(int bIgnoreIn)

Set whether this field should be omitted when fetching features.

This method is the same as the C function OGR_GFld_SetIgnored().

Since

GDAL 1.11

Parameters

  • ignore: ignore state

int IsNullable()const

Return whether this geometry field can receive null values.

By default, fields are nullable.

Even if this method returns FALSE (i.e not-nullable field), it doesn't mean that OGRFeature::IsFieldSet() will necessary return TRUE, as fields can be temporary unset and null/not-null validation is usually done when OGRLayer::CreateFeature()/SetFeature() is called.

Note that not-nullable geometry fields might also contain 'empty' geometries.

This method is the same as the C function OGR_GFld_IsNullable().

Return

TRUE if the field is authorized to be null.

Since

GDAL 2.0

void SetNullable(int bNullableIn)

Set whether this geometry field can receive null values.

By default, fields are nullable, so this method is generally called with FALSE to set a not-null constraint.

Drivers that support writing not-null constraint will advertise the GDAL_DCAP_NOTNULL_GEOMFIELDS driver metadata item.

This method is the same as the C function OGR_GFld_SetNullable().

Since

GDAL 2.0

Parameters

  • bNullableIn: FALSE if the field must have a not-null constraint.

int IsSame(constOGRGeomFieldDefn*)const

Test if the geometry field definition is identical to the other one.

Return

TRUE if the geometry field definition is identical to the other one.

Since

GDAL 1.11

Parameters

  • poOtherFieldDefn: the other field definition to compare to.

公共静态函数

OGRGeomFieldDefnHToHandle(OGRGeomFieldDefn *poGeomFieldDefn)

Convert a OGRGeomFieldDefn* to a OGRGeomFieldDefnH.

Since

GDAL 2.3

OGRGeomFieldDefn *FromHandle(OGRGeomFieldDefnHhGeomFieldDefn)

Convert a OGRGeomFieldDefnH to a OGRGeomFieldDefn*.

Since

GDAL 2.3

Next  Previous


© 1998-2021 Frank Warmerdam, Even Rouault, and others

查看全文
如若内容造成侵权/违法违规/事实不符,请联系编程学习网邮箱:809451989@qq.com进行投诉反馈,一经查实,立即删除!

相关文章

  1. 第九届“图灵杯”NEUQ-ACM程序设计竞赛个人赛

    A.大学期末现状 题目描述 作为一名大学生的你&#xff0c;现在又到了期末查成绩的时候&#xff0c;当你的成绩大于等于60时请输出“jige,haoye!”,否则输出"laoshi,caicai,laolao"。 输入描述: 一行&#xff0c;一个整数x代表你的成绩&#xff08;0<x<100&a…...

    2024/4/14 17:23:08
  2. 使用python来进行操作pgAdmin数据库

    1、首先是需要引用库&#xff1a;psycopg2&#xff0c;可以参考博客&#xff1a;python安装psycopg2 - 尘山海 - 博客园 2、引入库需要加入代码&#xff1a;&#xff08;直接在cmd中安装就行&#xff09; pip install psycopg2 -i https://pypi.tuna.tsinghua.edu.cn/simple …...

    2024/4/19 23:05:40
  3. SpringMVC异常处理

    SpringMVC异常处理前言一、异常处理的思路二、异常处理两种方式1 简单异常处理器SimpleMappingExceptionResolver2 自定义异常处理步骤2.1 创建异常处理器类实现HandlerExceptionResolve2.2 配置异常处理器2.3 编写异常页面2.4 测试异常跳转总结前言 在学习或者写东西的时候总…...

    2024/4/14 17:22:58
  4. 《手把手教你》系列技巧篇(十二)-java+ selenium自动化测试-元素定位大法之By link text(详细教程)

    1.简介 本文按计划就要开始介绍link text&#xff0c;顾名思义是通过链接定位的&#xff08;官方说法&#xff1a;超链接文本定位&#xff09;。什么是linktext呢&#xff0c;就是我们在任何一个网页上都可以看到有一个或者多个链接&#xff0c;上面有一个文字描述&#xff0c;…...

    2024/4/14 17:22:58
  5. 怎么玩转自动化测试框架,谁又是你的唯一?

    目录 框架初探 Python Robot Framework Demo Unittest Demo Nose2 Demo Pytest Demo1 Demo2 框架选择 Python Robot Framework Unittest Nose2 Pytest 总结 Python​ Python得天独厚的优势造就了一系列测试框架&#xff0c;在这些测试框架面前&#xff0c;孰优孰劣…...

    2024/4/18 1:53:07
  6. WRAP验厂辅导,WRAP标准是由环球服装生产社会责任组织制定的

    WRAP认证 WRAP是由四个英文字的缩写结合而来。原文是WORLDWIDE RESPONSIBLE APPAREL PRODUCTION,中文译意是「负责任的全球成衣制造」。WRAP标准是由环球服装生产社会责任组织制定的&#xff0c;目的是改善世界各地服装生产企业的人权状况。 WRAP认证简介 支持买家&#xff1…...

    2024/4/17 6:55:12
  7. 美当周初请失业金人数再升 现货金多头显颓势

    1月13日&#xff0c;美国当周初请失业金人数连续第二周上升、录得23万人次&#xff0c;创去年11月13日当周以来新高&#xff0c;高于预期的20万人。数据上升或代表部份企业在疫情冲击下开始解雇员工&#xff0c;同时也意味着随着新一波疫情消退&#xff0c;多数雇主在经历过劳动…...

    2024/4/14 17:23:34
  8. SpringBoot知识 day03

    一、SpringBoot的配置文件 1.1 SpringBoot配置文件类型 1.1.1 SpringBoot配置文件类型和作用SpringBoot是基于约定的&#xff0c;所以很多配置都有默认值&#xff0c;但如果想使用自己的配置替换默认配置的话&#xff0c;就可以使用 application.properties或者application.yml…...

    2024/4/14 17:23:39
  9. 如何在VS2019中配置OpenCV

    以下文章来源于&#xff1a;公_众_号开源电子网 读取更多技术文章&#xff0c;请扫码关注 如何在VS2019中配置OpenCV 1. 下载OpenCV SDK 与安装 进入OpenCV官网(https://opencv.org/)&#xff0c; 点击左上角Library&#xff0c;选择相应的版本下载&#xff0c;小编下载的是…...

    2024/4/5 5:15:39
  10. 模型预测精度(数值regression)评价指标 - RMSE, MAE, MAPE Bias哪个指标更好?Forecast KPIs: RMSE, MAE, MAPE Bias

    模型预测精度&#xff08;数值regression&#xff09;评价指标 - RMSE, MAE, MAPE & Bias哪个指标更好&#xff1f; 在销量/需求预测时常用的一些模型评价指标&#xff0c;尤其是在supplychain销量预测等领域&#xff0c;哪些指标好&#xff0c;哪些不好&#xff1f;什么时…...

    2024/5/1 11:16:26
  11. rdesktop连接windows7主机提示被拒绝的解决方法

    1.在待连接的Windows主机上依次 右击“我的电脑”&#xff0d;>”属性”&#xff0d;>“高级系统设置”- >”远程设置”&#xff0d;>在远程桌面选项中&#xff0c;选择允许运行任意版本远程桌面的连接。 2.检查linux主机和待连接的Windows 主机是否可以相互ping通…...

    2024/4/14 17:23:24
  12. 在阿里,我们如何管理代码分支?| 云效

    引言 在阿里内部&#xff0c;流行着许多有意思的工程实践。有些实践通过工具和流程嵌在集团的大环境里&#xff0c;外界不容易复制&#xff0c;有些实践则是流露在大家的日常习惯里&#xff0c;被默默的遵守。比如分支管理这件事&#xff0c;其实属于工具和习惯各占一半&#…...

    2024/4/14 17:23:39
  13. 分享|2021行业数字化转型洞察系列报告之智能制造白皮书(附PDF)

    数字经济浪潮席卷全球&#xff0c;随着德国“工业4.0” 、美国先进制造、英国工业2050、中国制造2025、等全球国家级战略部署&#xff0c;驱动传统产业加快推动新一轮产业革命&#xff0c;“智能制造” 已成为新的战略制高点&#xff0c;以智能制造为主攻方向&#xff0c;推动制…...

    2024/4/25 15:14:17
  14. 鸿蒙培训二

    学习链接&#xff1a; 视频链接&#xff1a;鸿蒙2.x系统应用开发 前端基础入门教程-12集全完结_哔哩哔哩_bilibili 博主链接&#xff1a;技术胖-华为鸿蒙系统应用 OpenHarmony JS 前端开发 基础入门教程-完结 官方文档链接&#xff1a;文档中心 1、作业一的代码讲解&#x…...

    2024/4/17 16:32:46
  15. Redis(集群的配置)

    创建目录以及配置文件,命令如下(三个为例) mdkir /myredis cp /opt/redis/redis.conf /myredis vim redis6379.conf vim redis6380.conf vim redis6381.conf vim redis6389.conf vim redis6390.conf vim redis6391.conf conf配置文件的内容如下:(以6379为例) 启动所有的redis …...

    2024/4/7 4:14:38
  16. 皮蛋Oracle

    还是空白的哦&#xff01;...

    2024/4/18 12:19:44
  17. 川土微CA-IS3082W隔离式RS-485/RS-422收发器简介

    概述 CA-IS308x是具有高可靠性的隔离式全双工RS-485收发器系列产品&#xff0c;同时具有高电磁抗扰度和低辐射特性。其中CA-IS3080W和CA-IS3086W是全双工收发器&#xff0c;CA-IS3082W&#xff0c;CA-IS3082WX和CA-IS3088W&#xff0c;CA-IS3088WX是半双工收发器。该系列产品具…...

    2024/4/14 17:23:54
  18. adb与fastboot

    1.adb 手机端&#xff1a;开发者模式&#xff1b;USB调试&#xff0c;允许ADB权限&#xff1b;允许HDB连接&#xff1b; PC端&#xff1a;安装驱动 adb start-server / adb kill-server lsusb adb device adb root / adb unroot adb shell adb install / adb uninstall…...

    2024/4/24 8:16:31
  19. cesium-卷帘效果

    cesium-卷帘效果 使用“卷帘图层”工具以交互方式显示被卷帘图层下方的图层。使用此工具可轻松地查看某特定图层下面的内容&#xff0c;而无需在内容列表中关闭该图层。 核心代码 /*** 卷帘*/addJuanlian(){let viewer this._viewer;let layers viewer.imageryLayers;if(th…...

    2024/4/14 17:23:49
  20. MVC与嵌入式框架分层

    文章目录前言一、结合MVC和框架分层二、结合RTOS进一步实现MVC三、总结前言 上篇和上上篇把嵌入式框架分层与MVC分别进行了简单的了解&#xff0c;知道了每个部分的优缺点&#xff0c;现在将两者进行结合&#xff0c;进一步进行学习。 下面是这两篇文章 MVC与嵌入式 嵌入式框…...

    2024/4/14 17:23:34

最新文章

  1. Windows 下安装 jupyter notebook

    先安装 python 环境&#xff0c;具体不再讲了。有了 python 环境&#xff0c;就可以用 pip 命令安装了。为了加快速度&#xff0c;下面的命令选择的清华大学的镜像源。 pip install jupyter -i https://pypi.tuna.tsinghua.edu.cn/simple/安装完成后&#xff0c;我在下面的文件…...

    2024/5/3 7:29:07
  2. 梯度消失和梯度爆炸的一些处理方法

    在这里是记录一下梯度消失或梯度爆炸的一些处理技巧。全当学习总结了如有错误还请留言&#xff0c;在此感激不尽。 权重和梯度的更新公式如下&#xff1a; w w − η ⋅ ∇ w w w - \eta \cdot \nabla w ww−η⋅∇w 个人通俗的理解梯度消失就是网络模型在反向求导的时候出…...

    2024/3/20 10:50:27
  3. 代码随想录算法训练营day32

    1005_K次取反后最大化的数组和&#xff08;看了题解&#xff09; 题目&#xff1a; 给你一个整数数组 nums 和一个整数 k &#xff0c;按以下方法修改该数组&#xff1a; 选择某个下标 i 并将 nums[i] 替换为 -nums[i] 。 重复这个过程恰好 k 次。可以多次选择同一个下标 i…...

    2024/5/3 2:17:09
  4. Kafka架构概述

    Kafka的体系结构 Kafka是由Apache软件基金会管理的一个开源的分布式数据流处理平台。Kafka具有支持消息的发布/订阅模式、高吞吐量与低延迟、持久化、支持水平扩展、高可用性等特点。可以将Kafka应用于大数据实时处理、高性能数据管道、流分析、数据集成和关键任务应用等场景。…...

    2024/5/1 4:28:47
  5. MATLAB绘制堆叠填充图--巧用句柄

    MATLAB绘制堆叠填充图–巧用句柄 目录 MATLAB绘制堆叠填充图--巧用句柄1. 主要原理讲解1.1 主要函数1.2 句柄原理 2. 绘图示例2.1 准备数据2.2 绘制堆叠填充图-使用句柄控制图形属性2.3 设置填充颜色和样式2.4 添加标题和标签2.5 绘图效果 3. 结语 堆叠填充图是一种常见的数据可…...

    2024/5/2 8:56:34
  6. 【外汇早评】美通胀数据走低,美元调整

    原标题:【外汇早评】美通胀数据走低,美元调整昨日美国方面公布了新一期的核心PCE物价指数数据,同比增长1.6%,低于前值和预期值的1.7%,距离美联储的通胀目标2%继续走低,通胀压力较低,且此前美国一季度GDP初值中的消费部分下滑明显,因此市场对美联储后续更可能降息的政策…...

    2024/5/1 17:30:59
  7. 【原油贵金属周评】原油多头拥挤,价格调整

    原标题:【原油贵金属周评】原油多头拥挤,价格调整本周国际劳动节,我们喜迎四天假期,但是整个金融市场确实流动性充沛,大事频发,各个商品波动剧烈。美国方面,在本周四凌晨公布5月份的利率决议和新闻发布会,维持联邦基金利率在2.25%-2.50%不变,符合市场预期。同时美联储…...

    2024/5/2 16:16:39
  8. 【外汇周评】靓丽非农不及疲软通胀影响

    原标题:【外汇周评】靓丽非农不及疲软通胀影响在刚结束的周五,美国方面公布了新一期的非农就业数据,大幅好于前值和预期,新增就业重新回到20万以上。具体数据: 美国4月非农就业人口变动 26.3万人,预期 19万人,前值 19.6万人。 美国4月失业率 3.6%,预期 3.8%,前值 3…...

    2024/4/29 2:29:43
  9. 【原油贵金属早评】库存继续增加,油价收跌

    原标题:【原油贵金属早评】库存继续增加,油价收跌周三清晨公布美国当周API原油库存数据,上周原油库存增加281万桶至4.692亿桶,增幅超过预期的74.4万桶。且有消息人士称,沙特阿美据悉将于6月向亚洲炼油厂额外出售更多原油,印度炼油商预计将每日获得至多20万桶的额外原油供…...

    2024/5/2 9:28:15
  10. 【外汇早评】日本央行会议纪要不改日元强势

    原标题:【外汇早评】日本央行会议纪要不改日元强势近两日日元大幅走强与近期市场风险情绪上升,避险资金回流日元有关,也与前一段时间的美日贸易谈判给日本缓冲期,日本方面对汇率问题也避免继续贬值有关。虽然今日早间日本央行公布的利率会议纪要仍然是支持宽松政策,但这符…...

    2024/4/27 17:58:04
  11. 【原油贵金属早评】欧佩克稳定市场,填补伊朗问题的影响

    原标题:【原油贵金属早评】欧佩克稳定市场,填补伊朗问题的影响近日伊朗局势升温,导致市场担忧影响原油供给,油价试图反弹。此时OPEC表态稳定市场。据消息人士透露,沙特6月石油出口料将低于700万桶/日,沙特已经收到石油消费国提出的6月份扩大出口的“适度要求”,沙特将满…...

    2024/4/27 14:22:49
  12. 【外汇早评】美欲与伊朗重谈协议

    原标题:【外汇早评】美欲与伊朗重谈协议美国对伊朗的制裁遭到伊朗的抗议,昨日伊朗方面提出将部分退出伊核协议。而此行为又遭到欧洲方面对伊朗的谴责和警告,伊朗外长昨日回应称,欧洲国家履行它们的义务,伊核协议就能保证存续。据传闻伊朗的导弹已经对准了以色列和美国的航…...

    2024/4/28 1:28:33
  13. 【原油贵金属早评】波动率飙升,市场情绪动荡

    原标题:【原油贵金属早评】波动率飙升,市场情绪动荡因中美贸易谈判不安情绪影响,金融市场各资产品种出现明显的波动。随着美国与中方开启第十一轮谈判之际,美国按照既定计划向中国2000亿商品征收25%的关税,市场情绪有所平复,已经开始接受这一事实。虽然波动率-恐慌指数VI…...

    2024/4/30 9:43:09
  14. 【原油贵金属周评】伊朗局势升温,黄金多头跃跃欲试

    原标题:【原油贵金属周评】伊朗局势升温,黄金多头跃跃欲试美国和伊朗的局势继续升温,市场风险情绪上升,避险黄金有向上突破阻力的迹象。原油方面稍显平稳,近期美国和OPEC加大供给及市场需求回落的影响,伊朗局势并未推升油价走强。近期中美贸易谈判摩擦再度升级,美国对中…...

    2024/4/27 17:59:30
  15. 【原油贵金属早评】市场情绪继续恶化,黄金上破

    原标题:【原油贵金属早评】市场情绪继续恶化,黄金上破周初中国针对于美国加征关税的进行的反制措施引发市场情绪的大幅波动,人民币汇率出现大幅的贬值动能,金融市场受到非常明显的冲击。尤其是波动率起来之后,对于股市的表现尤其不安。隔夜美国股市出现明显的下行走势,这…...

    2024/5/2 15:04:34
  16. 【外汇早评】美伊僵持,风险情绪继续升温

    原标题:【外汇早评】美伊僵持,风险情绪继续升温昨日沙特两艘油轮再次发生爆炸事件,导致波斯湾局势进一步恶化,市场担忧美伊可能会出现摩擦生火,避险品种获得支撑,黄金和日元大幅走强。美指受中美贸易问题影响而在低位震荡。继5月12日,四艘商船在阿联酋领海附近的阿曼湾、…...

    2024/4/28 1:34:08
  17. 【原油贵金属早评】贸易冲突导致需求低迷,油价弱势

    原标题:【原油贵金属早评】贸易冲突导致需求低迷,油价弱势近日虽然伊朗局势升温,中东地区几起油船被袭击事件影响,但油价并未走高,而是出于调整结构中。由于市场预期局势失控的可能性较低,而中美贸易问题导致的全球经济衰退风险更大,需求会持续低迷,因此油价调整压力较…...

    2024/4/26 19:03:37
  18. 氧生福地 玩美北湖(上)——为时光守候两千年

    原标题:氧生福地 玩美北湖(上)——为时光守候两千年一次说走就走的旅行,只有一张高铁票的距离~ 所以,湖南郴州,我来了~ 从广州南站出发,一个半小时就到达郴州西站了。在动车上,同时改票的南风兄和我居然被分到了一个车厢,所以一路非常愉快地聊了过来。 挺好,最起…...

    2024/4/29 20:46:55
  19. 氧生福地 玩美北湖(中)——永春梯田里的美与鲜

    原标题:氧生福地 玩美北湖(中)——永春梯田里的美与鲜一觉醒来,因为大家太爱“美”照,在柳毅山庄去寻找龙女而错过了早餐时间。近十点,向导坏坏还是带着饥肠辘辘的我们去吃郴州最富有盛名的“鱼头粉”。说这是“十二分推荐”,到郴州必吃的美食之一。 哇塞!那个味美香甜…...

    2024/4/30 22:21:04
  20. 氧生福地 玩美北湖(下)——奔跑吧骚年!

    原标题:氧生福地 玩美北湖(下)——奔跑吧骚年!让我们红尘做伴 活得潇潇洒洒 策马奔腾共享人世繁华 对酒当歌唱出心中喜悦 轰轰烈烈把握青春年华 让我们红尘做伴 活得潇潇洒洒 策马奔腾共享人世繁华 对酒当歌唱出心中喜悦 轰轰烈烈把握青春年华 啊……啊……啊 两…...

    2024/5/1 4:32:01
  21. 扒开伪装医用面膜,翻六倍价格宰客,小姐姐注意了!

    原标题:扒开伪装医用面膜,翻六倍价格宰客,小姐姐注意了!扒开伪装医用面膜,翻六倍价格宰客!当行业里的某一品项火爆了,就会有很多商家蹭热度,装逼忽悠,最近火爆朋友圈的医用面膜,被沾上了污点,到底怎么回事呢? “比普通面膜安全、效果好!痘痘、痘印、敏感肌都能用…...

    2024/4/27 23:24:42
  22. 「发现」铁皮石斛仙草之神奇功效用于医用面膜

    原标题:「发现」铁皮石斛仙草之神奇功效用于医用面膜丽彦妆铁皮石斛医用面膜|石斛多糖无菌修护补水贴19大优势: 1、铁皮石斛:自唐宋以来,一直被列为皇室贡品,铁皮石斛生于海拔1600米的悬崖峭壁之上,繁殖力差,产量极低,所以古代仅供皇室、贵族享用 2、铁皮石斛自古民间…...

    2024/4/28 5:48:52
  23. 丽彦妆\医用面膜\冷敷贴轻奢医学护肤引导者

    原标题:丽彦妆\医用面膜\冷敷贴轻奢医学护肤引导者【公司简介】 广州华彬企业隶属香港华彬集团有限公司,专注美业21年,其旗下品牌: 「圣茵美」私密荷尔蒙抗衰,产后修复 「圣仪轩」私密荷尔蒙抗衰,产后修复 「花茵莳」私密荷尔蒙抗衰,产后修复 「丽彦妆」专注医学护…...

    2024/4/30 9:42:22
  24. 广州械字号面膜生产厂家OEM/ODM4项须知!

    原标题:广州械字号面膜生产厂家OEM/ODM4项须知!广州械字号面膜生产厂家OEM/ODM流程及注意事项解读: 械字号医用面膜,其实在我国并没有严格的定义,通常我们说的医美面膜指的应该是一种「医用敷料」,也就是说,医用面膜其实算作「医疗器械」的一种,又称「医用冷敷贴」。 …...

    2024/5/2 9:07:46
  25. 械字号医用眼膜缓解用眼过度到底有无作用?

    原标题:械字号医用眼膜缓解用眼过度到底有无作用?医用眼膜/械字号眼膜/医用冷敷眼贴 凝胶层为亲水高分子材料,含70%以上的水分。体表皮肤温度传导到本产品的凝胶层,热量被凝胶内水分子吸收,通过水分的蒸发带走大量的热量,可迅速地降低体表皮肤局部温度,减轻局部皮肤的灼…...

    2024/4/30 9:42:49
  26. 配置失败还原请勿关闭计算机,电脑开机屏幕上面显示,配置失败还原更改 请勿关闭计算机 开不了机 这个问题怎么办...

    解析如下&#xff1a;1、长按电脑电源键直至关机&#xff0c;然后再按一次电源健重启电脑&#xff0c;按F8健进入安全模式2、安全模式下进入Windows系统桌面后&#xff0c;按住“winR”打开运行窗口&#xff0c;输入“services.msc”打开服务设置3、在服务界面&#xff0c;选中…...

    2022/11/19 21:17:18
  27. 错误使用 reshape要执行 RESHAPE,请勿更改元素数目。

    %读入6幅图像&#xff08;每一幅图像的大小是564*564&#xff09; f1 imread(WashingtonDC_Band1_564.tif); subplot(3,2,1),imshow(f1); f2 imread(WashingtonDC_Band2_564.tif); subplot(3,2,2),imshow(f2); f3 imread(WashingtonDC_Band3_564.tif); subplot(3,2,3),imsho…...

    2022/11/19 21:17:16
  28. 配置 已完成 请勿关闭计算机,win7系统关机提示“配置Windows Update已完成30%请勿关闭计算机...

    win7系统关机提示“配置Windows Update已完成30%请勿关闭计算机”问题的解决方法在win7系统关机时如果有升级系统的或者其他需要会直接进入一个 等待界面&#xff0c;在等待界面中我们需要等待操作结束才能关机&#xff0c;虽然这比较麻烦&#xff0c;但是对系统进行配置和升级…...

    2022/11/19 21:17:15
  29. 台式电脑显示配置100%请勿关闭计算机,“准备配置windows 请勿关闭计算机”的解决方法...

    有不少用户在重装Win7系统或更新系统后会遇到“准备配置windows&#xff0c;请勿关闭计算机”的提示&#xff0c;要过很久才能进入系统&#xff0c;有的用户甚至几个小时也无法进入&#xff0c;下面就教大家这个问题的解决方法。第一种方法&#xff1a;我们首先在左下角的“开始…...

    2022/11/19 21:17:14
  30. win7 正在配置 请勿关闭计算机,怎么办Win7开机显示正在配置Windows Update请勿关机...

    置信有很多用户都跟小编一样遇到过这样的问题&#xff0c;电脑时发现开机屏幕显现“正在配置Windows Update&#xff0c;请勿关机”(如下图所示)&#xff0c;而且还需求等大约5分钟才干进入系统。这是怎样回事呢&#xff1f;一切都是正常操作的&#xff0c;为什么开时机呈现“正…...

    2022/11/19 21:17:13
  31. 准备配置windows 请勿关闭计算机 蓝屏,Win7开机总是出现提示“配置Windows请勿关机”...

    Win7系统开机启动时总是出现“配置Windows请勿关机”的提示&#xff0c;没过几秒后电脑自动重启&#xff0c;每次开机都这样无法进入系统&#xff0c;此时碰到这种现象的用户就可以使用以下5种方法解决问题。方法一&#xff1a;开机按下F8&#xff0c;在出现的Windows高级启动选…...

    2022/11/19 21:17:12
  32. 准备windows请勿关闭计算机要多久,windows10系统提示正在准备windows请勿关闭计算机怎么办...

    有不少windows10系统用户反映说碰到这样一个情况&#xff0c;就是电脑提示正在准备windows请勿关闭计算机&#xff0c;碰到这样的问题该怎么解决呢&#xff0c;现在小编就给大家分享一下windows10系统提示正在准备windows请勿关闭计算机的具体第一种方法&#xff1a;1、2、依次…...

    2022/11/19 21:17:11
  33. 配置 已完成 请勿关闭计算机,win7系统关机提示“配置Windows Update已完成30%请勿关闭计算机”的解决方法...

    今天和大家分享一下win7系统重装了Win7旗舰版系统后&#xff0c;每次关机的时候桌面上都会显示一个“配置Windows Update的界面&#xff0c;提示请勿关闭计算机”&#xff0c;每次停留好几分钟才能正常关机&#xff0c;导致什么情况引起的呢&#xff1f;出现配置Windows Update…...

    2022/11/19 21:17:10
  34. 电脑桌面一直是清理请关闭计算机,windows7一直卡在清理 请勿关闭计算机-win7清理请勿关机,win7配置更新35%不动...

    只能是等着&#xff0c;别无他法。说是卡着如果你看硬盘灯应该在读写。如果从 Win 10 无法正常回滚&#xff0c;只能是考虑备份数据后重装系统了。解决来方案一&#xff1a;管理员运行cmd&#xff1a;net stop WuAuServcd %windir%ren SoftwareDistribution SDoldnet start WuA…...

    2022/11/19 21:17:09
  35. 计算机配置更新不起,电脑提示“配置Windows Update请勿关闭计算机”怎么办?

    原标题&#xff1a;电脑提示“配置Windows Update请勿关闭计算机”怎么办&#xff1f;win7系统中在开机与关闭的时候总是显示“配置windows update请勿关闭计算机”相信有不少朋友都曾遇到过一次两次还能忍但经常遇到就叫人感到心烦了遇到这种问题怎么办呢&#xff1f;一般的方…...

    2022/11/19 21:17:08
  36. 计算机正在配置无法关机,关机提示 windows7 正在配置windows 请勿关闭计算机 ,然后等了一晚上也没有关掉。现在电脑无法正常关机...

    关机提示 windows7 正在配置windows 请勿关闭计算机 &#xff0c;然后等了一晚上也没有关掉。现在电脑无法正常关机以下文字资料是由(历史新知网www.lishixinzhi.com)小编为大家搜集整理后发布的内容&#xff0c;让我们赶快一起来看一下吧&#xff01;关机提示 windows7 正在配…...

    2022/11/19 21:17:05
  37. 钉钉提示请勿通过开发者调试模式_钉钉请勿通过开发者调试模式是真的吗好不好用...

    钉钉请勿通过开发者调试模式是真的吗好不好用 更新时间:2020-04-20 22:24:19 浏览次数:729次 区域: 南阳 > 卧龙 列举网提醒您:为保障您的权益,请不要提前支付任何费用! 虚拟位置外设器!!轨迹模拟&虚拟位置外设神器 专业用于:钉钉,外勤365,红圈通,企业微信和…...

    2022/11/19 21:17:05
  38. 配置失败还原请勿关闭计算机怎么办,win7系统出现“配置windows update失败 还原更改 请勿关闭计算机”,长时间没反应,无法进入系统的解决方案...

    前几天班里有位学生电脑(windows 7系统)出问题了&#xff0c;具体表现是开机时一直停留在“配置windows update失败 还原更改 请勿关闭计算机”这个界面&#xff0c;长时间没反应&#xff0c;无法进入系统。这个问题原来帮其他同学也解决过&#xff0c;网上搜了不少资料&#x…...

    2022/11/19 21:17:04
  39. 一个电脑无法关闭计算机你应该怎么办,电脑显示“清理请勿关闭计算机”怎么办?...

    本文为你提供了3个有效解决电脑显示“清理请勿关闭计算机”问题的方法&#xff0c;并在最后教给你1种保护系统安全的好方法&#xff0c;一起来看看&#xff01;电脑出现“清理请勿关闭计算机”在Windows 7(SP1)和Windows Server 2008 R2 SP1中&#xff0c;添加了1个新功能在“磁…...

    2022/11/19 21:17:03
  40. 请勿关闭计算机还原更改要多久,电脑显示:配置windows更新失败,正在还原更改,请勿关闭计算机怎么办...

    许多用户在长期不使用电脑的时候&#xff0c;开启电脑发现电脑显示&#xff1a;配置windows更新失败&#xff0c;正在还原更改&#xff0c;请勿关闭计算机。。.这要怎么办呢&#xff1f;下面小编就带着大家一起看看吧&#xff01;如果能够正常进入系统&#xff0c;建议您暂时移…...

    2022/11/19 21:17:02
  41. 还原更改请勿关闭计算机 要多久,配置windows update失败 还原更改 请勿关闭计算机,电脑开机后一直显示以...

    配置windows update失败 还原更改 请勿关闭计算机&#xff0c;电脑开机后一直显示以以下文字资料是由(历史新知网www.lishixinzhi.com)小编为大家搜集整理后发布的内容&#xff0c;让我们赶快一起来看一下吧&#xff01;配置windows update失败 还原更改 请勿关闭计算机&#x…...

    2022/11/19 21:17:01
  42. 电脑配置中请勿关闭计算机怎么办,准备配置windows请勿关闭计算机一直显示怎么办【图解】...

    不知道大家有没有遇到过这样的一个问题&#xff0c;就是我们的win7系统在关机的时候&#xff0c;总是喜欢显示“准备配置windows&#xff0c;请勿关机”这样的一个页面&#xff0c;没有什么大碍&#xff0c;但是如果一直等着的话就要两个小时甚至更久都关不了机&#xff0c;非常…...

    2022/11/19 21:17:00
  43. 正在准备配置请勿关闭计算机,正在准备配置windows请勿关闭计算机时间长了解决教程...

    当电脑出现正在准备配置windows请勿关闭计算机时&#xff0c;一般是您正对windows进行升级&#xff0c;但是这个要是长时间没有反应&#xff0c;我们不能再傻等下去了。可能是电脑出了别的问题了&#xff0c;来看看教程的说法。正在准备配置windows请勿关闭计算机时间长了方法一…...

    2022/11/19 21:16:59
  44. 配置失败还原请勿关闭计算机,配置Windows Update失败,还原更改请勿关闭计算机...

    我们使用电脑的过程中有时会遇到这种情况&#xff0c;当我们打开电脑之后&#xff0c;发现一直停留在一个界面&#xff1a;“配置Windows Update失败&#xff0c;还原更改请勿关闭计算机”&#xff0c;等了许久还是无法进入系统。如果我们遇到此类问题应该如何解决呢&#xff0…...

    2022/11/19 21:16:58
  45. 如何在iPhone上关闭“请勿打扰”

    Apple’s “Do Not Disturb While Driving” is a potentially lifesaving iPhone feature, but it doesn’t always turn on automatically at the appropriate time. For example, you might be a passenger in a moving car, but your iPhone may think you’re the one dri…...

    2022/11/19 21:16:57