»ç¿ëÀÚ ¾È³» ¹× ÂüÁ¶¼­

AsShape

AsShapeÀº ±âÇÏ ¿ÀºêÁ§Æ®¸¦ ÃëÇϰí BLOBÀ» ¸®ÅÏÇÕ´Ï´Ù.

±¸¹®

db2gse.AsShape(g db2gse.ST_Geometry)

¸®ÅÏ À¯Çü

BLOB(1m)

¿¹

´ÙÀ½ÀÇ ÄÚµå Á¶°¢Àº AsShape ÇÔ¼ö°¡ SENSITIVE_AREAS Å×À̺íÀÇ ¿µ¿ª ´Ù°¢ÇüÀ» ¸ð¾ç ´Ù°¢ÇüÀ¸·Î º¯È¯ÇÏ´Â ¹æ¹ýÀ» ¿¹½ÃÇÕ´Ï´Ù. ÀÌ ¸ð¾ç ´Ù°¢ÇüÀº È­¸éÇ¥½Ã¿ë ÀÀ¿ëÇÁ·Î±×·¥ÀÇ draw_polygon ÇÔ¼ö¿¡ Àü´ÞµË´Ï´Ù.

/* Create the SQL expression. */
strcpy(sqlstmt, "select db2gse.AsShape (zone) from SENSITIVE_AREAS
where db2gse.EnvelopesIntersect(zone, db2gse.PolyFromShape(cast(? as blob(1m)), 
db2gse.coordref()..srid(0)))");
 
/* Prepare the SQL statement. */
SQLPrepare(hstmt, (UCHAR *)sqlstmt, SQL_NTS);
 
/* Set the pcbvalue1 length of the shape. */
pcbvalue1 = blob_len;
 
/* Bind the shape parameter */
SQLBindParameter (hstmt, 1, SQL_PARAM_INPUT, SQL_C_BINARY, SQL_BLOB, blob_len,
0, shape, blob_len, &pcbvalue1);
 
/* Execute the query */
rc = SQLExecute(hstmt);
 
/* Assign the results of the query (the Zone polygons) to the
   fetched_binary variable. */
SQLBindCol (hstmt, 1, SQL_C_Binary, fetched_binary, 100000, &ind_blob);
 
/* Fetch each polygon within the display window and display it. */
 
while(SQL_SUCCESS == (rc = SQLFetch(hstmt)))
  draw_polygon(fetched_binary);


[ ÆäÀÌÁöÀÇ ¸Ç À§ | ÀÌÀü ÆäÀÌÁö | ´ÙÀ½ ÆäÀÌÁö | ¸ñÂ÷ | »öÀÎ ]