mirror of
https://github.com/mapnik/mapnik.git
synced 2025-12-08 20:13:09 +00:00
test for reading from csv file
This commit is contained in:
parent
caeaf920d7
commit
6df1dd31dd
6
tests/data/csv/points.csv
Normal file
6
tests/data/csv/points.csv
Normal file
@ -0,0 +1,6 @@
|
||||
x,y,label
|
||||
0,0,"0,0"
|
||||
5,5,"5,5"
|
||||
0,5,"0,5"
|
||||
5,0,"5,0"
|
||||
2,2,"2.5,2.5"
|
||||
|
8
tests/data/csv/points.vrt
Normal file
8
tests/data/csv/points.vrt
Normal file
@ -0,0 +1,8 @@
|
||||
<OGRVRTDataSource>
|
||||
<OGRVRTLayer name="points">
|
||||
<SrcDataSource relativeToVRT="1">./points.csv</SrcDataSource>
|
||||
<GeometryType>wkbPoint</GeometryType>
|
||||
<LayerSRS>WGS84</LayerSRS>
|
||||
<GeometryField encoding="PointFromColumns" x="x" y="y"/>
|
||||
</OGRVRTLayer>
|
||||
</OGRVRTDataSource>
|
||||
31
tests/data/good_maps/point_csv.xml
Normal file
31
tests/data/good_maps/point_csv.xml
Normal file
@ -0,0 +1,31 @@
|
||||
<!DOCTYPE Map>
|
||||
<Map background-color="#b5d0d0" srs="+init=epsg:4326" minimum-version="0.7.0">
|
||||
<Style name="1">
|
||||
<Rule title="foo">
|
||||
<Filter>([x]=0)</Filter>
|
||||
<TextSymbolizer name="[label]" size="10" dy="-10" face-name="DejaVu Sans Book" halo-radius="1" allow-overlap="true"/>
|
||||
<PointSymbolizer/>
|
||||
</Rule>
|
||||
<Rule title="foo">
|
||||
<Filter>([y]=0)</Filter>
|
||||
<TextSymbolizer name="[label]" size="10" dy="5" face-name="DejaVu Sans Book" halo-radius="1"/>
|
||||
<PointSymbolizer/>
|
||||
</Rule>
|
||||
<Rule title="foo">
|
||||
<ElseFilter/>
|
||||
<TextSymbolizer name="[label]" size="10" dy="-5" face-name="DejaVu Sans Book" halo-radius="1"/>
|
||||
<PointSymbolizer/>
|
||||
</Rule>
|
||||
|
||||
</Style>
|
||||
|
||||
<Layer name="point" srs="+init=epsg:4326">
|
||||
<StyleName>1</StyleName>
|
||||
<Datasource>
|
||||
<Parameter name="file">../csv/points.vrt</Parameter>
|
||||
<Parameter name="layer_by_index">0</Parameter>
|
||||
<Parameter name="type">ogr</Parameter>
|
||||
</Datasource>
|
||||
</Layer>
|
||||
|
||||
</Map>
|
||||
Loading…
x
Reference in New Issue
Block a user