<?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 Re: Convert Labels/Annotation to Points using Python 9.3, get centroids in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/convert-labels-annotation-to-points-using-python-9/m-p/215194#M16588</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;&lt;BR /&gt;4. Use the Feature-to-point tool (Data Management-&amp;gt;Features) to convert the annotation to a point feature class, using the CENTROID as the point placement option.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Nice suggestion, it gets rid of the step to create and populate two x,y fields.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I tried the shape.LabelPoint in v10 SP1 and found the same results as before.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 11 May 2011 17:51:28 GMT</pubDate>
    <dc:creator>DonovanCameron</dc:creator>
    <dc:date>2011-05-11T17:51:28Z</dc:date>
    <item>
      <title>Convert Labels/Annotation to Points using Python 9.3, get centroids</title>
      <link>https://community.esri.com/t5/python-questions/convert-labels-annotation-to-points-using-python-9/m-p/215192#M16586</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I have a problem where I need to generate a point for every label but would like to do it with python&amp;nbsp; using the shape geometry and have came up with the following results...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;[ATTACH]6443[/ATTACH]&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The red '0' is the actual label from the feature class, it is being drawn dynamically (not stored as annotation)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;When using Calculate Geometry and &lt;/SPAN&gt;&lt;PRE class="plain" name="code"&gt;!shape.Centroid.*!&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;SPAN&gt; they share the same location, like a weighted/centre of gravity point.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The &lt;/SPAN&gt;&lt;PRE class="plain" name="code"&gt;!shape.Centroid.*!&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;SPAN&gt; and &lt;/SPAN&gt;&lt;PRE class="plain" name="code"&gt;!shape.LabelPoint.*!&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;SPAN&gt; return the same point, and neither is actually on the label point...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;A workaround, is to convert the labels to annotation (in a gdb), then add two new x/y fields and calculate the geometry of those, then create an XY theme from those two fields. Note that the x/y given will be a bounding box of the annotation, so multi-line labels can affect this. I generate x/y on a label with a single character.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;But like I mentioned, a python solution would be nice. The shape.LabelPoint sounded so promising!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 May 2011 21:29:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/convert-labels-annotation-to-points-using-python-9/m-p/215192#M16586</guid>
      <dc:creator>DonovanCameron</dc:creator>
      <dc:date>2011-05-09T21:29:08Z</dc:date>
    </item>
    <item>
      <title>Re: Convert Labels/Annotation to Points using Python 9.3, get centroids</title>
      <link>https://community.esri.com/t5/python-questions/convert-labels-annotation-to-points-using-python-9/m-p/215193#M16587</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;We had to do something similar so we could use ArcMap's label engine to determine the label placement for MapServer WMS's. The process is similar to your workaround:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;1. Turn on labels for an ArcMap layer.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;2. Convert to an annotation feature class, saved in a file gdb.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;3. Re-position the annotation features if necessary.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;4. Use the Feature-to-point tool (Data Management-&amp;gt;Features) to convert the annotation to a point feature class, using the CENTROID as the point placement option.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Unfortunately there is bunch of manual work involved (steps 1-3). Step 4 we use in a Python script since we perform a number of other processes on the output point file.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Your problem with "LabelPoint" sounds familiar. I vaguely recall testing it and getting the same results as you, and then abandoning it. Maybe it works better in 10?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 May 2011 12:49:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/convert-labels-annotation-to-points-using-python-9/m-p/215193#M16587</guid>
      <dc:creator>BradPosthumus</dc:creator>
      <dc:date>2011-05-11T12:49:38Z</dc:date>
    </item>
    <item>
      <title>Re: Convert Labels/Annotation to Points using Python 9.3, get centroids</title>
      <link>https://community.esri.com/t5/python-questions/convert-labels-annotation-to-points-using-python-9/m-p/215194#M16588</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;&lt;BR /&gt;4. Use the Feature-to-point tool (Data Management-&amp;gt;Features) to convert the annotation to a point feature class, using the CENTROID as the point placement option.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Nice suggestion, it gets rid of the step to create and populate two x,y fields.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I tried the shape.LabelPoint in v10 SP1 and found the same results as before.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 May 2011 17:51:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/convert-labels-annotation-to-points-using-python-9/m-p/215194#M16588</guid>
      <dc:creator>DonovanCameron</dc:creator>
      <dc:date>2011-05-11T17:51:28Z</dc:date>
    </item>
  </channel>
</rss>

