Hi All,

I'm wondering if anybody could give me a little guidance on formatting a query using RPyGeo. I'm excited to be able to run Python geoprocessing functions straight from R but am having trouble with the quote, double quote kinds of issues.

Here's an example of what I'd like to run

rpygeo.geoprocessor("makefeaturelayer('X:\\abc.shp',
'walk')", "SelectLayerByAttribute('walk','NEW_SELECTION', ' "hrwk05" '<>0")",env=myenv)

Where the sticking point is hrwk05 <> 0. In Python my query would be double quote, field name, close double quote, comparison, number e.g, "hrwk05" <> 0 but I'm not sure how to put this into RPyGeo

If I run like so:

rpygeo.geoprocessor("makefeaturelayer('X:\\abc.shp',
'walk')", "SelectLayerByAttribute('walk','NEW_SELECTION', '')",env=myenv)

it runs.

Thank you in advance for assistance.

Zev

--
Zev Ross
ZevRoss Spatial Analysis
120 N Aurora, Suite 3A
Ithaca, NY 14850
607-277-0004 (phone)
866-877-3690 (fax, toll-free)
z...@zevross.com

_______________________________________________
R-sig-Geo mailing list
R-sig-Geo@stat.math.ethz.ch
https://stat.ethz.ch/mailman/listinfo/r-sig-geo

Reply via email to