I'm looking for documentation explaining when to use .geometry instead of
.GetGeometryRef(()
for example:
>>> testPoly1 = square1.geometry()
>>> testPoly2 = square1.GetGeometryRef()
the seem to both return the same polygon object
___
gdal-dev mailing li
e_points.shp', 0)#0--read-only
> layer = ds.GetLayer()
> layerName = layer.GetName() #returns string 'three_points'
> test = ds.ExecuteSQL('select * from "%s"' % layerName)
>
> Cheers,
>
> Homme
>
> On Tue, Feb 05, 2013 at 12
QL:
testLayer = dataSource.ExecuteSQL("select * from fireLayer")
type(testLayer) #retuns NoneType
testLayer = dataSource.ExecuteSQL("select * from fireLayer where FIREID <
75")
type(testLayer) #retuns NoneType
Thanks in advance.
Dave Verbyla
On Sat, Dec 22, 2012 at 7:17 AM, David Verbyla
> I am a newbie to OGR/OSR using Python 2.7.2, please excuse my ignorance:
> I am trying to find the distance to the closest polygon for each point.
> Is there a more efficient way than simply computing the distance to all
> polygons for each point? For example:
>
nPts = pointsLayer.GetFeatureCou
I have a layer of 15 polygons from a shapefile. I can access the features
using Layer.GetFeature(i),
but not using Layer.GetNextFeature().
For example:
>>> polyFeature = pondsLayer.GetFeature(0)
>>> print polyFeature.GetFID()
0
>>> polyFeature = pondsLayer.GetFeature(1)
>>> print polyFeature.GetF
I am a newbie to OGR/OSR using Python 2.7.2, please excuse my ignorance:
I'm having problems creating spatial reference using either .ImportFromEPSG
or .ImportFromESRI(prjfile string).
Yet .SetWellKnownGeogCS works fine.
from osgeo import ogr
import osr,os
testSR = osr.SpatialReference()
testSR.S