亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? mitab_feature.cpp

?? mitab,讀取MapInfo的地圖文件
?? CPP
?? 第 1 頁 / 共 5 頁
字號(hào):
    poGeom = GetGeometryRef();
    if (poGeom && wkbFlatten(poGeom->getGeometryType()) == wkbPoint)
        poPoint = (OGRPoint*)poGeom;
    else
    {
        CPLError(CE_Failure, CPLE_AssertionFailed,
                 "TABPoint: Missing or Invalid Geometry!");
        return 0.0;
    }

    return poPoint->getX();
}

/**********************************************************************
 *                   TABPoint::GetY()
 *
 * Return this point's Y coordinate.
 **********************************************************************/
double TABPoint::GetY()
{
    OGRGeometry *poGeom;
    OGRPoint    *poPoint=NULL;

    /*-----------------------------------------------------------------
     * Fetch and validate geometry
     *----------------------------------------------------------------*/
    poGeom = GetGeometryRef();
    if (poGeom && wkbFlatten(poGeom->getGeometryType()) == wkbPoint)
        poPoint = (OGRPoint*)poGeom;
    else
    {
        CPLError(CE_Failure, CPLE_AssertionFailed,
                 "TABPoint: Missing or Invalid Geometry!");
        return 0.0;
    }

    return poPoint->getY();
}


/**********************************************************************
 *                   TABPoint::GetStyleString()
 *
 * Return style string for this feature.
 *
 * Style String is built only once during the first call to GetStyleString().
 **********************************************************************/
const char *TABPoint::GetStyleString()
{
    if (m_pszStyleString == NULL)
    {
        m_pszStyleString = CPLStrdup(GetSymbolStyleString());
    }

    return m_pszStyleString;
}


/**********************************************************************
 *                   TABPoint::DumpMIF()
 *
 * Dump feature geometry in a format similar to .MIF POINTs.
 **********************************************************************/
void TABPoint::DumpMIF(FILE *fpOut /*=NULL*/)
{
    OGRGeometry *poGeom;
    OGRPoint    *poPoint;

    if (fpOut == NULL)
        fpOut = stdout;

    /*-----------------------------------------------------------------
     * Fetch and validate geometry
     *----------------------------------------------------------------*/
    poGeom = GetGeometryRef();
    if (poGeom && wkbFlatten(poGeom->getGeometryType()) == wkbPoint)
        poPoint = (OGRPoint*)poGeom;
    else
    {
        CPLError(CE_Failure, CPLE_AssertionFailed,
                 "TABPoint: Missing or Invalid Geometry!");
        return;
    }

    /*-----------------------------------------------------------------
     * Generate output
     *----------------------------------------------------------------*/
    fprintf(fpOut, "POINT %.15g %.15g\n", poPoint->getX(), poPoint->getY() );

    DumpSymbolDef(fpOut);

    /*-----------------------------------------------------------------
     * Handle stuff specific to derived classes
     *----------------------------------------------------------------*/
    if (GetFeatureClass() == TABFCFontPoint)
    {
        TABFontPoint *poFeature = (TABFontPoint *)this;
        fprintf(fpOut, "  m_nFontStyle     = 0x%2.2x (%d)\n", 
                poFeature->GetFontStyleTABValue(),
                poFeature->GetFontStyleTABValue());

        poFeature->DumpFontDef(fpOut);
    }
    if (GetFeatureClass() == TABFCCustomPoint)
    {
        TABCustomPoint *poFeature = (TABCustomPoint *)this;

        fprintf(fpOut, "  m_nUnknown_      = 0x%2.2x (%d)\n", 
                poFeature->m_nUnknown_, poFeature->m_nUnknown_);
        fprintf(fpOut, "  m_nCustomStyle   = 0x%2.2x (%d)\n", 
                poFeature->GetCustomSymbolStyle(), 
                poFeature->GetCustomSymbolStyle());

        poFeature->DumpFontDef(fpOut);
    }

    fflush(fpOut);
}

