2024年2月8日发(作者:)
pszFullName = CPLStrdup(pszName);
hSHP = hSHPIn;
hDBF = hDBFIn;
bUpdateAccess = bUpdate;
iNextShapeId = 0;
panMatchingFIDs = NULL;
bCheckedForQIX = FALSE;
hQIX = NULL;
bSbnSbxDeleted = FALSE;
bHeaderDirty = FALSE;
if( hSHP != NULL )
{
nTotalShapeCount = hSHP->nRecords;
if( hDBF != NULL && hDBF->nRecords != nTotalShapeCount )
{
CPLDebug("Shape", "Inconsistant record number in .shp (%d) and in .dbf (%d)",
hSHP->nRecords, hDBF->nRecords);
}
}
else
nTotalShapeCount = hDBF->nRecords;
eRequestedGeomType = eReqType;
bTruncationWarningEmitted = FALSE;
if( hDBF != NULL && hDBF->pszCodePage != NULL )
{
CPLDebug( "Shape", "DBF Codepage = %s for %s",
hDBF->pszCodePage, pszName );
// Not too sure about this, but it seems like better than nothing.
osEncoding = ConvertCodePage( hDBF->pszCodePage );
}
if( CPLGetConfigOption( "SHAPE_ENCODING", NULL ) != NULL )
osEncoding = CPLGetConfigOption( "SHAPE_ENCODING", "" );
if( osEncoding != "" )
CPLDebug( "Shape", "Treating as encoding '%s'.", osEncoding.c_str() );
poFeatureDefn = SHPReadOGRFeatureDefn( CPLGetBasename(pszName),
hSHP, hDBF, osEncoding );
/* Init info for the LRU layer mechanism */
poPrevLayer = NULL;
poNextLayer = NULL;
bHSHPWasNonNULL = hSHPIn != NULL;
bHDBFWasNonNULL = hDBFIn != NULL;
eFileDescriptorsState = FD_OPENED;
TouchLayer();
本文发布于:2024-02-08 15:17:31,感谢您对本站的认可!
本文链接:https://www.4u4v.net/it/170737665167860.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
留言与评论(共有 0 条评论) |