<div dir="ltr">Hi all,<br><br>I am attempting to extract a subset of points from a points vector based on the values in the column "dir". I am running GRASS 6.4.4 on Mac OS 10.9.5.<br><br>In the GRASS command line, I can successfully make my selection with the following command:<br>--------------------------------------------------------------<br>GRASS 6.4.4 (Yellowstone):~ > <b>v.extract input=streams_points output=outlets_vect type=point where="dir<0"</b><br><br>92 categories loaded from table <streams_points><br><br>Extracting features...<br><br>Building topology for vector map <outlets_vect>...<br><br>Registering primitives...<br><br>92 primitives registered<br><br>92 vertices registered<br><br>Building areas...<br><br> 100%<br><br>0 areas built<br><br>0 isles built<br><br>Attaching islands...<br><br>Attaching centroids...<br><br> 100%<br><br>Number of nodes: 92<br><br>Number of primitives: 92<br><br>Number of points: 92<br><br>Number of lines: 0<br><br>Number of boundaries: 0<br><br>Number of centroids: 0<br><br>Number of areas: 0<br><br>Number of isles: 0<br><br>Writing attributes...<br><br>v.extract complete.<br><br>-------------------------------------------------------<div>However, due to my incomplete knowledge of how Python and SQL interact, I am having trouble executing the same command in a Python script. Here is what I am trying:</div><div><br></div><div><b>g.run_command("v.extract", input="streams_points", output="outlets_vect", type="point", where="dir<0")</b><br></div><div><br></div><div>When I run this command, it fails to extract any points. I know that this must be due to some problem with the syntax of my SQL statement.</div><div><br></div><div>Can anyone clear this up for me?</div><div><br></div><div>Thanks,</div><div><br></div><div>Charlie</div></div>