jradinger

Modelbuilder, SpatialEcology Tools

Discussion created by jradinger on Dec 7, 2010
Latest reply on Jul 19, 2012 by shanser
Hello...

...I am new in using Python and I think you can help me very quick...

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.

The manual says:
[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: os.system(�?�path\\SEGME.exe commands�?�)[/INDENT]


the total manual can be found here.

I know my command which is:
snappoints(in, snap, out, tol, [where]);

in --> the input point data source
snap--> the input feature source to which points are snapped
out--> the output point data source
tol--> the maximum snap distance in coordinate system units
[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)

Example 1: snappoints(in="C:\data\locs.shp", snap="C:\data\roads.shp", out="C:\data\snappedlocs.shp", tol=5000);


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.

thanks
johannes

Outcomes