<?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 Modelbuilder, SpatialEcology Tools in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/modelbuilder-spatialecology-tools/m-p/451892#M35398</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hello...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;...I am new in using Python and I think you can help me very quick...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I want to use the snappoints-feature from SpatialEcology (former Hawths tools, SpatialEcology.com) as a tool in the modelbuilder. Therefore I have to use the snappoints-code in a phython-environment and save that script so that I can use it in the modelbuilder. I don't know how to write the script.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The manual says: &lt;/SPAN&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;[INDENT]You must first load the �??os�?? Python library (using: �??import os�??) at the beginning of your Python session. To call GME from the command line you use the following generic syntax:&lt;STRONG&gt; os.system(�?�path\\SEGME.exe commands�?�)&lt;/STRONG&gt;[/INDENT]&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;the total manual can be found &lt;/SPAN&gt;&lt;A href="http://www.spatialecology.com/gme/images/SpatialEcologyGME.pdf"&gt;here&lt;/A&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I know my &lt;/SPAN&gt;&lt;SPAN style="font-style:italic;"&gt;command &lt;/SPAN&gt;&lt;SPAN&gt;which is:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;&lt;STRONG&gt;snappoints(in, snap, out, tol, [where]);&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;in --&amp;gt; the input point data source &lt;BR /&gt;snap--&amp;gt; the input feature source to which points are snapped &lt;BR /&gt;out--&amp;gt; the output point data source &lt;BR /&gt;tol--&amp;gt; the maximum snap distance in coordinate system units &lt;BR /&gt;[where] the selection statement that will be applied to the point feature data source to identify a subset of points to process (see full Help documentation for further details)&lt;BR /&gt;&lt;BR /&gt;Example 1: snappoints(in="C:\data\locs.shp", snap="C:\data\roads.shp", out="C:\data\snappedlocs.shp", tol=5000);&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;But I'd like to use the input/output-variables from the modelbuilder rather than to set the input as fixed paths (like in the example). Maybe one of you can just help me and support me with the script.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;thanks&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;johannes&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 07 Dec 2010 18:34:02 GMT</pubDate>
    <dc:creator>JohannesRadinger</dc:creator>
    <dc:date>2010-12-07T18:34:02Z</dc:date>
    <item>
      <title>Modelbuilder, SpatialEcology Tools</title>
      <link>https://community.esri.com/t5/python-questions/modelbuilder-spatialecology-tools/m-p/451892#M35398</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hello...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;...I am new in using Python and I think you can help me very quick...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I want to use the snappoints-feature from SpatialEcology (former Hawths tools, SpatialEcology.com) as a tool in the modelbuilder. Therefore I have to use the snappoints-code in a phython-environment and save that script so that I can use it in the modelbuilder. I don't know how to write the script.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The manual says: &lt;/SPAN&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;[INDENT]You must first load the �??os�?? Python library (using: �??import os�??) at the beginning of your Python session. To call GME from the command line you use the following generic syntax:&lt;STRONG&gt; os.system(�?�path\\SEGME.exe commands�?�)&lt;/STRONG&gt;[/INDENT]&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;the total manual can be found &lt;/SPAN&gt;&lt;A href="http://www.spatialecology.com/gme/images/SpatialEcologyGME.pdf"&gt;here&lt;/A&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I know my &lt;/SPAN&gt;&lt;SPAN style="font-style:italic;"&gt;command &lt;/SPAN&gt;&lt;SPAN&gt;which is:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;&lt;STRONG&gt;snappoints(in, snap, out, tol, [where]);&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;in --&amp;gt; the input point data source &lt;BR /&gt;snap--&amp;gt; the input feature source to which points are snapped &lt;BR /&gt;out--&amp;gt; the output point data source &lt;BR /&gt;tol--&amp;gt; the maximum snap distance in coordinate system units &lt;BR /&gt;[where] the selection statement that will be applied to the point feature data source to identify a subset of points to process (see full Help documentation for further details)&lt;BR /&gt;&lt;BR /&gt;Example 1: snappoints(in="C:\data\locs.shp", snap="C:\data\roads.shp", out="C:\data\snappedlocs.shp", tol=5000);&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;But I'd like to use the input/output-variables from the modelbuilder rather than to set the input as fixed paths (like in the example). Maybe one of you can just help me and support me with the script.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;thanks&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;johannes&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Dec 2010 18:34:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/modelbuilder-spatialecology-tools/m-p/451892#M35398</guid>
      <dc:creator>JohannesRadinger</dc:creator>
      <dc:date>2010-12-07T18:34:02Z</dc:date>
    </item>
    <item>
      <title>Re: Modelbuilder, SpatialEcology Tools</title>
      <link>https://community.esri.com/t5/python-questions/modelbuilder-spatialecology-tools/m-p/451893#M35399</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;So,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I've tried my first small script to use it as a tool in the model builder.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;At the moment I don't have the possibilty to run it, but do you think that&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;can work? What is missing in the code?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;#Import library modules
