Hi,

Please add couple of rows from your CSV file. Maybe the lon and lat fields
are otherwise OK but GDAL does not recognize them to contain numbers but
perhaps text. You can also check what sort of attributes ogrinfo reports
with

ogrinfo file1.csv -al -so

-Jukka Rahkonen-



Al Piszcz wrote
> 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.
> 
>>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 not
> 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>
> _______________________________________________
> gdal-dev mailing list

> gdal-dev@.osgeo

> https://lists.osgeo.org/mailman/listinfo/gdal-dev





--
Sent from: http://osgeo-org.1560.x6.nabble.com/GDAL-Dev-f3742093.html
_______________________________________________
gdal-dev mailing list
gdal-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/gdal-dev

Reply via email to