<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic ArcSDE C API Issue - Buffer (SE in Data Management Questions</title>
    <link>https://community.esri.com/t5/data-management-questions/arcsde-c-api-issue-buffer-se/m-p/556117#M31514</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I have to write a C code which will accept polygon features and create a buffer around them and store this buffer feature in a new feature of polygon type.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am aware of the ArcSDE C API and I believe that this requirement can be completed through SE_shape_generate_buffer. But as per my code I am unable to create a buffer around the feature, instead of this buffer its copy and store the same feature in the output but the difference is that this new feature is tilted upwards.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Can anyone please help me and provide me some kind of support to complete this functionality. Please find below the code I have applied ...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;##################################################################&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt; char tps_trt[15];&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; char tps_trt_tuple[15];&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; time_t time_deb;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; time_t time_deb_tuple;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; time_t time_cour;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; long featurecount = 0;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; long result = 0;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; long resultat=0;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; long resultat1=0;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; long lNumPoints=0;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt; long rc=0;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; long fdp_db_rec=0;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt; long l_layerType=SE_AREA_TYPE_MASK|SE_MULTIPART_TYPE_MASK;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; char pch_log[LG_MAX_ARG+1];&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt; prim_shapes=(SE_SHAPE*)malloc(sizeof(SE_SHAPE)*MAX_SHAPES);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; sec_shapes=(SE_SHAPE*)malloc(sizeof(SE_SHAPE)*MAX_SHAPES);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; fdp_db = (SE_SHAPE *) malloc (sizeof (SE_SHAPE)* MAX_FDP_DB_RECORDS);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; new_couv_shapes=(SE_SHAPE*)malloc(sizeof(SE_SHAPE)*MAX_SHAPES);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; tab_coordRef=(SE_COORDREF*)malloc(sizeof(SE_COORDREF)*MAX_COORDREF);&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt; long size_SE_SHAPE=sizeof(SE_SHAPE)*1;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; /* DEBUT Initialisation du tuple */&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; enreg * tuple=(enreg*)malloc(sizeof(enreg));&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; /*****************************************************************************************************************************************************************/&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;ccf_initConnection_SDE(&amp;amp;tab_connections[0],psde_error, con_server, con_instance, con_dbase, con_user, con_pswd);&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;ccf_init_stream_SDE (0, &amp;amp;tab_connections[0],psde_error, &amp;amp;tab_streams[0], &amp;amp;tab_coordRef[0], &amp;amp;tab_layers[0],&amp;amp;tab_sqlConstruct[0], nomLayerIn, clauseWhere, NULL,l_layerType,tuple);&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;ccf_init_stream_SDE (1, &amp;amp;tab_connections[0],psde_error, &amp;amp;tab_streams[1], &amp;amp;tab_coordRef[1], &amp;amp;tab_layers[1],NULL, nomLayerOut, NULL, 0,l_layerType,tuple);&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;rc=SE_layerinfo_get_shape_types (tab_layers[0], (LONG *) &amp;amp;l_layerType);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; /*********************************************************************************************/&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;long l_nbTuples = 0,ret_shapes=0;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;long nb_mailles_20x20=0;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;long countShapes=0;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;BOOL isDisjoint_ret=TRUE;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;char * var; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;while ((resultat1=ccf_lire_tuple_SDE(psde_error, &amp;amp;tab_streams[0], tuple, &amp;amp;prim_shapes, &amp;amp;tab_coordRef[0])) == 0)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;{&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; ccf_majTuple(tuple);&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt; ret_shapes= SE_shape_generate_buffer (prim_shapes, 0.5, 30 , &amp;amp;new_couv_shapes);&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt; tuple-&amp;gt;tab_valChampsOut[0]=(char*) &amp;amp;(new_couv_shapes[0]);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; ccf_ecrire_tuple_SDE (psde_error, &amp;amp;tab_streams[1], &amp;amp;tab_layers[1], tuple,&amp;amp;tab_coordRef[1]);&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt; ccf_commit_SDE(&amp;amp;tab_connections[0],psde_error,&amp;amp;tab_streams[1]);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; SE_shape_free(new_couv_shapes);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have also reffer below mention link and tried to implement this code but didnt got any success.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://edndoc.esri.com/arcsde/9.0/capi_concepts/shape_functions.htm"&gt;http://edndoc.esri.com/arcsde/9.0/capi_concepts/shape_functions.htm&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Please find attached images of output I got from this.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 20 Sep 2011 09:25:16 GMT</pubDate>
    <dc:creator>DeepLakhanpal</dc:creator>
    <dc:date>2011-09-20T09:25:16Z</dc:date>
    <item>
      <title>ArcSDE C API Issue - Buffer (SE</title>
      <link>https://community.esri.com/t5/data-management-questions/arcsde-c-api-issue-buffer-se/m-p/556117#M31514</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I have to write a C code which will accept polygon features and create a buffer around them and store this buffer feature in a new feature of polygon type.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am aware of the ArcSDE C API and I believe that this requirement can be completed through SE_shape_generate_buffer. But as per my code I am unable to create a buffer around the feature, instead of this buffer its copy and store the same feature in the output but the difference is that this new feature is tilted upwards.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Can anyone please help me and provide me some kind of support to complete this functionality. Please find below the code I have applied ...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;##################################################################&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt; char tps_trt[15];&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; char tps_trt_tuple[15];&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; time_t time_deb;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; time_t time_deb_tuple;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; time_t time_cour;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; long featurecount = 0;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; long result = 0;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; long resultat=0;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; long resultat1=0;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; long lNumPoints=0;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt; long rc=0;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; long fdp_db_rec=0;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt; long l_layerType=SE_AREA_TYPE_MASK|SE_MULTIPART_TYPE_MASK;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; char pch_log[LG_MAX_ARG+1];&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt; prim_shapes=(SE_SHAPE*)malloc(sizeof(SE_SHAPE)*MAX_SHAPES);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; sec_shapes=(SE_SHAPE*)malloc(sizeof(SE_SHAPE)*MAX_SHAPES);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; fdp_db = (SE_SHAPE *) malloc (sizeof (SE_SHAPE)* MAX_FDP_DB_RECORDS);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; new_couv_shapes=(SE_SHAPE*)malloc(sizeof(SE_SHAPE)*MAX_SHAPES);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; tab_coordRef=(SE_COORDREF*)malloc(sizeof(SE_COORDREF)*MAX_COORDREF);&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt; long size_SE_SHAPE=sizeof(SE_SHAPE)*1;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; /* DEBUT Initialisation du tuple */&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; enreg * tuple=(enreg*)malloc(sizeof(enreg));&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; /*****************************************************************************************************************************************************************/&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;ccf_initConnection_SDE(&amp;amp;tab_connections[0],psde_error, con_server, con_instance, con_dbase, con_user, con_pswd);&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;ccf_init_stream_SDE (0, &amp;amp;tab_connections[0],psde_error, &amp;amp;tab_streams[0], &amp;amp;tab_coordRef[0], &amp;amp;tab_layers[0],&amp;amp;tab_sqlConstruct[0], nomLayerIn, clauseWhere, NULL,l_layerType,tuple);&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;ccf_init_stream_SDE (1, &amp;amp;tab_connections[0],psde_error, &amp;amp;tab_streams[1], &amp;amp;tab_coordRef[1], &amp;amp;tab_layers[1],NULL, nomLayerOut, NULL, 0,l_layerType,tuple);&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;rc=SE_layerinfo_get_shape_types (tab_layers[0], (LONG *) &amp;amp;l_layerType);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; /*********************************************************************************************/&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;long l_nbTuples = 0,ret_shapes=0;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;long nb_mailles_20x20=0;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;long countShapes=0;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;BOOL isDisjoint_ret=TRUE;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;char * var; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;while ((resultat1=ccf_lire_tuple_SDE(psde_error, &amp;amp;tab_streams[0], tuple, &amp;amp;prim_shapes, &amp;amp;tab_coordRef[0])) == 0)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;{&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; ccf_majTuple(tuple);&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt; ret_shapes= SE_shape_generate_buffer (prim_shapes, 0.5, 30 , &amp;amp;new_couv_shapes);&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt; tuple-&amp;gt;tab_valChampsOut[0]=(char*) &amp;amp;(new_couv_shapes[0]);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; ccf_ecrire_tuple_SDE (psde_error, &amp;amp;tab_streams[1], &amp;amp;tab_layers[1], tuple,&amp;amp;tab_coordRef[1]);&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt; ccf_commit_SDE(&amp;amp;tab_connections[0],psde_error,&amp;amp;tab_streams[1]);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; SE_shape_free(new_couv_shapes);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have also reffer below mention link and tried to implement this code but didnt got any success.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://edndoc.esri.com/arcsde/9.0/capi_concepts/shape_functions.htm"&gt;http://edndoc.esri.com/arcsde/9.0/capi_concepts/shape_functions.htm&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Please find attached images of output I got from this.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Sep 2011 09:25:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/arcsde-c-api-issue-buffer-se/m-p/556117#M31514</guid>
      <dc:creator>DeepLakhanpal</dc:creator>
      <dc:date>2011-09-20T09:25:16Z</dc:date>
    </item>
    <item>
      <title>Re: ArcSDE C API Issue - Buffer (SE</title>
      <link>https://community.esri.com/t5/data-management-questions/arcsde-c-api-issue-buffer-se/m-p/556118#M31515</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Original User: vangelo&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In order to get help with your code, you need to post it (not just the function which calls that code).&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The code you did post has questionable use of array allocation (with no obvious need for arrays &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;and undefined MAX_* macros). All the code that contains "long" is incorrect -- ArcSDE uses the&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;"LONG" macro to hide the implementation of "long" on 32-bit platforms and "int" on 64-bit, so&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;using "long" can cause alignment issues that randomize results. From a 'C' coding standpoint,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;you should *NEVER* cast the results of malloc (doing so should be unnecessary, and hides&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;possible warnings or errors which would be returned by the compiler).&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The function which would perform a Cartesian buffer on a shape should probably look like this&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;(once they get the fixed-width CODE font straightened out):&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;LONG my_buffer(SE_SHAPE shape, LFLOAT distance)
{
&amp;nbsp;&amp;nbsp;&amp;nbsp; LONG&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; nparts = 0;
&amp;nbsp;&amp;nbsp;&amp;nbsp; LONG&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; npoints = 0;
&amp;nbsp;&amp;nbsp;&amp;nbsp; LONG&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; nsubs = 0;
&amp;nbsp;&amp;nbsp;&amp;nbsp; LONG&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; sr;
&amp;nbsp;&amp;nbsp;&amp;nbsp; SE_SHAPE&amp;nbsp;&amp;nbsp;&amp;nbsp; temp = NULL;
 
&amp;nbsp;&amp;nbsp;&amp;nbsp; sr = SE_shape_get_num_parts(shape,&amp;amp;nparts,&amp;amp;nsubs);
&amp;nbsp;&amp;nbsp;&amp;nbsp; if (sr != SE_SUCCESS) return sr;
 
&amp;nbsp;&amp;nbsp;&amp;nbsp; sr = SE_shape_get_num_points(shape,SE_ALL,SE_ALL,&amp;amp;npoints);
&amp;nbsp;&amp;nbsp;&amp;nbsp; if (sr != SE_SUCCESS) return sr;
 
&amp;nbsp;&amp;nbsp;&amp;nbsp; sr = SE_shape_create(NULL,&amp;amp;temp);
&amp;nbsp;&amp;nbsp;&amp;nbsp; if (sr != SE_SUCCESS) return sr;
 
&amp;nbsp;&amp;nbsp;&amp;nbsp; sr = SE_shape_duplicate(shape,temp);
&amp;nbsp;&amp;nbsp;&amp;nbsp; if (sr != SE_SUCCESS) goto bailout;
 
&amp;nbsp;&amp;nbsp;&amp;nbsp; npoints += (360 * nsubs) + 500;
 
&amp;nbsp;&amp;nbsp;&amp;nbsp; sr = SE_shape_generate_buffer(temp,distance,npoints,shape);
 
bailout:
&amp;nbsp;&amp;nbsp;&amp;nbsp; SE_shape_free(temp);
 
&amp;nbsp;&amp;nbsp;&amp;nbsp; return sr;
}&lt;/PRE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;But you need quite a bit of validation code to make sure the coordinate references in the&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;source and destination layers are identical.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I strongly suggest you review the way you're using pointers and arrays, because the casting &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;you're doing between SE_SHAPE and char * is not valid and your SE_shape_free invocation &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;is likely to corrupt memory.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;- V&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 00:01:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/arcsde-c-api-issue-buffer-se/m-p/556118#M31515</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2021-12-12T00:01:31Z</dc:date>
    </item>
    <item>
      <title>Re: ArcSDE C API Issue - Buffer (SE</title>
      <link>https://community.esri.com/t5/data-management-questions/arcsde-c-api-issue-buffer-se/m-p/556119#M31516</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Vince,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks again for your quick reply. I really appreciate your response.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;We have a legacy system in which we are using ArcSDE 9.0 along with its API and Oracle 9i. In here we have to develop where we will have a bulk of data in a polygon feature class and we have to generate a buffer on each and every polygon.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Their are some polygons which be need to merge before running this buffer functionality but as ArcSDE 9.0 C API dosen't have Merge functionality so we have skip this requirement.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;But if you have seen we have problem which running the buffer functionality on these data. These feature classes dosent have any projection system and all operations happen on these features without any projection information. Earlier we deveopled a same kind of functionality related to intersect.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;But we have major issue with Buffer, we will try to implement the solution you have provided, but as you can see our peace of code was earlier working reffer the attached images. But the result was not the same as we were expecting. Result feature is moved upwards instead of creating a buffer, quite a strange behavior. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Deep&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Sep 2011 09:03:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/arcsde-c-api-issue-buffer-se/m-p/556119#M31516</guid>
      <dc:creator>DeepLakhanpal</dc:creator>
      <dc:date>2011-09-21T09:03:00Z</dc:date>
    </item>
    <item>
      <title>Re: ArcSDE C API Issue - Buffer (SE</title>
      <link>https://community.esri.com/t5/data-management-questions/arcsde-c-api-issue-buffer-se/m-p/556120#M31517</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Original User: vangelo&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;*EVERY* shape in ArcSDE has a coordinate reference (which includes coordinate system,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;though this can be null, even though it shouldn't ever be).&amp;nbsp; As a programmer, you must be&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;extremely careful to be sure that the appropriate coordref is in use at all times.&amp;nbsp; HIGH&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;precision coordrefs were introduced at 9.0, but not supported until 9.2&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The SE_SHAPE API also supports every possible spatial manipulation (the full suite of &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;"Clementini operators"), so I don't understand your "Merge" and "Intersect" comments.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;It's been years since I last used the 9.0 API, but all the ugly spatial manipulation bugs I've run&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;into were at the 3.x and 8.[12] releases (I even provided the "chamber of horrors" QA code &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;used as part of regression testing of the shape engine).&amp;nbsp; Of course, if there was a bug at 9.0, &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;it's long past the time when it could be fixed (9.0 was "retired" in December, 2008).&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;It is highly unlikely that working code stopped working without: 1) a change to the code, or&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;2) data for which the code doesn't work.&amp;nbsp; Part of the joy of low-level coding is debugging&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;really nasty geometry issues ("Doh!&amp;nbsp; Look at that -- no wonder it doesn't work!").&amp;nbsp; If you&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;do find something which appears to be an API bug, I can test it with modern code for you.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;- V&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Sep 2011 11:07:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/arcsde-c-api-issue-buffer-se/m-p/556120#M31517</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2011-09-21T11:07:13Z</dc:date>
    </item>
    <item>
      <title>Re: ArcSDE C API Issue - Buffer (SE</title>
      <link>https://community.esri.com/t5/data-management-questions/arcsde-c-api-issue-buffer-se/m-p/556121#M31518</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Vince,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks again for your support, seems like i will fix my this issue soon. I have another issue for which i have raised a thread but didn't got any reply . This a critical issue for my application if you can please reply on that.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Please find below the link for the same.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://forums.arcgis.com/threads/40055-ArcSDE-Post-Installation-Error?p=135755#post135755"&gt;http://forums.arcgis.com/threads/40055-ArcSDE-Post-Installation-Error?p=135755#post135755&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks &amp;amp; Regards&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 Sep 2011 11:28:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/arcsde-c-api-issue-buffer-se/m-p/556121#M31518</guid>
      <dc:creator>DeepLakhanpal</dc:creator>
      <dc:date>2011-09-23T11:28:22Z</dc:date>
    </item>
    <item>
      <title>Re: ArcSDE C API Issue - Buffer (SE</title>
      <link>https://community.esri.com/t5/data-management-questions/arcsde-c-api-issue-buffer-se/m-p/556122#M31519</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Original User: abhijeet&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;hi Vince,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I am working on same issue which First Poster (Deep) mentioned. (Working together) We tried the solution given by you. I would like to elaborate some points.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;We are reading featureclass from oracle. We are passing it as input shape as mentioned in your function.I hope this part is working fine since we are able to fetch nsubs, npoints correctly. When we call function SE_shape_generate_buffer we are getting error code -134 (The given shape object handle is invalid). Can you help for this issue?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Oct 2011 09:06:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/arcsde-c-api-issue-buffer-se/m-p/556122#M31519</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2011-10-18T09:06:00Z</dc:date>
    </item>
    <item>
      <title>Re: ArcSDE C API Issue - Buffer (SE</title>
      <link>https://community.esri.com/t5/data-management-questions/arcsde-c-api-issue-buffer-se/m-p/556123#M31520</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;It's difficult to debug someone else's code when the full source is provided, but it's impossible &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;to debug with missing source.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Since the partial source uses several questionable techniques in memory management, I'd &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;recommend inspecting every line where a malloc or free is present, and replacing it with code&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;that reflects the fact that row-oriented processing functions only need one handle for each object.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;You should certainly move the SE_shape_free call outside the loop, but you also need to call &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;SE_shape_create at some point before the loop starts (allocating a random block of memory,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;typing it as an array of handles, and treating it like a single shape handle is an easy way to &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;produce run-time memory corruption errors).&amp;nbsp; It would certainly help to treat compilation &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;warnings as errors (and to enable pedantic warnings to look for memory management &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;problems at compile time).&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;It's also important to keep in mind that the ArcSDE API does not operate on feature classes.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;"Feature class" is an ArcGIS / ArcObjects term.&amp;nbsp; The ArcSDE API operates on the tables on which&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;feature classes are modelled.&amp;nbsp; You need to be very careful while using ArcSDE primitives that&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;you don't corrupt the geodatabase organization imparted by ArcObjects.&amp;nbsp; It would be slower,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;but much safer to use C# or Python to manipulate geodatabase objects in a framework that&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;is less vulnerable to memory management errors.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;- V&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Oct 2011 11:06:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/arcsde-c-api-issue-buffer-se/m-p/556123#M31520</guid>
      <dc:creator>VinceAngelo</dc:creator>
      <dc:date>2011-10-18T11:06:42Z</dc:date>
    </item>
  </channel>
</rss>

