PostGIS 3.7.0dev-r@@SVN_REVISION@@
Loading...
Searching...
No Matches

◆ SHPWriteObject()

int SHPAPI_CALL SHPWriteObject ( SHPHandle  psSHP,
int  nShapeId,
SHPObject psObject 
)

Definition at line 1345 of file shpopen.c.

1347{
1348 SAOffset nRecordOffset;
1349 unsigned int nRecordSize=0;
1350 int i;
1351 uchar *pabyRec;
1352 int32 i32;
1353 int bAppendToLastRecord = FALSE;
1354 int bAppendToFile = FALSE;
1355
1356 psSHP->bUpdated = TRUE;
1357
1358/* -------------------------------------------------------------------- */
1359/* Ensure that shape object matches the type of the file it is */
1360/* being written to. */
1361/* -------------------------------------------------------------------- */
1362 assert( psObject->nSHPType == psSHP->nShapeType
1363 || psObject->nSHPType == SHPT_NULL );
1364
1365/* -------------------------------------------------------------------- */
1366/* Ensure that -1 is used for appends. Either blow an */
1367/* assertion, or if they are disabled, set the shapeid to -1 */
1368/* for appends. */
1369/* -------------------------------------------------------------------- */
1370 assert( nShapeId == -1
1371 || (nShapeId >= 0 && nShapeId < psSHP->nRecords) );
1372
1373 if( nShapeId != -1 && nShapeId >= psSHP->nRecords )
1374 nShapeId = -1;
1375
1376/* -------------------------------------------------------------------- */
1377/* Add the new entity to the in memory index. */
1378/* -------------------------------------------------------------------- */
1379 if( nShapeId == -1 && psSHP->nRecords+1 > psSHP->nMaxRecords )
1380 {
1381 int nNewMaxRecords = psSHP->nMaxRecords + psSHP->nMaxRecords / 3 + 100;
1382 unsigned int* panRecOffsetNew;
1383 unsigned int* panRecSizeNew;
1384
1385 panRecOffsetNew = STATIC_CAST(unsigned int *,
1386 SfRealloc(psSHP->panRecOffset,sizeof(unsigned int) * nNewMaxRecords ));
1387 if( panRecOffsetNew == SHPLIB_NULLPTR )
1388 return -1;
1389 psSHP->panRecOffset = panRecOffsetNew;
1390
1391 panRecSizeNew = STATIC_CAST(unsigned int *,
1392 SfRealloc(psSHP->panRecSize,sizeof(unsigned int) * nNewMaxRecords ));
1393 if( panRecSizeNew == SHPLIB_NULLPTR )
1394 return -1;
1395 psSHP->panRecSize = panRecSizeNew;
1396
1397 psSHP->nMaxRecords = nNewMaxRecords;
1398 }
1399
1400/* -------------------------------------------------------------------- */
1401/* Initialize record. */
1402/* -------------------------------------------------------------------- */
1403 pabyRec = STATIC_CAST(uchar *, malloc(psObject->nVertices * 4 * sizeof(double)
1404 + psObject->nParts * 8 + 128));
1405 if( pabyRec == SHPLIB_NULLPTR )
1406 return -1;
1407
1408/* -------------------------------------------------------------------- */
1409/* Extract vertices for a Polygon or Arc. */
1410/* -------------------------------------------------------------------- */
1411 if( psObject->nSHPType == SHPT_POLYGON
1412 || psObject->nSHPType == SHPT_POLYGONZ
1413 || psObject->nSHPType == SHPT_POLYGONM
1414 || psObject->nSHPType == SHPT_ARC
1415 || psObject->nSHPType == SHPT_ARCZ
1416 || psObject->nSHPType == SHPT_ARCM
1417 || psObject->nSHPType == SHPT_MULTIPATCH )
1418 {
1419 int32 nPoints, nParts;
1420
1421 nPoints = psObject->nVertices;
1422 nParts = psObject->nParts;
1423
1424 _SHPSetBounds( pabyRec + 12, psObject );
1425
1426 if( bBigEndian ) SwapWord( 4, &nPoints );
1427 if( bBigEndian ) SwapWord( 4, &nParts );
1428
1429 ByteCopy( &nPoints, pabyRec + 40 + 8, 4 );
1430 ByteCopy( &nParts, pabyRec + 36 + 8, 4 );
1431
1432 nRecordSize = 52;
1433
1434 /*
1435 * Write part start positions.
1436 */
1437 ByteCopy( psObject->panPartStart, pabyRec + 44 + 8,
1438 4 * psObject->nParts );
1439 for( i = 0; i < psObject->nParts; i++ )
1440 {
1441 if( bBigEndian ) SwapWord( 4, pabyRec + 44 + 8 + 4*i );
1442 nRecordSize += 4;
1443 }
1444
1445 /*
1446 * Write multipatch part types if needed.
1447 */
1448 if( psObject->nSHPType == SHPT_MULTIPATCH )
1449 {
1450 memcpy( pabyRec + nRecordSize, psObject->panPartType,
1451 4*psObject->nParts );
1452 for( i = 0; i < psObject->nParts; i++ )
1453 {
1454 if( bBigEndian ) SwapWord( 4, pabyRec + nRecordSize );
1455 nRecordSize += 4;
1456 }
1457 }
1458
1459 /*
1460 * Write the (x,y) vertex values.
1461 */
1462 for( i = 0; i < psObject->nVertices; i++ )
1463 {
1464 ByteCopy( psObject->padfX + i, pabyRec + nRecordSize, 8 );
1465 ByteCopy( psObject->padfY + i, pabyRec + nRecordSize + 8, 8 );
1466
1467 if( bBigEndian )
1468 SwapWord( 8, pabyRec + nRecordSize );
1469
1470 if( bBigEndian )
1471 SwapWord( 8, pabyRec + nRecordSize + 8 );
1472
1473 nRecordSize += 2 * 8;
1474 }
1475
1476 /*
1477 * Write the Z coordinates (if any).
1478 */
1479 if( psObject->nSHPType == SHPT_POLYGONZ
1480 || psObject->nSHPType == SHPT_ARCZ
1481 || psObject->nSHPType == SHPT_MULTIPATCH )
1482 {
1483 ByteCopy( &(psObject->dfZMin), pabyRec + nRecordSize, 8 );
1484 if( bBigEndian ) SwapWord( 8, pabyRec + nRecordSize );
1485 nRecordSize += 8;
1486
1487 ByteCopy( &(psObject->dfZMax), pabyRec + nRecordSize, 8 );
1488 if( bBigEndian ) SwapWord( 8, pabyRec + nRecordSize );
1489 nRecordSize += 8;
1490
1491 for( i = 0; i < psObject->nVertices; i++ )
1492 {
1493 ByteCopy( psObject->padfZ + i, pabyRec + nRecordSize, 8 );
1494 if( bBigEndian ) SwapWord( 8, pabyRec + nRecordSize );
1495 nRecordSize += 8;
1496 }
1497 }
1498
1499 /*
1500 * Write the M values, if any.
1501 */
1502 if( psObject->bMeasureIsUsed
1503 && (psObject->nSHPType == SHPT_POLYGONM
1504 || psObject->nSHPType == SHPT_ARCM
1506 || psObject->nSHPType == SHPT_MULTIPATCH
1507#endif
1508 || psObject->nSHPType == SHPT_POLYGONZ
1509 || psObject->nSHPType == SHPT_ARCZ) )
1510 {
1511 ByteCopy( &(psObject->dfMMin), pabyRec + nRecordSize, 8 );
1512 if( bBigEndian ) SwapWord( 8, pabyRec + nRecordSize );
1513 nRecordSize += 8;
1514
1515 ByteCopy( &(psObject->dfMMax), pabyRec + nRecordSize, 8 );
1516 if( bBigEndian ) SwapWord( 8, pabyRec + nRecordSize );
1517 nRecordSize += 8;
1518
1519 for( i = 0; i < psObject->nVertices; i++ )
1520 {
1521 ByteCopy( psObject->padfM + i, pabyRec + nRecordSize, 8 );
1522 if( bBigEndian ) SwapWord( 8, pabyRec + nRecordSize );
1523 nRecordSize += 8;
1524 }
1525 }
1526 }
1527
1528/* -------------------------------------------------------------------- */
1529/* Extract vertices for a MultiPoint. */
1530/* -------------------------------------------------------------------- */
1531 else if( psObject->nSHPType == SHPT_MULTIPOINT
1532 || psObject->nSHPType == SHPT_MULTIPOINTZ
1533 || psObject->nSHPType == SHPT_MULTIPOINTM )
1534 {
1535 int32 nPoints;
1536
1537 nPoints = psObject->nVertices;
1538
1539 _SHPSetBounds( pabyRec + 12, psObject );
1540
1541 if( bBigEndian ) SwapWord( 4, &nPoints );
1542 ByteCopy( &nPoints, pabyRec + 44, 4 );
1543
1544 for( i = 0; i < psObject->nVertices; i++ )
1545 {
1546 ByteCopy( psObject->padfX + i, pabyRec + 48 + i*16, 8 );
1547 ByteCopy( psObject->padfY + i, pabyRec + 48 + i*16 + 8, 8 );
1548
1549 if( bBigEndian ) SwapWord( 8, pabyRec + 48 + i*16 );
1550 if( bBigEndian ) SwapWord( 8, pabyRec + 48 + i*16 + 8 );
1551 }
1552
1553 nRecordSize = 48 + 16 * psObject->nVertices;
1554
1555 if( psObject->nSHPType == SHPT_MULTIPOINTZ )
1556 {
1557 ByteCopy( &(psObject->dfZMin), pabyRec + nRecordSize, 8 );
1558 if( bBigEndian ) SwapWord( 8, pabyRec + nRecordSize );
1559 nRecordSize += 8;
1560
1561 ByteCopy( &(psObject->dfZMax), pabyRec + nRecordSize, 8 );
1562 if( bBigEndian ) SwapWord( 8, pabyRec + nRecordSize );
1563 nRecordSize += 8;
1564
1565 for( i = 0; i < psObject->nVertices; i++ )
1566 {
1567 ByteCopy( psObject->padfZ + i, pabyRec + nRecordSize, 8 );
1568 if( bBigEndian ) SwapWord( 8, pabyRec + nRecordSize );
1569 nRecordSize += 8;
1570 }
1571 }
1572
1573 if( psObject->bMeasureIsUsed
1574 && (psObject->nSHPType == SHPT_MULTIPOINTZ
1575 || psObject->nSHPType == SHPT_MULTIPOINTM) )
1576 {
1577 ByteCopy( &(psObject->dfMMin), pabyRec + nRecordSize, 8 );
1578 if( bBigEndian ) SwapWord( 8, pabyRec + nRecordSize );
1579 nRecordSize += 8;
1580
1581 ByteCopy( &(psObject->dfMMax), pabyRec + nRecordSize, 8 );
1582 if( bBigEndian ) SwapWord( 8, pabyRec + nRecordSize );
1583 nRecordSize += 8;
1584
1585 for( i = 0; i < psObject->nVertices; i++ )
1586 {
1587 ByteCopy( psObject->padfM + i, pabyRec + nRecordSize, 8 );
1588 if( bBigEndian ) SwapWord( 8, pabyRec + nRecordSize );
1589 nRecordSize += 8;
1590 }
1591 }
1592 }
1593
1594/* -------------------------------------------------------------------- */
1595/* Write point. */
1596/* -------------------------------------------------------------------- */
1597 else if( psObject->nSHPType == SHPT_POINT
1598 || psObject->nSHPType == SHPT_POINTZ
1599 || psObject->nSHPType == SHPT_POINTM )
1600 {
1601 ByteCopy( psObject->padfX, pabyRec + 12, 8 );
1602 ByteCopy( psObject->padfY, pabyRec + 20, 8 );
1603
1604 if( bBigEndian ) SwapWord( 8, pabyRec + 12 );
1605 if( bBigEndian ) SwapWord( 8, pabyRec + 20 );
1606
1607 nRecordSize = 28;
1608
1609 if( psObject->nSHPType == SHPT_POINTZ )
1610 {
1611 ByteCopy( psObject->padfZ, pabyRec + nRecordSize, 8 );
1612 if( bBigEndian ) SwapWord( 8, pabyRec + nRecordSize );
1613 nRecordSize += 8;
1614 }
1615
1616 if( psObject->bMeasureIsUsed
1617 && (psObject->nSHPType == SHPT_POINTZ
1618 || psObject->nSHPType == SHPT_POINTM) )
1619 {
1620 ByteCopy( psObject->padfM, pabyRec + nRecordSize, 8 );
1621 if( bBigEndian ) SwapWord( 8, pabyRec + nRecordSize );
1622 nRecordSize += 8;
1623 }
1624 }
1625
1626/* -------------------------------------------------------------------- */
1627/* Not much to do for null geometries. */
1628/* -------------------------------------------------------------------- */
1629 else if( psObject->nSHPType == SHPT_NULL )
1630 {
1631 nRecordSize = 12;
1632 }
1633
1634 else
1635 {
1636 /* unknown type */
1637 assert( FALSE );
1638 }
1639
1640/* -------------------------------------------------------------------- */
1641/* Establish where we are going to put this record. If we are */
1642/* rewriting the last record of the file, then we can update it in */
1643/* place. Otherwise if rewriting an existing record, and it will */
1644/* fit, then put it back where the original came from. Otherwise */
1645/* write at the end. */
1646/* -------------------------------------------------------------------- */
1647 if( nShapeId != -1 && psSHP->panRecOffset[nShapeId] +
1648 psSHP->panRecSize[nShapeId] + 8 == psSHP->nFileSize )
1649 {
1650 nRecordOffset = psSHP->panRecOffset[nShapeId];
1651 bAppendToLastRecord = TRUE;
1652 }
1653 else if( nShapeId == -1 || psSHP->panRecSize[nShapeId] < nRecordSize-8 )
1654 {
1655 if( psSHP->nFileSize > UINT_MAX - nRecordSize)
1656 {
1657 char str[128];
1658 snprintf( str, sizeof(str), "Failed to write shape object. "
1659 "File size cannot reach %u + %u.",
1660 psSHP->nFileSize, nRecordSize );
1661 str[sizeof(str)-1] = '\0';
1662 psSHP->sHooks.Error( str );
1663 free( pabyRec );
1664 return -1;
1665 }
1666
1667 bAppendToFile = TRUE;
1668 nRecordOffset = psSHP->nFileSize;
1669 }
1670 else
1671 {
1672 nRecordOffset = psSHP->panRecOffset[nShapeId];
1673 }
1674
1675/* -------------------------------------------------------------------- */
1676/* Set the shape type, record number, and record size. */
1677/* -------------------------------------------------------------------- */
1678 i32 = (nShapeId < 0) ? psSHP->nRecords+1 : nShapeId+1; /* record # */
1679 if( !bBigEndian ) SwapWord( 4, &i32 );
1680 ByteCopy( &i32, pabyRec, 4 );
1681
1682 i32 = (nRecordSize-8)/2; /* record size */
1683 if( !bBigEndian ) SwapWord( 4, &i32 );
1684 ByteCopy( &i32, pabyRec + 4, 4 );
1685
1686 i32 = psObject->nSHPType; /* shape type */
1687 if( bBigEndian ) SwapWord( 4, &i32 );
1688 ByteCopy( &i32, pabyRec + 8, 4 );
1689
1690/* -------------------------------------------------------------------- */
1691/* Write out record. */
1692/* -------------------------------------------------------------------- */
1693
1694/* -------------------------------------------------------------------- */
1695/* Guard FSeek with check for whether we're already at position; */
1696/* no-op FSeeks defeat network filesystems' write buffering. */
1697/* -------------------------------------------------------------------- */
1698/* TOOK OUT GUARD cause causing mingw64 to fail, see https://trac.osgeo.org/postgis/ticket/4603 */
1699 //if ( psSHP->sHooks.FTell( psSHP->fpSHP ) != nRecordOffset ) {
1700 if( psSHP->sHooks.FSeek( psSHP->fpSHP, nRecordOffset, 0 ) != 0 )
1701 {
1702 char szErrorMsg[200];
1703
1704 snprintf( szErrorMsg, sizeof(szErrorMsg),
1705 "Error in psSHP->sHooks.FSeek() while writing object to .shp file: %s",
1706 strerror(errno) );
1707 szErrorMsg[sizeof(szErrorMsg)-1] = '\0';
1708 psSHP->sHooks.Error( szErrorMsg );
1709
1710 free( pabyRec );
1711 return -1;
1712 }
1713 //}
1714 if( psSHP->sHooks.FWrite( pabyRec, nRecordSize, 1, psSHP->fpSHP ) < 1 )
1715 {
1716 char szErrorMsg[200];
1717
1718 snprintf( szErrorMsg, sizeof(szErrorMsg),
1719 "Error in psSHP->sHooks.FWrite() while writing object of %u bytes to .shp file: %s",
1720 nRecordSize, strerror(errno) );
1721 szErrorMsg[sizeof(szErrorMsg)-1] = '\0';
1722 psSHP->sHooks.Error( szErrorMsg );
1723
1724 free( pabyRec );
1725 return -1;
1726 }
1727
1728 free( pabyRec );
1729
1730 if( bAppendToLastRecord )
1731 {
1732 psSHP->nFileSize = psSHP->panRecOffset[nShapeId] + nRecordSize;
1733 }
1734 else if( bAppendToFile )
1735 {
1736 if( nShapeId == -1 )
1737 nShapeId = psSHP->nRecords++;
1738
1739 psSHP->panRecOffset[nShapeId] = psSHP->nFileSize;
1740 psSHP->nFileSize += nRecordSize;
1741 }
1742 psSHP->panRecSize[nShapeId] = nRecordSize-8;
1743
1744/* -------------------------------------------------------------------- */
1745/* Expand file wide bounds based on this shape. */
1746/* -------------------------------------------------------------------- */
1747 if( psSHP->adBoundsMin[0] == 0.0
1748 && psSHP->adBoundsMax[0] == 0.0
1749 && psSHP->adBoundsMin[1] == 0.0
1750 && psSHP->adBoundsMax[1] == 0.0 )
1751 {
1752 if( psObject->nSHPType == SHPT_NULL || psObject->nVertices == 0 )
1753 {
1754 psSHP->adBoundsMin[0] = psSHP->adBoundsMax[0] = 0.0;
1755 psSHP->adBoundsMin[1] = psSHP->adBoundsMax[1] = 0.0;
1756 psSHP->adBoundsMin[2] = psSHP->adBoundsMax[2] = 0.0;
1757 psSHP->adBoundsMin[3] = psSHP->adBoundsMax[3] = 0.0;
1758 }
1759 else
1760 {
1761 psSHP->adBoundsMin[0] = psSHP->adBoundsMax[0] = psObject->padfX[0];
1762 psSHP->adBoundsMin[1] = psSHP->adBoundsMax[1] = psObject->padfY[0];
1763 psSHP->adBoundsMin[2] = psSHP->adBoundsMax[2] = psObject->padfZ ? psObject->padfZ[0] : 0.0;
1764 psSHP->adBoundsMin[3] = psSHP->adBoundsMax[3] = psObject->padfM ? psObject->padfM[0] : 0.0;
1765 }
1766 }
1767
1768 for( i = 0; i < psObject->nVertices; i++ )
1769 {
1770 psSHP->adBoundsMin[0] = MIN(psSHP->adBoundsMin[0],psObject->padfX[i]);
1771 psSHP->adBoundsMin[1] = MIN(psSHP->adBoundsMin[1],psObject->padfY[i]);
1772 psSHP->adBoundsMax[0] = MAX(psSHP->adBoundsMax[0],psObject->padfX[i]);
1773 psSHP->adBoundsMax[1] = MAX(psSHP->adBoundsMax[1],psObject->padfY[i]);
1774 if( psObject->padfZ )
1775 {
1776 psSHP->adBoundsMin[2] = MIN(psSHP->adBoundsMin[2],psObject->padfZ[i]);
1777 psSHP->adBoundsMax[2] = MAX(psSHP->adBoundsMax[2],psObject->padfZ[i]);
1778 }
1779 if( psObject->padfM )
1780 {
1781 psSHP->adBoundsMin[3] = MIN(psSHP->adBoundsMin[3],psObject->padfM[i]);
1782 psSHP->adBoundsMax[3] = MAX(psSHP->adBoundsMax[3],psObject->padfM[i]);
1783 }
1784 }
1785
1786 return( nShapeId );
1787}
#define str(s)
void * malloc(YYSIZE_T)
void free(void *)
#define SHPT_ARCZ
Definition shapefil.h:354
#define SHPT_MULTIPATCH
Definition shapefil.h:361
#define SHPT_NULL
Definition shapefil.h:348
#define SHPT_ARCM
Definition shapefil.h:358
#define SHPT_POLYGONM
Definition shapefil.h:359
#define SHPT_ARC
Definition shapefil.h:350
#define SHPT_POLYGON
Definition shapefil.h:351
#define DISABLE_MULTIPATCH_MEASURE
Definition shapefil.h:207
#define SHPT_MULTIPOINT
Definition shapefil.h:352
#define SHPT_POINTZ
Definition shapefil.h:353
#define SHPT_MULTIPOINTZ
Definition shapefil.h:356
#define SHPT_MULTIPOINTM
Definition shapefil.h:360
#define SHPT_POINTM
Definition shapefil.h:357
#define SHPT_POINT
Definition shapefil.h:349
#define SHPT_POLYGONZ
Definition shapefil.h:355
unsigned long SAOffset
Definition shapefil.h:286
static void * SfRealloc(void *pMem, int nNewSize)
Definition shpopen.c:131
static int bBigEndian
Definition shpopen.c:93
psObject nShapeId
Definition shpopen.c:1221
unsigned int int32
Definition shpopen.c:54
#define MIN(a, b)
Definition shpopen.c:64
unsigned char uchar
Definition shpopen.c:49
static void SwapWord(int length, void *wordP)
Definition shpopen.c:110
#define STATIC_CAST(type, x)
Definition shpopen.c:100
#define TRUE
Definition shpopen.c:59
#define FALSE
Definition shpopen.c:58
static void _SHPSetBounds(uchar *pabyRec, SHPObject *psShape)
Definition shpopen.c:1147
#define SHPLIB_NULLPTR
Definition shpopen.c:101
#define ByteCopy(a, b, c)
Definition shpopen.c:62
#define MAX(a, b)
Definition shpopen.c:65
void(* Error)(const char *message)
Definition shapefil.h:299
SAOffset(* FWrite)(void *p, SAOffset size, SAOffset nmemb, SAFile file)
Definition shapefil.h:292
SAOffset(* FSeek)(SAFile file, SAOffset offset, int whence)
Definition shapefil.h:293
int nShapeType
Definition shapefil.h:320
SAFile fpSHP
Definition shapefil.h:317
int nMaxRecords
Definition shapefil.h:325
unsigned int * panRecSize
Definition shapefil.h:327
SAHooks sHooks
Definition shapefil.h:315
double adBoundsMin[4]
Definition shapefil.h:329
int nRecords
Definition shapefil.h:324
int bUpdated
Definition shapefil.h:332
unsigned int nFileSize
Definition shapefil.h:322
unsigned int * panRecOffset
Definition shapefil.h:326
double adBoundsMax[4]
Definition shapefil.h:330
double * padfX
Definition shapefil.h:390
int * panPartType
Definition shapefil.h:387
double * padfY
Definition shapefil.h:391
double dfMMax
Definition shapefil.h:403
double * padfZ
Definition shapefil.h:392
double dfZMax
Definition shapefil.h:402
int * panPartStart
Definition shapefil.h:386
double * padfM
Definition shapefil.h:393
double dfMMin
Definition shapefil.h:398
double dfZMin
Definition shapefil.h:397
int bMeasureIsUsed
Definition shapefil.h:405