/*=====================================================================
 *                      class TABFontPoint
 *====================================================================*/


/**********************************************************************
 *                   TABFontPoint::TABFontPoint()
 *
 * Constructor.
 **********************************************************************/
TABFontPoint::TABFontPoint(OGRFeatureDefn *poDefnIn):
              TABPoint(poDefnIn)
{
    m_nFontStyle = 0;
    m_dAngle = 0.0;
}

/**********************************************************************
 *                   TABFontPoint::~TABFontPoint()
 *
 * Destructor.
 **********************************************************************/
TABFontPoint::~TABFontPoint()
{
}

/**********************************************************************
 *                     TABFontPoint::CloneTABFeature()
 *
 * Duplicate feature, including stuff specific to each TABFeature type.
 *
 * This method calls the generic TABFeature::CloneTABFeature() and 
 * then copies any members specific to its own type.
 **********************************************************************/
TABFeature *TABFontPoint::CloneTABFeature(OGRFeatureDefn *poNewDefn /*=NULL*/)
{
    /*-----------------------------------------------------------------
     * Alloc new feature and copy the base stuff
     *----------------------------------------------------------------*/
    TABFontPoint *poNew = new TABFontPoint(poNewDefn ? poNewDefn : 
                                                       GetDefnRef());

    CopyTABFeatureBase(poNew);

    /*-----------------------------------------------------------------
     * And members specific to this class
     *----------------------------------------------------------------*/
    // ITABFeatureSymbol
    *(poNew->GetSymbolDefRef()) = *GetSymbolDefRef();

    // ITABFeatureFont
    *(poNew->GetFontDefRef()) = *GetFontDefRef();

    poNew->SetSymbolAngle( GetSymbolAngle() );
    poNew->SetFontStyleTABValue( GetFontStyleTABValue() );

    return poNew;
}

/**********************************************************************
 *                   TABFontPoint::ReadGeometryFromMAPFile()
 *
 * Fill the geometry and representation (color, etc...) part of the
 * feature from the contents of the .MAP object pointed to by poMAPFile.
 *
 * It is assumed that poMAPFile currently points to the beginning of
 * a map object.
 *
 * Returns 0 on success, -1 on error, in which case CPLError() will have
 * been called.
 **********************************************************************/
int TABFontPoint::ReadGeometryFromMAPFile(TABMAPFile *poMapFile,
                                          TABMAPObjHdr *poObjHdr,
                                          GBool bCoordBlockDataOnly /*=FALSE*/,
                                          TABMAPCoordBlock ** /*ppoCoordBlock=NULL*/)
{
    double              dX, dY;
    OGRGeometry         *poGeometry;

    /* Nothing to do for bCoordBlockDataOnly (used by index splitting) */
    if (bCoordBlockDataOnly)
        return 0;

    /*-----------------------------------------------------------------
     * Fetch and validate geometry type
     *----------------------------------------------------------------*/
    m_nMapInfoType = poObjHdr->m_nType;

    if (m_nMapInfoType != TAB_GEOM_FONTSYMBOL &&
        m_nMapInfoType != TAB_GEOM_FONTSYMBOL_C )
    {
        CPLError(CE_Failure, CPLE_AssertionFailed,
           "ReadGeometryFromMAPFile(): unsupported geometry type %d (0x%2.2x)",
                 m_nMapInfoType, m_nMapInfoType);
        return -1;
    }

    /*-----------------------------------------------------------------
     * Read object information
     * NOTE: This symbol type does not contain a reference to a
     * SymbolDef block in the file, but we still use the m_sSymbolDef
     * structure to store the information inside the class so that the
     * ITABFeatureSymbol methods work properly for the class user.
     *----------------------------------------------------------------*/
    TABMAPObjFontPoint *poPointHdr = (TABMAPObjFontPoint *)poObjHdr;

    m_nSymbolDefIndex = -1;
    m_sSymbolDef.nRefCount = 0;

    m_sSymbolDef.nSymbolNo  = poPointHdr->m_nSymbolId;  // shape
    m_sSymbolDef.nPointSize = poPointHdr->m_nPointSize; // point size

    m_nFontStyle            = poPointHdr->m_nFontStyle; // font style

    m_sSymbolDef.rgbColor   = (poPointHdr->m_nR*256*256 +
                               poPointHdr->m_nG*256 +
                               poPointHdr->m_nB);

    /*-------------------------------------------------------------
     * Symbol Angle, in thenths of degree.
     * Contrary to arc start/end angles, no conversion based on 
     * origin quadrant is required here
     *------------------------------------------------------------*/
    m_dAngle       = poPointHdr->m_nAngle/10.0;

    m_nFontDefIndex = poPointHdr->m_nFontId;      // Font name index

    poMapFile->ReadFontDef(m_nFontDefIndex, &m_sFontDef);

    /*-----------------------------------------------------------------
     * Create and fill geometry object
     *----------------------------------------------------------------*/
    poMapFile->Int2Coordsys(poPointHdr->m_nX, poPointHdr->m_nY, dX, dY);
    poGeometry = new OGRPoint(dX, dY);
    
    SetGeometryDirectly(poGeometry);

    SetMBR(dX, dY, dX, dY);
    SetIntMBR(poObjHdr->m_nMinX, poObjHdr->m_nMinY, 
              poObjHdr->m_nMaxX, poObjHdr->m_nMaxY);

    return 0;
}

