<?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 a text to a geometry in ArcGIS Pro Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-questions/convert-a-text-to-a-geometry/m-p/1690200#M102324</link>
    <description>&lt;P&gt;So, it appears to be not that hard after all, when you discover the &lt;A href="https://learn.microsoft.com/en-us/dotnet/api/system.windows.media.formattedtext" target="_self"&gt;FormattedText&lt;/A&gt; class from Windows.System.Media:&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;var formattedText = new FormattedText("Text",
    System.Globalization.CultureInfo.CurrentCulture,
    FlowDirection.LeftToRight,
    new Typeface("Arial"),
    100,
    Brushes.Black,
    96);
var geometry = formattedText.BuildGeometry(new Point(0, 0));
var path = geometry.GetFlattenedPathGeometry();
var figures = path.Figures;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then loop over all the figures' segments, casting the segments to PolylineSegment. this will return the coordinates.&lt;/P&gt;&lt;P&gt;GetFlattenedPathGeometry returns an approximation, but you can increase the emSize parameter for better quality.&lt;/P&gt;&lt;P&gt;The origin (0,0) is the top-left corner, positive Y values going down, so you may need to mirror over the X-axis by subtracting Y values from geom.Bounds.Height.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 12 Mar 2026 13:47:58 GMT</pubDate>
    <dc:creator>BerendVeldkamp</dc:creator>
    <dc:date>2026-03-12T13:47:58Z</dc:date>
    <item>
      <title>Convert a text to a geometry</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/convert-a-text-to-a-geometry/m-p/1689704#M102287</link>
      <description>&lt;P&gt;With ArcObjects, it was possible to convert a textstring to a polygon, using &lt;A href="https://help.arcgis.com/en/sdk/10.0/arcobjects_net/componenthelp/index.html#/GetGeometry_Method/001w0000027v000000/" target="_self"&gt;IQueryGeometry.GetGeometry&lt;/A&gt;&amp;nbsp;on the &lt;A href="https://help.arcgis.com/en/sdk/10.0/arcobjects_net/componenthelp/index.html#/TextSymbolClass_Class/001w000003vt000000/" target="_self"&gt;TextSymbol&lt;/A&gt; coclass.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is something like this possible with the ArcGIS Pro SDK?&lt;/P&gt;</description>
      <pubDate>Tue, 10 Mar 2026 16:13:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/convert-a-text-to-a-geometry/m-p/1689704#M102287</guid>
      <dc:creator>BerendVeldkamp</dc:creator>
      <dc:date>2026-03-10T16:13:32Z</dc:date>
    </item>
    <item>
      <title>Re: Convert a text to a geometry</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/convert-a-text-to-a-geometry/m-p/1689712#M102289</link>
      <description>&lt;P&gt;ArcGIS Pro supports Graphics to Features command for basic graphic features (e.g., point, line, polygon). You could probably try the same for 'text' elements but you would most likely get a point for the lower left of the first character of the sentence (i.e., you won't get the text string as a set of lines for example). Best alternative would be to look into converting the graphic text into annotation.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 10 Mar 2026 16:35:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/convert-a-text-to-a-geometry/m-p/1689712#M102289</guid>
      <dc:creator>RichardDaniels</dc:creator>
      <dc:date>2026-03-10T16:35:11Z</dc:date>
    </item>
    <item>
      <title>Re: Convert a text to a geometry</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/convert-a-text-to-a-geometry/m-p/1690154#M102322</link>
      <description>&lt;P&gt;Thanks, I'll try and post back if it works (or not&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;)&lt;/P&gt;</description>
      <pubDate>Thu, 12 Mar 2026 09:35:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/convert-a-text-to-a-geometry/m-p/1690154#M102322</guid>
      <dc:creator>BerendVeldkamp</dc:creator>
      <dc:date>2026-03-12T09:35:33Z</dc:date>
    </item>
    <item>
      <title>Re: Convert a text to a geometry</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/convert-a-text-to-a-geometry/m-p/1690155#M102323</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/2978"&gt;@RichardDaniels&lt;/a&gt;&amp;nbsp;Do you happen to have an example of how to get a geometry from an AnnotationFeature? I tried this code, but it only returns the bounding box of the annotation. I need the actual shape of the characters in the text.&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt; var layer = (AnnotationLayer)MapView.Active.Map
    .GetLayersAsFlattenedList()
    .FirstOrDefault(l =&amp;gt; l.Name == "AnnoTest");
 using var cursor = layer.Search();
 if (cursor.MoveNext())
 {
     var annotationFeature = (AnnotationFeature)cursor.Current;
     var json1 = annotationFeature.GetGraphicOutline().ToJson();
     var json2 = annotationFeature.GetShape().ToJson();
 }&lt;/LI-CODE&gt;&lt;P&gt;(Both GetGraphicOutline and GetShape return the same thing)&lt;/P&gt;</description>
      <pubDate>Thu, 12 Mar 2026 10:05:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/convert-a-text-to-a-geometry/m-p/1690155#M102323</guid>
      <dc:creator>BerendVeldkamp</dc:creator>
      <dc:date>2026-03-12T10:05:50Z</dc:date>
    </item>
    <item>
      <title>Re: Convert a text to a geometry</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/convert-a-text-to-a-geometry/m-p/1690200#M102324</link>
      <description>&lt;P&gt;So, it appears to be not that hard after all, when you discover the &lt;A href="https://learn.microsoft.com/en-us/dotnet/api/system.windows.media.formattedtext" target="_self"&gt;FormattedText&lt;/A&gt; class from Windows.System.Media:&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;var formattedText = new FormattedText("Text",
    System.Globalization.CultureInfo.CurrentCulture,
    FlowDirection.LeftToRight,
    new Typeface("Arial"),
    100,
    Brushes.Black,
    96);
var geometry = formattedText.BuildGeometry(new Point(0, 0));
var path = geometry.GetFlattenedPathGeometry();
var figures = path.Figures;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then loop over all the figures' segments, casting the segments to PolylineSegment. this will return the coordinates.&lt;/P&gt;&lt;P&gt;GetFlattenedPathGeometry returns an approximation, but you can increase the emSize parameter for better quality.&lt;/P&gt;&lt;P&gt;The origin (0,0) is the top-left corner, positive Y values going down, so you may need to mirror over the X-axis by subtracting Y values from geom.Bounds.Height.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 12 Mar 2026 13:47:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/convert-a-text-to-a-geometry/m-p/1690200#M102324</guid>
      <dc:creator>BerendVeldkamp</dc:creator>
      <dc:date>2026-03-12T13:47:58Z</dc:date>
    </item>
  </channel>
</rss>

