<?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 How to extract the features(Line, Point) from the result that is outputted in Arcgis Local Server - Line of Sight Geoprocessing Tool in .NET Maps SDK Questions</title>
    <link>https://community.esri.com/t5/net-maps-sdk-questions/how-to-extract-the-features-line-point-from-the/m-p/1354526#M12350</link>
    <description>&lt;P&gt;&lt;BR /&gt;Hello Dear Residents,&lt;/P&gt;&lt;P&gt;I'm using Arcgis Runtime .NET in my WPF Application to create the Arcgis Local Server and to use the Line of Sight Geoprocessing Tool Service. Eventhough the local server succesfully runs and outputs the result. , I couldn't extract the features like "the obstruction point" or "line" from it.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;"&lt;BR /&gt;string gpServiceResultUrl = _localGeoprocessingService.Url.ToString();&lt;BR /&gt;gpServiceResultUrl = gpServiceResultUrl.Replace("GPServer", jobSegment);&lt;BR /&gt;_gpServiceResultUrl = gpServiceResultUrl;&lt;/P&gt;&lt;P&gt;// Create a map image layer to show the results&lt;BR /&gt;ArcGISMapImageLayer myMapImageLayer = new ArcGISMapImageLayer(new Uri(gpServiceResultUrl));&lt;/P&gt;&lt;P&gt;"&lt;/P&gt;&lt;P&gt;- The object that should have the "&lt;STRONG&gt;Output Obstruction Point Feature Class&lt;/STRONG&gt;" above.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ArcgisProGP.PNG" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/87423i29CAD7039AC1CD7A/image-size/medium?v=v2&amp;amp;px=400" role="button" title="ArcgisProGP.PNG" alt="ArcgisProGP.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;- The result outputted by Line of Sight GP in Arcgis Pro and that's what I want in my WPF app too.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Arcgis.PNG" style="width: 449px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/87421i2A9C078898F5B194/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Arcgis.PNG" alt="Arcgis.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;- It's demonstrated result of the Line of Sight Geoprocessing tool of Arcgis Local Server on a map in a WPF App.&lt;/P&gt;&lt;P&gt;1 -&amp;nbsp; The result is an object of "ArcGISMapImageLayer" as you know. Could you please explain me how to Extract the feature class in Arcgis Runtime .NET?&lt;/P&gt;&lt;P&gt;For example; I should learn the obstruction point's coordinate.&amp;nbsp;&lt;/P&gt;&lt;P&gt;2 - If I use the same Geoprocessing Tool in Arcgis Pro. The result would have VisCode which shows the "Visible" line with green color and "Not Visible" line with red color. As you see in the image above, there is just one color that is not specify any meaning in the lines. How to provide the geoprocessing tool in arcgis local server to create the result with VisCode?&lt;/P&gt;&lt;P&gt;Thank you for helping.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 29 Nov 2023 11:07:42 GMT</pubDate>
    <dc:creator>KadirTuna</dc:creator>
    <dc:date>2023-11-29T11:07:42Z</dc:date>
    <item>
      <title>How to extract the features(Line, Point) from the result that is outputted in Arcgis Local Server - Line of Sight Geoprocessing Tool</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/how-to-extract-the-features-line-point-from-the/m-p/1354526#M12350</link>
      <description>&lt;P&gt;&lt;BR /&gt;Hello Dear Residents,&lt;/P&gt;&lt;P&gt;I'm using Arcgis Runtime .NET in my WPF Application to create the Arcgis Local Server and to use the Line of Sight Geoprocessing Tool Service. Eventhough the local server succesfully runs and outputs the result. , I couldn't extract the features like "the obstruction point" or "line" from it.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;"&lt;BR /&gt;string gpServiceResultUrl = _localGeoprocessingService.Url.ToString();&lt;BR /&gt;gpServiceResultUrl = gpServiceResultUrl.Replace("GPServer", jobSegment);&lt;BR /&gt;_gpServiceResultUrl = gpServiceResultUrl;&lt;/P&gt;&lt;P&gt;// Create a map image layer to show the results&lt;BR /&gt;ArcGISMapImageLayer myMapImageLayer = new ArcGISMapImageLayer(new Uri(gpServiceResultUrl));&lt;/P&gt;&lt;P&gt;"&lt;/P&gt;&lt;P&gt;- The object that should have the "&lt;STRONG&gt;Output Obstruction Point Feature Class&lt;/STRONG&gt;" above.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ArcgisProGP.PNG" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/87423i29CAD7039AC1CD7A/image-size/medium?v=v2&amp;amp;px=400" role="button" title="ArcgisProGP.PNG" alt="ArcgisProGP.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;- The result outputted by Line of Sight GP in Arcgis Pro and that's what I want in my WPF app too.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Arcgis.PNG" style="width: 449px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/87421i2A9C078898F5B194/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Arcgis.PNG" alt="Arcgis.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;- It's demonstrated result of the Line of Sight Geoprocessing tool of Arcgis Local Server on a map in a WPF App.&lt;/P&gt;&lt;P&gt;1 -&amp;nbsp; The result is an object of "ArcGISMapImageLayer" as you know. Could you please explain me how to Extract the feature class in Arcgis Runtime .NET?&lt;/P&gt;&lt;P&gt;For example; I should learn the obstruction point's coordinate.&amp;nbsp;&lt;/P&gt;&lt;P&gt;2 - If I use the same Geoprocessing Tool in Arcgis Pro. The result would have VisCode which shows the "Visible" line with green color and "Not Visible" line with red color. As you see in the image above, there is just one color that is not specify any meaning in the lines. How to provide the geoprocessing tool in arcgis local server to create the result with VisCode?&lt;/P&gt;&lt;P&gt;Thank you for helping.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 29 Nov 2023 11:07:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/how-to-extract-the-features-line-point-from-the/m-p/1354526#M12350</guid>
      <dc:creator>KadirTuna</dc:creator>
      <dc:date>2023-11-29T11:07:42Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract the features(Line, Point) from the result that is outputted in Arcgis Local Server - Line of Sight Geoprocessing Tool</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/how-to-extract-the-features-line-point-from-the/m-p/1354988#M12352</link>
      <description>&lt;P&gt;Hi,&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/739109"&gt;@KadirTuna&lt;/a&gt;&amp;nbsp;i have used &lt;SPAN&gt;a geoprocessing package executed with Local Server, here are some of my suggestions.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;You can directly get the results:&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;IFeatures? features = null;
GeoprocessingResult results = await _gpJob.GetResultAsync();
var result1 = results.Outputs.Values.FirstOrDefault() as GeoprocessingFeatures;
if(result1.CanGetOutputFeatures)
	features = await result1.GetOutputFeatures;
else
	features = result1.Features;&lt;/LI-CODE&gt;&lt;P&gt;Another way to&amp;nbsp; get and&amp;nbsp;display the results is&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt; // Convert geoprocessor server url to that of a map server and get the job id.
                Uri serviceUrl = _localGPService.Url;
                string mapServerUrl = serviceUrl.ToString().Replace("GPServer", "MapServer/jobs/" + _gpJob.ServerJobId);

                // Create a service geodatabase from the map server url.
                var serviceGeodatabase = new ServiceGeodatabase(new Uri(mapServerUrl));

                // Load the service geodatabase.
                await serviceGeodatabase.LoadAsync();

                // Get the feature table from the service geodatabase.
                FeatureTable featureTable = serviceGeodatabase.GetTable(0);

                // Instantiate the elevation profile feature layer from the feature table.
                _elevationProfileFeatureLayer = new FeatureLayer(featureTable);

                // Load the elevation profile feature layer.
                await _elevationProfileFeatureLayer.LoadAsync();

                // Set the surface placement and renderer for the elevation profile feature layer.
                _elevationProfileFeatureLayer.SceneProperties.SurfacePlacement = SurfacePlacement.Absolute;
                _elevationProfileFeatureLayer.Renderer = new SimpleRenderer(new SimpleLineSymbol(SimpleLineSymbolStyle.Solid, System.Drawing.Color.White, 3));&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You can refer to the code sample&amp;nbsp;&lt;A title="Generate elevation profile with Local Server" href="https://developers.arcgis.com/net/wpf/sample-code/generate-elevation-profile-with-local-server/" target="_self"&gt;Generate elevation profile with Local Server&lt;/A&gt;&amp;nbsp;!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 01 Dec 2023 00:11:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/how-to-extract-the-features-line-point-from-the/m-p/1354988#M12352</guid>
      <dc:creator>AlexanderZhang</dc:creator>
      <dc:date>2023-12-01T00:11:16Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract the features(Line, Point) from the result that is outputted in Arcgis Local Server - Line of Sight Geoprocessing Tool</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/how-to-extract-the-features-line-point-from-the/m-p/1371752#M12458</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/739109"&gt;@KadirTuna&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sorry for being off topic a bit. I'm also trying to do Line Of Sight queries, but I'm having issues with defining the input the correct way. I created the .gpkx from this tool:&amp;nbsp;&lt;A href="https://pro.arcgis.com/en/pro-app/3.1/tool-reference/3d-analyst/line-of-sight.htm" target="_blank"&gt;Line Of Sight (3D Analyst)—ArcGIS Pro | Documentation&lt;/A&gt;&lt;/P&gt;&lt;DIV&gt;I create this input this way:&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="cpp"&gt;FeatureCollectionTable* inputFeatures =
	new FeatureCollectionTable(QList&amp;lt;Field&amp;gt;(), GeometryType::Polyline, SpatialReference::webMercator(), this);
Feature* lineFeature = inputFeatures-&amp;gt;createFeature(this);

auto observerPoint = static_cast&amp;lt;Point&amp;gt;(m_observerGraphic-&amp;gt;geometry());
auto targetPoint = static_cast&amp;lt;Point&amp;gt;(m_targetGraphic-&amp;gt;geometry());
auto polylineBuilder = new PolylineBuilder(SpatialReference::webMercator(), this);
polylineBuilder-&amp;gt;addPoint(observerPoint);
polylineBuilder-&amp;gt;addPoint(targetPoint);
auto polyLine = polylineBuilder-&amp;gt;toPolyline();
lineFeature-&amp;gt;setGeometry(polyLine);

inputFeatures-&amp;gt;addFeatureAsync(lineFeature).then(this, [this, inputFeatures]() {
	onAddFeatureCompleted_(inputFeatures);
});&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;Then in onAddFeatureCompleted_:&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="cpp"&gt;GeoprocessingParameters geoprocessParams = GeoprocessingParameters(GeoprocessingExecutionType::AsynchronousSubmit);

geoprocessParams.setOutputSpatialReference(SpatialReference::webMercator());

QMap&amp;lt;QString, GeoprocessingParameter*&amp;gt; inputs;
inputs["in_line_feature_class"] =
	new GeoprocessingFeatures(inputFeatures, this);
QString dataPath = QDir::homePath() + "/ArcGIS/Runtime/Data";
inputs["in_surface"] =
	new GeoprocessingRaster(QUrl(dataPath + "/raster/SwissElevation/Elevation.tif"), ".tif", this);
geoprocessParams.setInputs(inputs);

GeoprocessingJob* geoprocessJob = m_gpTask-&amp;gt;createJob(geoprocessParams);
geoprocessJob-&amp;gt;start();&lt;/LI-CODE&gt;&lt;P&gt;However, t&lt;SPAN&gt;he local server reports following error when I run the task:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;Server job has failed. ERROR 000811: The value is not a feature class.
ERROR 000732: Input Line Features: Dataset [...] does not exist or is not supported.&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;SPAN&gt;The input causing the error is named "in_line_feature_class" (see &lt;A href="https://pro.arcgis.com/en/pro-app/3.1/tool-reference/3d-analyst/line-of-sight.htm" target="_blank"&gt;Line Of Sight (3D Analyst)—ArcGIS Pro | Documentation&lt;/A&gt;).&amp;nbsp; It expects a datatype&amp;nbsp;GPFeatureLayer, but I'm not sure how I can create it correctly from the ArcGIS Runtime SDK... Maybe you have a code snippet ready that you could share? Many thanks!&lt;/SPAN&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 18 Jan 2024 17:07:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/how-to-extract-the-features-line-point-from-the/m-p/1371752#M12458</guid>
      <dc:creator>imbachb</dc:creator>
      <dc:date>2024-01-18T17:07:07Z</dc:date>
    </item>
  </channel>
</rss>