/**********************************************************************
 *                   TABFontPoint::WriteGeometryToMAPFile()
 *
 * Write the geometry and representation (color, etc...) part of the
 * feature to the .MAP object pointed to by poMAPFile.
 *
 * It is assumed that poMAPFile currently points to a valid map object.
 *
 * Returns 0 on success, -1 on error, in which case CPLError() will have
 * been called.
 **********************************************************************/
int TABFontPoint::WriteGeometryToMAPFile(TABMAPFile *poMapFile,
                                         TABMAPObjHdr *poObjHdr,
                                         GBool bCoordBlockDataOnly /*=FALSE*/, 
                                         TABMAPCoordBlock ** /*ppoCoordBlock=NULL*/)
{
    GInt32              nX, nY;
    OGRGeometry         *poGeom;
    OGRPoint            *poPoint;

    /* Nothing to do for bCoordBlockDataOnly (used by index splitting) */
    if (bCoordBlockDataOnly)
        return 0;

    /*-----------------------------------------------------------------
     * We assume that ValidateMapInfoType() was called already and that
     * the type in poObjHdr->m_nType is valid.
     *----------------------------------------------------------------*/
    CPLAssert(m_nMapInfoType == poObjHdr->m_nType);

    /*-----------------------------------------------------------------
     * Fetch and validate geometry
     *----------------------------------------------------------------*/
    poGeom = GetGeometryRef();
    if (poGeom && wkbFlatten(poGeom->getGeometryType()) == wkbPoint)
        poPoint = (OGRPoint*)poGeom;
    else
    {
        CPLError(CE_Failure, CPLE_AssertionFailed,
                 "TABFontPoint: Missing or Invalid Geometry!");
        return -1;
    }

    poMapFile->Coordsys2Int(poPoint->getX(), poPoint->getY(), nX, nY);

    /*-----------------------------------------------------------------
     * Copy object information
     * NOTE: This symbol type does not contain a reference to a
     * SymbolDef block in the file, but we still use the m_sSymbolDef
     * structure to store the information inside the class so that the
     * ITABFeatureSymbol methods work properly for the class user.
     *----------------------------------------------------------------*/
    TABMAPObjFontPoint *poPointHdr = (TABMAPObjFontPoint *)poObjHdr;

    poPointHdr->m_nX = nX;
    poPointHdr->m_nY = nY;
    poPointHdr->SetMBR(nX, nY, nX, nY);

    poPointHdr->m_nSymbolId = (GByte)m_sSymbolDef.nSymbolNo;    // shape
    poPointHdr->m_nPointSize = (GByte)m_sSymbolDef.nPointSize;  // point size
    poPointHdr->m_nFontStyle = m_nFontStyle;                    // font style

    poPointHdr->m_nR = COLOR_R(m_sSymbolDef.rgbColor);
    poPointHdr->m_nG = COLOR_G(m_sSymbolDef.rgbColor);
    poPointHdr->m_nB = COLOR_B(m_sSymbolDef.rgbColor);

    /*-------------------------------------------------------------
     * Symbol Angle, in thenths of degree.
     * Contrary to arc start/end angles, no conversion based on 
     * origin quadrant is required here
     *------------------------------------------------------------*/
    poPointHdr->m_nAngle = ROUND_INT(m_dAngle * 10.0);

    // Write Font Def
    m_nFontDefIndex = poMapFile->WriteFontDef(&m_sFontDef);
    poPointHdr->m_nFontId = m_nFontDefIndex;      // Font name index

    if (CPLGetLastErrorNo() != 0)

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
夜夜精品视频一区二区| 亚洲男人的天堂网| 成人国产电影网| 丝袜诱惑制服诱惑色一区在线观看 | 日韩av高清在线观看| 久久久久久久精| 欧美色网一区二区| 国产成人午夜片在线观看高清观看| 一区2区3区在线看| 欧美国产日产图区| 日韩一区二区三区视频在线| 99国产精品国产精品毛片| 日本亚洲视频在线| 一区二区三区精品在线观看| 久久精品视频一区| 日韩免费观看2025年上映的电影| 色悠悠久久综合| 福利91精品一区二区三区| 午夜av一区二区三区| 国产精品久久久久久一区二区三区| 欧美一二三区精品| 91成人免费电影| 成人99免费视频| 国产一区二区看久久| 美女www一区二区| 天天综合网 天天综合色| 一区二区三区精密机械公司| 国产精品久久久久久一区二区三区 | 精品久久久久久最新网址| 欧美性一二三区| 成人欧美一区二区三区在线播放| 精品国产一二三| 欧美男生操女生| 欧美日韩一区二区在线观看| 色婷婷亚洲一区二区三区| 不卡一卡二卡三乱码免费网站| 国产一区二区视频在线播放| 日本欧美在线看| 亚洲高清不卡在线| 一区二区三区色| 一区二区三区自拍| 一区二区免费在线| 亚洲尤物在线视频观看| 一区二区不卡在线播放 | 9久草视频在线视频精品| 国产成人免费视频| 国产成人免费视| 9i看片成人免费高清| 91影视在线播放| 99久久久精品免费观看国产蜜| 成人av综合在线| 94-欧美-setu| 在线看一区二区| 色婷婷激情一区二区三区| 欧美亚洲国产一区二区三区va | 久久嫩草精品久久久精品一| 久久婷婷国产综合精品青草| 久久精品一区蜜桃臀影院| 国产拍揄自揄精品视频麻豆| 国产精品激情偷乱一区二区∴| 国产精品白丝在线| 一区二区三区精品视频| 欧美另类z0zxhd电影| 911国产精品| 日韩一区二区精品在线观看| 久久亚洲欧美国产精品乐播| 国产精品美女一区二区在线观看| 亚洲欧美一区二区三区极速播放| 亚洲第一狼人社区| 另类的小说在线视频另类成人小视频在线 | 天天操天天综合网| 激情综合亚洲精品| 成人av免费网站| 欧美色图免费看| 久久九九国产精品| 一区二区三区欧美视频| 麻豆91在线播放| caoporen国产精品视频| 欧美日韩一卡二卡三卡 | 日韩欧美一二区| 欧美国产成人精品| 亚洲午夜久久久久中文字幕久| 免费观看30秒视频久久| av一二三不卡影片| 欧美一级专区免费大片| 国产精品第四页| 日韩国产精品久久久| 成人av网站在线| 日韩精品最新网址| 亚洲人成伊人成综合网小说| 蜜臀国产一区二区三区在线播放| 成人激情免费电影网址| 91麻豆精品国产91久久久久久久久 | 色综合色狠狠综合色| 日韩女优制服丝袜电影| 亚洲男帅同性gay1069| 久色婷婷小香蕉久久| 91黄色激情网站| 久久久国产午夜精品| 日韩精品一二区| 91香蕉视频黄| 久久久久久久久久看片| 亚洲国产成人av| 99久久精品国产一区| 欧美xxxx在线观看| 五月婷婷综合网| 99国产精品国产精品久久| 久久综合九色综合97婷婷| 亚洲午夜久久久久久久久久久 | 91精品国产91久久久久久一区二区| 国产拍欧美日韩视频二区| 亚瑟在线精品视频| 91国偷自产一区二区三区观看 | 麻豆成人91精品二区三区| 欧美性高清videossexo| 国产精品久久久久桃色tv| 韩国视频一区二区| 777久久久精品| 午夜亚洲国产au精品一区二区| 成人av网站在线| 国产女主播在线一区二区| 国产中文字幕精品| 日韩欧美国产一区二区三区 | 久久精品亚洲国产奇米99| 三级久久三级久久久| 欧美天堂一区二区三区| 一区二区三区在线免费视频| 99精品欧美一区二区三区综合在线| 日本一区二区三区电影| 国内成+人亚洲+欧美+综合在线| 欧美一区二区三区在| 亚洲电影一级片| 欧美日韩精品免费观看视频| 一区二区高清视频在线观看| 色婷婷激情久久| 一区二区三区四区在线免费观看| 99久久亚洲一区二区三区青草| 日本一区二区成人在线| 成人丝袜18视频在线观看| 国产亚洲成aⅴ人片在线观看| 国产成人精品亚洲午夜麻豆| 久久久久综合网| 国产成人福利片| 国产精品―色哟哟| 91免费看`日韩一区二区| 玉足女爽爽91| 欧美三级日本三级少妇99| 五月激情综合色| 日韩一区二区三区四区| 韩国视频一区二区| 中文成人av在线| 色婷婷综合久久久中文一区二区 | 欧美性猛交xxxx乱大交退制版| 亚洲国产成人av网| 91精品国产综合久久香蕉麻豆| 青草国产精品久久久久久| 日韩视频免费观看高清完整版在线观看 | 视频一区二区三区在线| 欧美sm美女调教| 成人污视频在线观看| 亚洲欧美国产77777| 欧美巨大另类极品videosbest| 久久精品国产免费看久久精品| 久久午夜国产精品| 色一区在线观看| 水野朝阳av一区二区三区| 日韩精品一区二区三区视频播放 | www.综合网.com| 亚洲午夜久久久久久久久电影网| 制服.丝袜.亚洲.另类.中文 | 久久精品999| 国产精品欧美一级免费| 在线观看欧美黄色| 国内精品自线一区二区三区视频| 中文av一区二区| 91.成人天堂一区| 国产成人在线看| 亚洲自拍偷拍图区| 久久久精品黄色| 欧美日韩精品一二三区| 国产激情91久久精品导航 | 日韩一区二区精品在线观看| 国产91精品欧美| 亚洲地区一二三色| 国产欧美一区二区精品仙草咪| 在线中文字幕一区二区| 免费一级片91| 亚洲欧美日韩人成在线播放| 欧美一区二区在线看| 成人黄色777网| 久久99热99| 亚洲电影一区二区| 久久亚洲综合av| 7777精品伊人久久久大香线蕉完整版 | 日韩电影在线一区二区三区| 国产精品理论在线观看| 欧美一区二区在线免费播放 | av福利精品导航| 韩国av一区二区三区四区| 亚洲a一区二区|