import os arcpy

# Read parameter values
# 1 in --&amp;gt; the input point data source 
# 2 snap--&amp;gt; the input feature source to which points are snapped 
# 3 out--&amp;gt; the output point data source 
# 4 tol--&amp;gt; the maximum snap distance in coordinate system units 

 in = arcpy.GetParameterAsText(0)
 snap = arcpy.GetParameterAsText(1)
 out = arcpy.GetParameterAsText(2)
 tol = arcpy.GetParameterValue(3)
 
#Loading GME and running GME-Tool
os.system(�?�path\\SEGME.exe -c snappoints(in, snap, out, tol)�?�)&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;how does it it work with the parameters to be used in the SEGME?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;/j&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 20:10:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/modelbuilder-spatialecology-tools/m-p/451893#M35399</guid>
      <dc:creator>JohannesRadinger</dc:creator>
      <dc:date>2021-12-11T20:10:11Z</dc:date>
    </item>
    <item>
      <title>Re: Modelbuilder, SpatialEcology Tools</title>
      <link>https://community.esri.com/t5/python-questions/modelbuilder-spatialecology-tools/m-p/451894#M35400</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;So,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;with some help of a friend I tried to develop the script,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;What do you think about?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;# ---------------------------------------------------------------------------
# gis_Test1.py

# Description: Snap Point to Feature (Spatial Ecology)
# ---------------------------------------------------------------------------

import os 
import arcpy

#Read Parameters
#1 in --&amp;gt; the input point data source
#2 snap --&amp;gt; the input feature source to which points are snapped
#3 out --&amp;gt; the output point data source
#4 tol --&amp;gt; tbe maximum snap distance in coordinate system units

inpoint = arcpy.GetParametersAsText(0)
snap = arcpy.GetParametersAsText(1)
outpoint = arcpy.GetParametersAsText(2)
tol = arcpy.GetParametersAsValue(3)
&amp;nbsp; 

os.system("C:\\Program Files (x86)\\SpatialEcology\\GME\\SEGME.exe -c snappoints(in=\\\"%s\\\", snap=\\\"%s\\\", out=\\\"%s\\\", tol=%s);" %(inpoint, snap, outpoint, tol)) 
&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The problem is that I get the error:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;'module' object has no attribute&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;what is the problem?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;thank you...&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;j&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 20:10:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/modelbuilder-spatialecology-tools/m-p/451894#M35400</guid>
      <dc:creator>JohannesRadinger</dc:creator>
      <dc:date>2021-12-11T20:10:14Z</dc:date>
    </item>
    <item>
      <title>Re: Modelbuilder, SpatialEcology Tools, Problems with path</title>
      <link>https://community.esri.com/t5/python-questions/modelbuilder-spatialecology-tools/m-p/451895#M35401</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;So I already solved some problems...spelling mistakes &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;but I don't get any output...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I read in the GME-handbook that geodatabases and their path is handled different&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;in GME. A path should look like e.g C:\data\europe!transport!roads, where europe =&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;geodatabase, transport = feature dataset and roads = featureclass and the are separated&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;by !&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;# ---------------------------------------------------------------------------
# gis_Test1.py

# Description: Snap Point to Feature (Spatial Ecology)
# ---------------------------------------------------------------------------

import os 
import arcpy

#Read Parameters
#1 inpoint --&amp;gt; the input point data source
#2 snap --&amp;gt; the input feature source to which points are snapped
#3 outpoint --&amp;gt; the output point data source
#4 tol --&amp;gt; tbe maximum snap distance in coordinate system units


inpoint = arcpy.GetParameterAsText(0)
snap = arcpy.GetParameterAsText(1)
outpoint = arcpy.GetParameterAsText(2)

os.system("C:\\Program Files (x86)\\SpatialEcology\\GME\\SEGME.exe -c snappoints(in=\\\"%s\\\", snap=\\\"%s\\\", out=\\\"%s\\\", tol=500);" %(inpoint, snap, outpoint)) 
&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;can anyone pls help, the problem is the same for all gme tools and a solution would help&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;everybody working with the spatial ecology tools (GME, former Hawths tools)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;thank you very much&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 20:10:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/modelbuilder-spatialecology-tools/m-p/451895#M35401</guid>
      <dc:creator>JohannesRadinger</dc:creator>
      <dc:date>2021-12-11T20:10:16Z</dc:date>
    </item>
    <item>
      <title>Re: Modelbuilder, SpatialEcology Tools</title>
      <link>https://community.esri.com/t5/python-questions/modelbuilder-spatialecology-tools/m-p/451896#M35402</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Were you ever able to resolve this issue? Please post your final code if you were.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Jul 2012 16:22:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/modelbuilder-spatialecology-tools/m-p/451896#M35402</guid>
      <dc:creator>SteveHanser</dc:creator>
      <dc:date>2012-07-19T16:22:05Z</dc:date>
    </item>
  </channel>
</rss>