References _SHPSetBounds(), SHPInfo::adBoundsMax, SHPInfo::adBoundsMin, bBigEndian, tagSHPObject::bMeasureIsUsed, SHPInfo::bUpdated, ByteCopy, tagSHPObject::dfMMax, tagSHPObject::dfMMin, tagSHPObject::dfZMax, tagSHPObject::dfZMin, DISABLE_MULTIPATCH_MEASURE, SAHooks::Error, FALSE, SHPInfo::fpSHP, free(), SAHooks::FSeek, SAHooks::FWrite, malloc(), MAX, MIN, SHPInfo::nFileSize, SHPInfo::nMaxRecords, tagSHPObject::nParts, SHPInfo::nRecords, nShapeId, SHPInfo::nShapeType, tagSHPObject::nSHPType, tagSHPObject::nVertices, tagSHPObject::padfM, tagSHPObject::padfX, tagSHPObject::padfY, tagSHPObject::padfZ, tagSHPObject::panPartStart, tagSHPObject::panPartType, SHPInfo::panRecOffset, SHPInfo::panRecSize, SfRealloc(), SHPInfo::sHooks, SHPLIB_NULLPTR, SHPT_ARC, SHPT_ARCM, SHPT_ARCZ, SHPT_MULTIPATCH, SHPT_MULTIPOINT, SHPT_MULTIPOINTM, SHPT_MULTIPOINTZ, SHPT_NULL, SHPT_POINT, SHPT_POINTM, SHPT_POINTZ, SHPT_POLYGON, SHPT_POLYGONM, SHPT_POLYGONZ, STATIC_CAST, str, SwapWord(), and TRUE.

Referenced by ShpLoaderGenerateShapeRow().

Here is the call graph for this function:
Here is the caller graph for this function: