<?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: sdf.spatial.plot on SEDF that was NOT created with import_data in ArcGIS API for Python Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-python-questions/sdf-spatial-plot-on-sedf-that-was-not-created-with/m-p/789151#M1539</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="border: 0px; font-size: 14px;"&gt;Found reason: &amp;nbsp;&lt;/P&gt;&lt;P style="border: 0px; font-size: 14px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="border: 0px; font-size: 14px;"&gt;SEDF which works =&amp;nbsp;&lt;/P&gt;&lt;PRE style="color: #000000; background-color: transparent; border: 0px; font-size: 14px; padding: 1px 0px;"&gt;{'x': -13657899.64491753,&amp;nbsp; 'y': 5749953.6899396395,&amp;nbsp; 'spatialReference': {'wkid': 102100, 'latestWkid': 3857}}&lt;/PRE&gt;&lt;P style="border: 0px; font-size: 14px;"&gt;SEDF which doesn't =&amp;nbsp;&lt;/P&gt;&lt;PRE style="color: #000000; background-color: transparent; border: 0px; font-size: 14px; padding: 1px 0px;"&gt;{'x': -13657899.64491753,&amp;nbsp; 'y': 5749953.689939638,&amp;nbsp; 'spatialReference': {'wkid': 4326}}&lt;/PRE&gt;&lt;P style="border: 0px; font-size: 14px;"&gt;Also discovered that sdf.spatial.plot() will fail to render (without generation an error) if it encounters NaN values.&lt;/P&gt;&lt;P style="border: 0px; font-size: 14px;"&gt;Here's snippet to remove NaNs from SEDF:&lt;/P&gt;&lt;P style="border: 0px; font-size: 14px;"&gt;&lt;EM style="border: 0px; font-weight: inherit; font-size: 14px;"&gt;&lt;STRONG style="border: 0px; font-weight: bold; font-size: 14px;"&gt;sdf = GeoAccessor.from_xy(df, 'x', 'y', sr=102100) &lt;/STRONG&gt;&lt;/EM&gt;# 102100 is necessary to render using sdf.spatial.plot() method&lt;/P&gt;&lt;P style="border: 0px; font-size: 14px;"&gt;...&lt;/P&gt;&lt;P style="border: 0px; font-size: 14px;"&gt;&amp;nbsp;&lt;EM style="border: 0px; font-weight: inherit; font-size: 14px;"&gt;&lt;STRONG style="border: 0px; font-weight: bold; font-size: 14px;"&gt;sdf[~sdf['SHAPE'].apply(lambda r: numpy.isnan(r['x']) or numpy.isnan(r['y']))]&amp;nbsp;&lt;/STRONG&gt;&lt;/EM&gt;&amp;nbsp;&amp;nbsp;# drop NaNs which cause plot to silently fail&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 01 Apr 2020 18:25:03 GMT</pubDate>
    <dc:creator>artzaifman</dc:creator>
    <dc:date>2020-04-01T18:25:03Z</dc:date>
    <item>
      <title>sdf.spatial.plot on SEDF that was NOT created with import_data</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/sdf-spatial-plot-on-sedf-that-was-not-created-with/m-p/789150#M1538</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have the following simple Spatially Enabled Data Frame (SEDF): &amp;nbsp;&lt;IMG class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/486970_pastedImage_1.png" /&gt;&lt;/P&gt;&lt;P&gt;Should &lt;STRONG&gt;&lt;EM&gt;sdf.spatial.plot(map_widget=m)&lt;/EM&gt;&lt;/STRONG&gt; work for this object because it's not working for me.&lt;/P&gt;&lt;P&gt;An exact duplicate SEDF was created with &lt;STRONG&gt;&lt;EM&gt;GIS().content.import_data().query().sdf&amp;nbsp;&lt;/EM&gt;&lt;/STRONG&gt;and plot DOES work for this one.&lt;/P&gt;&lt;P&gt;Main question is: Is calling plot() on an SEDF that was NOT created with import_data valid?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 31 Mar 2020 21:26:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/sdf-spatial-plot-on-sedf-that-was-not-created-with/m-p/789150#M1538</guid>
      <dc:creator>artzaifman</dc:creator>
      <dc:date>2020-03-31T21:26:19Z</dc:date>
    </item>
    <item>
      <title>Re: sdf.spatial.plot on SEDF that was NOT created with import_data</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/sdf-spatial-plot-on-sedf-that-was-not-created-with/m-p/789151#M1539</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="border: 0px; font-size: 14px;"&gt;Found reason: &amp;nbsp;&lt;/P&gt;&lt;P style="border: 0px; font-size: 14px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="border: 0px; font-size: 14px;"&gt;SEDF which works =&amp;nbsp;&lt;/P&gt;&lt;PRE style="color: #000000; background-color: transparent; border: 0px; font-size: 14px; padding: 1px 0px;"&gt;{'x': -13657899.64491753,&amp;nbsp; 'y': 5749953.6899396395,&amp;nbsp; 'spatialReference': {'wkid': 102100, 'latestWkid': 3857}}&lt;/PRE&gt;&lt;P style="border: 0px; font-size: 14px;"&gt;SEDF which doesn't =&amp;nbsp;&lt;/P&gt;&lt;PRE style="color: #000000; background-color: transparent; border: 0px; font-size: 14px; padding: 1px 0px;"&gt;{'x': -13657899.64491753,&amp;nbsp; 'y': 5749953.689939638,&amp;nbsp; 'spatialReference': {'wkid': 4326}}&lt;/PRE&gt;&lt;P style="border: 0px; font-size: 14px;"&gt;Also discovered that sdf.spatial.plot() will fail to render (without generation an error) if it encounters NaN values.&lt;/P&gt;&lt;P style="border: 0px; font-size: 14px;"&gt;Here's snippet to remove NaNs from SEDF:&lt;/P&gt;&lt;P style="border: 0px; font-size: 14px;"&gt;&lt;EM style="border: 0px; font-weight: inherit; font-size: 14px;"&gt;&lt;STRONG style="border: 0px; font-weight: bold; font-size: 14px;"&gt;sdf = GeoAccessor.from_xy(df, 'x', 'y', sr=102100) &lt;/STRONG&gt;&lt;/EM&gt;# 102100 is necessary to render using sdf.spatial.plot() method&lt;/P&gt;&lt;P style="border: 0px; font-size: 14px;"&gt;...&lt;/P&gt;&lt;P style="border: 0px; font-size: 14px;"&gt;&amp;nbsp;&lt;EM style="border: 0px; font-weight: inherit; font-size: 14px;"&gt;&lt;STRONG style="border: 0px; font-weight: bold; font-size: 14px;"&gt;sdf[~sdf['SHAPE'].apply(lambda r: numpy.isnan(r['x']) or numpy.isnan(r['y']))]&amp;nbsp;&lt;/STRONG&gt;&lt;/EM&gt;&amp;nbsp;&amp;nbsp;# drop NaNs which cause plot to silently fail&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Apr 2020 18:25:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/sdf-spatial-plot-on-sedf-that-was-not-created-with/m-p/789151#M1539</guid>
      <dc:creator>artzaifman</dc:creator>
      <dc:date>2020-04-01T18:25:03Z</dc:date>
    </item>
  </channel>
</rss>

