[gdal-dev] OGR equivalent to ARCpy MakeFeatureLayer

Chaitanya kumar CH chaitanya.ch at gmail.com
Tue May 24 20:46:05 EDT 2011


You can do all the stuff using OGR's SQL engine. OGR also supports memory
Refer to GDAL's RFC 28 [1], and the test scripts [2] & [3]

[1]: http://trac.osgeo.org/gdal/wiki/rfc28_sqlfunc
[2]: http://trac.osgeo.org/gdal/browser/trunk/autotest/ogr/ogr_sql_rfc28.py
[3]: http://trac.osgeo.org/gdal/browser/trunk/autotest/ogr/ogr_sql_test.py

On Wed, May 25, 2011 at 12:13 AM, Jay L. <jzl5325 at psu.edu> wrote:

> I have a script, written to use ESRI's ArcPy, which I am attempting to
> re-write using the ogr/gdal python bindings.  One of the parameters that I
> can pass to ESRI's MakeFeatureLayer function is an SQL Query.  This creates
> a featurelayer (in memory) which contains only those rows which meet the
> criteria.  For this script I am iterating through each feature, placing it
> into it's own feature layer, intersecting with another in memory feature
> layer, and finally writing out the newly created geometry(s).
> feature.GetFID() returns the unique ID as expected.  Can I use OGR SQL to
> format this query?  How about creating an in memory feature layer with only
> the selected feature?
> Thanks,
> Jay
> _______________________________________________
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/gdal-dev

Best regards,
Chaitanya kumar CH.
/tʃaɪθənjə/ /kʊmɑr/
17.2416N 80.1426E
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/gdal-dev/attachments/20110525/e38ba6d2/attachment.html

More information about the gdal-dev mailing list