I'm trying to clip a csv-file containing xyz-data (points) by an irregular shaped polygon in ogr2ogr. My code runs without any errors or warnings, but it returns an exact copy of the input-csv. What am I doing wrong?
My code is:
ogr2ogr -f CSV output.csv -clipsrc clip_polygon.shp -clipsrclayer clip_polygon input.vrt
The vrt-file looks like:
<OGRVRTDataSource>
<OGRVRTLayer name="test_layer">
<SrcDataSource>input.csv</SrcDataSource>
<GeometryType>wkbPoint</GeometryType>
<LayerSRS>EPSG:25831</LayerSRS>
<GeometryField encoding="PointFromColumns" x="field_1" y="field_2" z="field_3"/>
</OGRVRTLayer>
</OGRVRTDataSource>
dst_datasource_name src_datasource_name
always together behind the options. And I think to remember that csv, vrt and<OGRVRTLAYER name >
should be the same. – AndreJ Apr 2 '15 at 9:28-clipsrc
. I can then convert that output back to CSV. Seems like bug. – Charlie Lefrak Oct 16 '17 at 18:47