I’m getting strange errors when using gdal_grid with clipsrc parameter:

When setting options like this:

-clipsrc "PG:dbname='postgres' host='dev.urbica.co' port='35488' 
user='postgres' password='postgres'" \
-clipsrcsql 'SELECT id, geom AS geometry FROM osm.city_boundary AS o' 

I get 

ERROR 1: Unable to open secondary datasource `osm' required by JOIN.
ERROR 1: Failed to identify source layer from datasource.
ERROR 1: Cannot load source clip geometry.


When trying to use a shapefile or geojson instead of DB table like this:

-clipsrc bnd.shp
OR 
-clipsrc bnd.geojson

I get
ERROR 4: `bnd.shp' not recognized as a supported file format.
ERROR 1: Cannot load source clip geometry.

I've checked my files with ogrinfo and QGIS - they're valid and contain one 
feature with multipolygon geometry:

INFO: Open of `bnd.geojson'
      using driver `GeoJSON' successful.
1: bnd (Multi Polygon)

How do I set clipping for gdal_grid output?

_______________________________________________
gdal-dev mailing list
[email protected]
https://lists.osgeo.org/mailman/listinfo/gdal-dev

Reply via email to