ArcGIS Onlineに、ポイントフィーチャが混在するテーブルがあります。一部のフィーチャにはジオメトリが割り当てられていて地図上に表示されますが、ポイントが割り当てられていないものもあります。特定の行を選択し、その行に関連付けるポイントを手動で配置できるようにしたいです。
行を選択して、編集パネルの「ジオメトリの置換」ツールを使えば、ArcGIS Proではできそうです。この編集をAGOL上で直接行う方法はありますか?
ご提案をよろしくお願いします。
Hi Ryan Howell,
I think this enhancement - ENH-000117521: The ability to create point geometry for an existing feature that has null coordinates or spatial values using the Edit widget in Web AppBuilder for ArcGIS Online would be worth contacting Esri Support to attach your customer number.
How were the features with Null geometry created?
While this isn't possible in the Graphic User Interface (GUI), I tested this a little bit in-house and think you might be able to do this with the ArcGIS API for Python (This guide goes into setting up the Python environment if you are new to the API). This enables editing in X,Y values directly into the geometry of the feature. It is posted here if you want to test it out to see if works for your data. It is just a slight modification of the public code sample here: Editing Features | ArcGIS for Developers. Alternatively if you can attach a sample FGDB to this thread I would be happy to give it a quick test on my end.
<SPAN class="comment token">#Connect to the GIS</SPAN> <SPAN class="keyword token">from</SPAN> arcgis<SPAN class="punctuation token">.</SPAN>gis <SPAN class="keyword token">import</SPAN> GIS <SPAN class="keyword token">from</SPAN> IPython<SPAN class="punctuation token">.</SPAN>display <SPAN class="keyword token">import</SPAN> display gis <SPAN class="operator token">=</SPAN> GIS<SPAN class="punctuation token">(</SPAN><SPAN class="string token">"https://arcgis.com"</SPAN><SPAN class="punctuation token">,</SPAN> <SPAN class="string token">"YourUsername"</SPAN><SPAN class="punctuation token">)</SPAN> <SPAN class="comment token">#Search for the Feature Layer</SPAN> search_result <SPAN class="operator token">=</SPAN> gis<SPAN class="punctuation token">.</SPAN>content<SPAN class="punctuation token">.</SPAN>search<SPAN class="punctuation token">(</SPAN><SPAN class="string token">'title:YourItemTitle'</SPAN><SPAN class="punctuation token">)</SPAN> search_result<SPAN class="punctuation token">[</SPAN><SPAN class="number token">0</SPAN><SPAN class="punctuation token">]</SPAN> <SPAN class="comment token">#Create a FeatureSet</SPAN> ChangeGeo_item <SPAN class="operator token">=</SPAN> search_result<SPAN class="punctuation token">[</SPAN><SPAN class="number token">0</SPAN><SPAN class="punctuation token">]</SPAN> ChangeGeo_layers <SPAN class="operator token">=</SPAN> ChangeGeo_item<SPAN class="punctuation token">.</SPAN>layers ChangeGeo_layers ChangeGeo_fset <SPAN class="operator token">=</SPAN> ChangeGeo_layers<SPAN class="punctuation token">[</SPAN><SPAN class="number token">0</SPAN><SPAN class="punctuation token">]</SPAN><SPAN class="punctuation token">.</SPAN>query<SPAN class="punctuation token">(</SPAN><SPAN class="punctuation token">)</SPAN> <SPAN class="comment token">#Query an Object ID, select the feature, then view the geometry.</SPAN> ChangeGeo_features <SPAN class="operator token">=</SPAN> ChangeGeo_fset<SPAN class="punctuation token">.</SPAN>features ChangeGeo_Two <SPAN class="operator token">=</SPAN> <SPAN class="punctuation token">[</SPAN>f <SPAN class="keyword token">for</SPAN> f <SPAN class="keyword token">in</SPAN> ChangeGeo_features <SPAN class="keyword token">if</SPAN> f<SPAN class="punctuation token">.</SPAN>attributes<SPAN class="punctuation token">[</SPAN><SPAN class="string token">'OBJECTID'</SPAN><SPAN class="punctuation token">]</SPAN><SPAN class="operator token">==</SPAN><SPAN class="number token">3</SPAN><SPAN class="punctuation token">]</SPAN><SPAN class="punctuation token">[</SPAN><SPAN class="number token">0</SPAN><SPAN class="punctuation token">]</SPAN> GeoView <SPAN class="operator token">=</SPAN> ChangeGeo_Two<SPAN class="punctuation token">.</SPAN>geometry <SPAN class="keyword token">print</SPAN><SPAN class="punctuation token">(</SPAN>GeoView<SPAN class="punctuation token">)</SPAN> <SPAN class="comment token">#Set a Feature Layer and define a geometry edit in Web Mercator (places the point near Redlands), then update the Feature Layer</SPAN> Geo_FeatureLayer <SPAN class="operator token">=</SPAN> ChangeGeo_layers<SPAN class="punctuation token">[</SPAN><SPAN class="number token">0</SPAN><SPAN class="punctuation token">]</SPAN> ChangeGeo_edit <SPAN class="operator token">=</SPAN> ChangeGeo_Two ChangeGeo_edit<SPAN class="punctuation token">.</SPAN>geometry<SPAN class="punctuation token">[</SPAN><SPAN class="string token">'x'</SPAN><SPAN class="punctuation token">]</SPAN> <SPAN class="operator token">=</SPAN> <SPAN class="operator token">-</SPAN><SPAN class="number token">13081721</SPAN> ChangeGeo_edit<SPAN class="punctuation token">.</SPAN>geometry<SPAN class="punctuation token">[</SPAN><SPAN class="string token">'y'</SPAN><SPAN class="punctuation token">]</SPAN> <SPAN class="operator token">=</SPAN> <SPAN class="number token">4018906</SPAN> update_result <SPAN class="operator token">=</SPAN> Geo_FeatureLayer<SPAN class="punctuation token">.</SPAN>edit_features<SPAN class="punctuation token">(</SPAN>updates<SPAN class="operator token">=</SPAN><SPAN class="punctuation token">[</SPAN>ChangeGeo_edit<SPAN class="punctuation token">]</SPAN><SPAN class="punctuation token">)</SPAN> <SPAN class="keyword token">print</SPAN><SPAN class="punctuation token">(</SPAN>update_result<SPAN class="punctuation token">)</SPAN> <SPAN class="comment token">#View the feature's updated geometry</SPAN> <SPAN class="keyword token">print</SPAN><SPAN class="punctuation token">(</SPAN>GeoView<SPAN class="punctuation token">)</SPAN><SPAN class="line-numbers-rows"><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN></SPAN>
Hope this helps,
-Peter
ログインすると、投稿したり、更新をフォローしたりできます。初めてですか?無料アカウントを登録しましょう。
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.