⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ogrgeometry.cpp

📁 用于读取TAB、MIF、SHP文件的类
💻 CPP
📖 第 1 页 / 共 5 页
字号:
 * passed psEnvelope structure. * * This method is the same as the C function OGR_G_GetEnvelope(). * * @param psEnvelope the structure in which to place the results. *//************************************************************************//*                         OGR_G_GetEnvelope()                          *//************************************************************************//** * Computes and returns the bounding envelope for this geometry in the * passed psEnvelope structure. * * This function is the same as the CPP method OGRGeometry::getEnvelope(). * * @param hGeom handle of the geometry to get envelope from. * @param psEnvelope the structure in which to place the results. */void OGR_G_GetEnvelope( OGRGeometryH hGeom, OGREnvelope *psEnvelope ){    ((OGRGeometry *) hGeom)->getEnvelope( psEnvelope );}/** * \fn OGRErr OGRGeometry::importFromWkb( unsigned char * pabyData, int nSize); * * Assign geometry from well known binary data. * * The object must have already been instantiated as the correct derived * type of geometry object to match the binaries type.  This method is used * by the OGRGeometryFactory class, but not normally called by application * code.   *  * This method relates to the SFCOM IWks::ImportFromWKB() method. * * This method is the same as the C function OGR_G_ImportFromWkb(). * * @param pabyData the binary input data. * @param nSize the size of pabyData in bytes, or zero if not known. * * @return OGRERR_NONE if all goes well, otherwise any of * OGRERR_NOT_ENOUGH_DATA, OGRERR_UNSUPPORTED_GEOMETRY_TYPE, or * OGRERR_CORRUPT_DATA may be returned. *//************************************************************************//*                        OGR_G_ImportFromWkb()                         *//************************************************************************//** * Assign geometry from well known binary data. * * The object must have already been instantiated as the correct derived * type of geometry object to match the binaries type. * * This function relates to the SFCOM IWks::ImportFromWKB() method. * * This function is the same as the CPP method OGRGeometry::importFromWkb(). * * @param hGeom handle on the geometry to assign the well know binary data to. * @param pabyData the binary input data. * @param nSize the size of pabyData in bytes, or zero if not known. * * @return OGRERR_NONE if all goes well, otherwise any of * OGRERR_NOT_ENOUGH_DATA, OGRERR_UNSUPPORTED_GEOMETRY_TYPE, or * OGRERR_CORRUPT_DATA may be returned. */OGRErr OGR_G_ImportFromWkb( OGRGeometryH hGeom,                             unsigned char *pabyData, int nSize ){    return ((OGRGeometry *) hGeom)->importFromWkb( pabyData, nSize );}/** * \fn OGRErr OGRGeometry::exportToWkb( OGRwkbByteOrder eByteOrder,                                        unsigned char * pabyData ) const; * * Convert a geometry into well known binary format. * * This method relates to the SFCOM IWks::ExportToWKB() method. * * This method is the same as the C function OGR_G_ExportToWkb(). * * @param eByteOrder One of wkbXDR or wkbNDR indicating MSB or LSB byte order *               respectively. * @param pabyData a buffer into which the binary representation is *                      written.  This buffer must be at least *                      OGRGeometry::WkbSize() byte in size. * * @return Currently OGRERR_NONE is always returned. *//************************************************************************//*                         OGR_G_ExportToWkb()                          *//************************************************************************//** * Convert a geometry into well known binary format. * * This function relates to the SFCOM IWks::ExportToWKB() method. * * This function is the same as the CPP method OGRGeometry::exportToWkb(). * * @param hGeom handle on the geometry to convert to a well know binary  * data from. * @param eOrder One of wkbXDR or wkbNDR indicating MSB or LSB byte order *               respectively. * @param pabyDstBuffer a buffer into which the binary representation is *                      written.  This buffer must be at least *                      OGR_G_WkbSize() byte in size. * * @return Currently OGRERR_NONE is always returned. */OGRErr OGR_G_ExportToWkb( OGRGeometryH hGeom, OGRwkbByteOrder eOrder,                          unsigned char *pabyDstBuffer ){    return ((OGRGeometry *) hGeom)->exportToWkb( eOrder, pabyDstBuffer );}/** * \fn OGRErr OGRGeometry::importFromWkt( char ** ppszInput ); * * Assign geometry from well known text data. * * The object must have already been instantiated as the correct derived * type of geometry object to match the text type.  This method is used * by the OGRGeometryFactory class, but not normally called by application * code.   *  * This method relates to the SFCOM IWks::ImportFromWKT() method. * * This method is the same as the C function OGR_G_ImportFromWkt(). * * @param ppszInput pointer to a pointer to the source text.  The pointer is *                    updated to pointer after the consumed text. * * @return OGRERR_NONE if all goes well, otherwise any of * OGRERR_NOT_ENOUGH_DATA, OGRERR_UNSUPPORTED_GEOMETRY_TYPE, or * OGRERR_CORRUPT_DATA may be returned. *//************************************************************************//*                        OGR_G_ImportFromWkt()                         *//************************************************************************//** * Assign geometry from well known text data. * * The object must have already been instantiated as the correct derived * type of geometry object to match the text type. *  * This function relates to the SFCOM IWks::ImportFromWKT() method. * * This function is the same as the CPP method OGRGeometry::importFromWkt(). * * @param hGeom handle on the  geometry to assign well know text data to. * @param ppszSrcText pointer to a pointer to the source text.  The pointer is *                    updated to pointer after the consumed text. * * @return OGRERR_NONE if all goes well, otherwise any of * OGRERR_NOT_ENOUGH_DATA, OGRERR_UNSUPPORTED_GEOMETRY_TYPE, or * OGRERR_CORRUPT_DATA may be returned. */OGRErr OGR_G_ImportFromWkt( OGRGeometryH hGeom, char ** ppszSrcText ){    return ((OGRGeometry *) hGeom)->importFromWkt( ppszSrcText );}/** * \fn OGRErr OGRGeometry::exportToWkt( char ** ppszDstText ) const; * * Convert a geometry into well known text format. * * This method relates to the SFCOM IWks::ExportToWKT() method. * * This method is the same as the C function OGR_G_ExportToWkt(). * * @param ppszDstText a text buffer is allocated by the program, and assigned *                    to the passed pointer. * * @return Currently OGRERR_NONE is always returned. *//************************************************************************//*                         OGR_G_ExportToWkt()                          *//************************************************************************//** * Convert a geometry into well known text format. * * This function relates to the SFCOM IWks::ExportToWKT() method. * * This function is the same as the CPP method OGRGeometry::exportToWkt(). * * @param hGeom handle on the geometry to convert to a text format from. * @param ppszSrcText a text buffer is allocated by the program, and assigned                       to the passed pointer. * * @return Currently OGRERR_NONE is always returned. */OGRErr OGR_G_ExportToWkt( OGRGeometryH hGeom, char **ppszSrcText ){    return ((OGRGeometry *) hGeom)->exportToWkt( ppszSrcText );}/** * \fn OGRwkbGeometryType OGRGeometry::getGeometryType() const; * * Fetch geometry type. * * Note that the geometry type may include the 2.5D flag.  To get a 2D * flattened version of the geometry type apply the wkbFlatten() macro * to the return result. * * This method is the same as the C function OGR_G_GetGeometryType(). * * @return the geometry type code. *//************************************************************************//*                       OGR_G_GetGeometryType()                        *//************************************************************************//** * Fetch geometry type. * * Note that the geometry type may include the 2.5D flag.  To get a 2D * flattened version of the geometry type apply the wkbFlatten() macro * to the return result. * * This function is the same as the CPP method OGRGeometry::getGeometryType(). * * @param hGeom handle on the geometry to get type from. * @return the geometry type code. */OGRwkbGeometryType OGR_G_GetGeometryType( OGRGeometryH hGeom ){    return ((OGRGeometry *) hGeom)->getGeometryType();}/** * \fn const char * OGRGeometry::getGeometryName() const; * * Fetch WKT name for geometry type. * * There is no SFCOM analog to this method.   * * This method is the same as the C function OGR_G_GetGeometryName(). * * @return name used for this geometry type in well known text format.  The * returned pointer is to a static internal string and should not be modified * or freed. *//************************************************************************//*                       OGR_G_GetGeometryName()                        *//************************************************************************//** * Fetch WKT name for geometry type. * * There is no SFCOM analog to this function.   * * This function is the same as the CPP method OGRGeometry::getGeometryName(). * * @param hGeom handle on the geometry to get name from. * @return name used for this geometry type in well known text format. */const char *OGR_G_GetGeometryName( OGRGeometryH hGeom ){    return ((OGRGeometry *) hGeom)->getGeometryName();}/** * \fn OGRGeometry *OGRGeometry::clone() const; * * Make a copy of this object. * * This method relates to the SFCOM IGeometry::clone() method. * * This method is the same as the C function OGR_G_Clone(). *  * @return a new object instance with the same geometry, and spatial * reference system as the original. *//************************************************************************//*                            OGR_G_Clone()                             *//************************************************************************//** * Make a copy of this object. * * This function relates to the SFCOM IGeometry::clone() method. * * This function is the same as the CPP method OGRGeometry::clone(). *  * @param hGeom handle on the geometry to clone from. * @return an handle on the  copy of the geometry with the spatial * reference system as the original. */OGRGeometryH OGR_G_Clone( OGRGeometryH hGeom ){    return (OGRGeometryH) ((OGRGeometry *) hGeom)->clone();}/** * \fn OGRSpatialReference *OGRGeometry::getSpatialReference(); * * Returns spatial reference system for object. * * This method relates to the SFCOM IGeometry::get_SpatialReference() method. * * This method is the same as the C function OGR_G_GetSpatialReference(). * * @return a reference to the spatial reference object.  The object may be * shared with many geometry objects, and should not be modified. *//************************************************************************//*                     OGR_G_GetSpatialReference()                      *//************************************************************************//** * Returns spatial reference system for geometry. * * This function relates to the SFCOM IGeometry::get_SpatialReference() method. * * This function is the same as the CPP method  * OGRGeometry::getSpatialReference(). * * @param hGeom handle on the geometry to get spatial reference from. * @return a reference to the spatial reference geometry. */OGRSpatialReferenceH OGR_G_GetSpatialReference( OGRGeometryH hGeom ){    return (OGRSpatialReferenceH)         ((OGRGeometry *) hGeom)->getSpatialReference();}/** * \fn void OGRGeometry::empty(); * * Clear geometry information.  This restores the geometry to it's initial * state after construction, and before assignment of actual geometry. * * This method relates to the SFCOM IGeometry::Empty() method. * * This method is the same as the C function OGR_G_Empty(). *//************************************************************************//*                            OGR_G_Empty()                             *//************************************************************************//** * Clear geometry information.  This restores the geometry to it's initial * state after construction, and before assignment of actual geometry. * * This function relates to the SFCOM IGeometry::Empty() method. * * This function is the same as the CPP method OGRGeometry::empty(). * * @param hGeom handle on the geometry to empty. */void OGR_G_Empty( OGRGeometryH hGeom ){    ((OGRGeometry *) hGeom)->empty();}/************************************************************************//*                       OGRGeometryTypeToName()                        *//************************************************************************//** * Fetch a human readable name corresponding to an OGRwkBGeometryType value. * The returned value should not be modified, or freed by the application. * * This function is C callable. * * @param eType the geometry type. * * @return internal human readable string, or NULL on failure. */const char *OGRGeometryTypeToName( OGRwkbGeometryType eType ){    switch( eType )    {      case wkbUnknown:        return "Unknown (any)";              case wkbPoint:        return "Point";

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -