<?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: Access geostatistical layer created using ArcPy in ArcGIS GeoStatistical Analyst Questions</title>
    <link>https://community.esri.com/t5/arcgis-geostatistical-analyst-questions/access-geostatistical-layer-created-using-arcpy/m-p/1544641#M1831</link>
    <description>&lt;P&gt;Thanks Dan.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I understand how the layers are stored when created from within GIS Pro and added to a map (i.e., created via the geoprocessing window, python window, embedded notebook, model builder etc.).&lt;/P&gt;&lt;P&gt;I'm looking to confirm that in my case (Jupyter notebook in VS Code) once the kernel has been reset the GA layer is no longer accessible?&amp;nbsp;&lt;/P&gt;&lt;P&gt;I ran a number of kriging trials and cross validation but did not export the GA layers to voxel in the same process thinking I could come back and do it later however I'm now unable to find/use the GA layer.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 02 Oct 2024 09:47:21 GMT</pubDate>
    <dc:creator>GarethNash</dc:creator>
    <dc:date>2024-10-02T09:47:21Z</dc:date>
    <item>
      <title>Access geostatistical layer created using ArcPy</title>
      <link>https://community.esri.com/t5/arcgis-geostatistical-analyst-questions/access-geostatistical-layer-created-using-arcpy/m-p/1544632#M1829</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have used ArcPy to carry out EBK 3D successfully - code provided below.&lt;/P&gt;&lt;P&gt;During this process a geostatistical layer is created; when run from the GIS Pro UI this layer is loaded to the current map and is accessible for future use.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm finding that I'm unable to find the geostatistical layer created during EBK3D using ArcPy and once the kernel has restarted (using a Jupyter notebook) the GA layer is no longer available for use in further processing (e.g., export to NetCDF voxel).&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is this the expected behaviour? I'm planning to run EBK3D on a number of input layers and write them to the same NetCDF voxel model. If the GA layers created using ArcPy are 'lost' once the kernel restarts then I will have to do it all in one go which isnt an issue but would be helpful to know.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;trial_fcs = [output_gdb+"\\GEN_selected_features", 
             output_gdb+"\\NTV_selected_features", 
             output_gdb+"\\STV_selected_features"]

ebk3d_results = {}  # Create a dictionary to store ebk3d results

for trial in trial_fcs:

    filename = os.path.basename(trial)
    last_part = filename.split('.')[0]  # Remove extension if present

    # Use a unique identifier based on the last_part
    unique_identifier = f"ebk3d_{last_part}"

    print(f"Starting Empirical Bayesian Kriging 3D (EBK3D) on {last_part}...")
    ebk3d_results[unique_identifier] = arcpy.ga.EmpiricalBayesianKriging3D(
                                                in_features=trial,
                                                elevation_field="depth",
                                                value_field="value",
                                                out_ga_layer=f"C:\\Users\\&amp;lt;x.y&amp;gt;\\Documents\\ArcGIS\\Projects\\RVO\\kriging_test\\EBK3D_{last_part}.lyr",
                                                elevation_units="METER",
                                                measurement_error_field=None,
                                                semivariogram_model_type="EXPONENTIAL",
                                                transformation_type="LOGEMPIRICAL",
                                                subset_size=100,
                                                overlap_factor=1,
                                                number_simulations=100,
                                                trend_removal="NONE",
                                                elev_inflation_factor=None,
                                                search_neighborhood="NBRTYPE=Standard3D RADIUS=nan NBR_MAX=2 NBR_MIN=1 SECTOR_TYPE=TWELVE_SECTORS",
                                                output_elevation=None,
                                                output_type="PREDICTION",
                                                quantile_value=0.5,
                                                threshold_type="EXCEED",
                                                probability_threshold=None
                                                )
    print(f"EBK3D process completed successfully for {last_part}...")&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 02 Oct 2024 08:35:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-geostatistical-analyst-questions/access-geostatistical-layer-created-using-arcpy/m-p/1544632#M1829</guid>
      <dc:creator>GarethNash</dc:creator>
      <dc:date>2024-10-02T08:35:45Z</dc:date>
    </item>
    <item>
      <title>Re: Access geostatistical layer created using ArcPy</title>
      <link>https://community.esri.com/t5/arcgis-geostatistical-analyst-questions/access-geostatistical-layer-created-using-arcpy/m-p/1544638#M1830</link>
      <description>&lt;P&gt;The output is&amp;nbsp; layer and not a file of a particular type and its storage is different&lt;/P&gt;&lt;P&gt;&lt;A href="https://pro.arcgis.com/en/pro-app/latest/help/analysis/geostatistical-analyst/what-is-a-geostatistical-layer-.htm" target="_blank"&gt;What is a geostatistical layer?—ArcGIS Pro | Documentation&lt;/A&gt;&lt;/P&gt;&lt;P&gt;This link&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://pro.arcgis.com/en/pro-app/latest/help/analysis/geostatistical-analyst/geostatistical-layers-in-3d.htm" target="_blank" rel="noopener"&gt;Geostatistical layers in 3D—ArcGIS Pro | Documentation&lt;/A&gt;&lt;/P&gt;&lt;P&gt;indicates that layers can be converted to your noted format amongst others for further analysis&lt;/P&gt;</description>
      <pubDate>Wed, 02 Oct 2024 09:04:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-geostatistical-analyst-questions/access-geostatistical-layer-created-using-arcpy/m-p/1544638#M1830</guid>
      <dc:creator>DanPatterson</dc:creator>
      <dc:date>2024-10-02T09:04:42Z</dc:date>
    </item>
    <item>
      <title>Re: Access geostatistical layer created using ArcPy</title>
      <link>https://community.esri.com/t5/arcgis-geostatistical-analyst-questions/access-geostatistical-layer-created-using-arcpy/m-p/1544641#M1831</link>
      <description>&lt;P&gt;Thanks Dan.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I understand how the layers are stored when created from within GIS Pro and added to a map (i.e., created via the geoprocessing window, python window, embedded notebook, model builder etc.).&lt;/P&gt;&lt;P&gt;I'm looking to confirm that in my case (Jupyter notebook in VS Code) once the kernel has been reset the GA layer is no longer accessible?&amp;nbsp;&lt;/P&gt;&lt;P&gt;I ran a number of kriging trials and cross validation but did not export the GA layers to voxel in the same process thinking I could come back and do it later however I'm now unable to find/use the GA layer.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 02 Oct 2024 09:47:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-geostatistical-analyst-questions/access-geostatistical-layer-created-using-arcpy/m-p/1544641#M1831</guid>
      <dc:creator>GarethNash</dc:creator>
      <dc:date>2024-10-02T09:47:21Z</dc:date>
    </item>
    <item>
      <title>Re: Access geostatistical layer created using ArcPy</title>
      <link>https://community.esri.com/t5/arcgis-geostatistical-analyst-questions/access-geostatistical-layer-created-using-arcpy/m-p/1544650#M1832</link>
      <description>&lt;P&gt;The only other reference in arcpy is&lt;/P&gt;&lt;P&gt;&lt;A href="https://pro.arcgis.com/en/pro-app/latest/arcpy/classes/geostatisticaldatasets-class-.htm" target="_blank"&gt;GeostatisticalDatasets—ArcGIS Pro | Documentation&lt;/A&gt;&lt;/P&gt;&lt;P&gt;which takes the original source for the geostatistical layer as input&lt;/P&gt;</description>
      <pubDate>Wed, 02 Oct 2024 09:35:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-geostatistical-analyst-questions/access-geostatistical-layer-created-using-arcpy/m-p/1544650#M1832</guid>
      <dc:creator>DanPatterson</dc:creator>
      <dc:date>2024-10-02T09:35:22Z</dc:date>
    </item>
    <item>
      <title>Re: Access geostatistical layer created using ArcPy</title>
      <link>https://community.esri.com/t5/arcgis-geostatistical-analyst-questions/access-geostatistical-layer-created-using-arcpy/m-p/1544736#M1833</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/672074"&gt;@GarethNash&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;Geostatistical layers are in-memory layers and not stored on disk, so they will be gone if you restart the kernel.&amp;nbsp; However, they can be saved as layer files with the &lt;A href="https://pro.arcgis.com/en/pro-app/latest/tool-reference/data-management/save-to-layer-file.htm" target="_self"&gt;Save To Layer File&lt;/A&gt; geoprocessing tool, so they can be exported later.&lt;/P&gt;
&lt;P&gt;-Eric&lt;/P&gt;</description>
      <pubDate>Wed, 02 Oct 2024 13:45:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-geostatistical-analyst-questions/access-geostatistical-layer-created-using-arcpy/m-p/1544736#M1833</guid>
      <dc:creator>EricKrause</dc:creator>
      <dc:date>2024-10-02T13:45:42Z</dc:date>
    </item>
    <item>
      <title>Re: Access geostatistical layer created using ArcPy</title>
      <link>https://community.esri.com/t5/arcgis-geostatistical-analyst-questions/access-geostatistical-layer-created-using-arcpy/m-p/1544749#M1834</link>
      <description>&lt;P&gt;Thanks Eric - thats what I thought but didnt know about the Save to Layer File tool so will build that into my process.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 02 Oct 2024 14:02:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-geostatistical-analyst-questions/access-geostatistical-layer-created-using-arcpy/m-p/1544749#M1834</guid>
      <dc:creator>GarethNash</dc:creator>
      <dc:date>2024-10-02T14:02:36Z</dc:date>
    </item>
  </channel>
</rss>

