Tag Info

New answers tagged


As described in https://www.gaia-gis.it/gaia-sins/spatialite-sql-latest.html the function is used as ST_Line_Interpolate_Point( line Curve , fraction Double precision ) : Point An example that can be tested with SQL command line for example with spatialite-gui. Fraction=0.5 finds the midpoint. SELECT ST_AsText( ST_Line_Interpolate_Point ...


SQL query is wrong, it should be: result = dataSource.ExecuteSQL("select * from roi_classMacro WHERE C_info = 'g19' or C_info = 'g22' or C_info = 'g23'") For attribute filter try: mylayer.SetAttributeFilter("C_info = 'g19' or C_info = 'g22' or C_info = 'g23'")


With the OGR's function UnionCascaded() from osgeo import ogr shp= "yourfile" shapef = ogr.Open(shpor) lyr = shapef.GetLayer() unionc = ogr.Geometry(ogr.wkbMultiPolygon) for feat in xrange(lyr.GetFeatureCount()): fit= lyr.GetFeature(feat) geom= fit.GetGeometryRef() unionc.AddGeometry(geom) union= unionc.UnionCascaded()

Top 50 recent answers are included