Al Piszcz
2021-05-31 20:30:33 UTC
I am having a challenge determining the right position or entry for the
Field entry, the spatial filter error below indicates my VRT format is not
correct. Is there a better approach? Thank you.
declared as numeric fields, so the spatial filter cannot be turned into an
attribute filter on them*
The VRT is defined as
<OGRVRTDataSource>
<OGRVRTLayer name="file1">
<SrcDataSource>lib/_data/sdg/data\file1.csv</SrcDataSource>
<SrcLayer>file1</SrcLayer>
<Field name="lon" type="real" />
<Field name="lat" type="real" />
<SrcRegion clip="true">POLYGON ((0.0 0.0, 0.0 0.1, 0.1 0.1, 0.1 0.0, 0.0
0.0))</SrcRegion>
<GeometryType>wkbPoint</GeometryType>
<LayerSRS>WGS84</LayerSRS>
<GeometryField encoding="PointFromColumns" x="lon" y="lat"/>
</OGRVRTLayer>
<OGRVRTLayer name="file2">
<SrcDataSource>lib/_data/sdg/data\file2.csv</SrcDataSource>
<SrcLayer>file2</SrcLayer>
<Field name="lon" type="real" />
<Field name="lat" type="real" />
<SrcRegion clip="true">POLYGON ((0.0 0.0, 0.0 0.1, 0.1 0.1, 0.1 0.0, 0.0
0.0))</SrcRegion>
<GeometryType>wkbPoint</GeometryType>
<LayerSRS>WGS84</LayerSRS>
<GeometryField encoding="PointFromColumns" x="lon" y="lat"/>
</OGRVRTLayer>
</OGRVRTDataSource>
Field entry, the spatial filter error below indicates my VRT format is not
correct. Is there a better approach? Thank you.
ogrmerge.py -overwrite_ds -single -o __sdg\merge_02.csv __sdg\merge_01.vrt
*Warning 1: The 'lon' and/or 'lat' fields of the source layer are notdeclared as numeric fields, so the spatial filter cannot be turned into an
attribute filter on them*
The VRT is defined as
<OGRVRTDataSource>
<OGRVRTLayer name="file1">
<SrcDataSource>lib/_data/sdg/data\file1.csv</SrcDataSource>
<SrcLayer>file1</SrcLayer>
<Field name="lon" type="real" />
<Field name="lat" type="real" />
<SrcRegion clip="true">POLYGON ((0.0 0.0, 0.0 0.1, 0.1 0.1, 0.1 0.0, 0.0
0.0))</SrcRegion>
<GeometryType>wkbPoint</GeometryType>
<LayerSRS>WGS84</LayerSRS>
<GeometryField encoding="PointFromColumns" x="lon" y="lat"/>
</OGRVRTLayer>
<OGRVRTLayer name="file2">
<SrcDataSource>lib/_data/sdg/data\file2.csv</SrcDataSource>
<SrcLayer>file2</SrcLayer>
<Field name="lon" type="real" />
<Field name="lat" type="real" />
<SrcRegion clip="true">POLYGON ((0.0 0.0, 0.0 0.1, 0.1 0.1, 0.1 0.0, 0.0
0.0))</SrcRegion>
<GeometryType>wkbPoint</GeometryType>
<LayerSRS>WGS84</LayerSRS>
<GeometryField encoding="PointFromColumns" x="lon" y="lat"/>
</OGRVRTLayer>
</OGRVRTDataSource>