I would like to style vector data based on an attribute (radius). The actual unit is in nautical miles. I don't want to use size-scale field or buffer to style the point rather I would like to make sure that the actual circle created would be drawn to scale based on its attribute.
LONGITUDE,LATITUDE,WIND,PRESSURE,CATEGORY,DATE,RADIUS(m)
145.9,6.5,55,985,4,11/5/2013 0:00,101860
144.6,6.5,60,980,4,11/5/2013 6:00,111120
142.9,6.9,65,975,5,11/5/2013 12:00,120380
141.3,7.1,75,965,5,11/5/2013 18:00,138900
139.7,7.3,85,950,5,11/6/2013 0:00,157420
138,7.6,95,930,5,11/6/2013 6:00,175940
136.2,7.9,105,920,5,11/6/2013 12:00,194460
134.4,8.2,115,905,5,11/6/2013 18:00,212980
132.8,8.7,115,905,5,11/7/2013 0:00,212980
131.1,9.3,115,905,5,11/7/2013 6:00,212980
129.1,10.2,125,895,5,11/7/2013 12:00,231500
126.9,10.6,125,895,5,11/7/2013 18:00,231500
124.8,11,110,910,5,11/8/2013 0:00,203720
122.5,11.4,90,940,5,11/8/2013 6:00,166680
120.5,11.9,90,940,5,11/8/2013 12:00,166680
118,12.2,90,940,5,11/8/2013 18:00,166680
116.6,12.3,90,940,5,11/9/2013 0:00,166680
114.8,13.5,90,940,5,11/9/2013 6:00,166680
113.1,14.4,85,945,5,11/9/2013 12:00,157420
111.4,15.4,80,950,5,11/9/2013 18:00,148160
110.3,16.5,75,955,5,11/10/2013 0:00,138900
109,17.9,70,960,5,11/10/2013 6:00,129640
108,19.4,65,965,5,11/10/2013 12:00,120380
107.5,20.4,60,975,4,11/10/2013 18:00,111120
107.1,21.5,40,990,3,11/11/2013 0:00,74080
Answer
You can use either size-scale field or the data-defined properties. In any case, you will want to change the symbol units from mm to map units. If the map (project CRS) units are not nautical miles, you will of course have to convert the values first.
Based on your sample data:
- Load the OpenLayers layer --> The project CRS will be set to Pseudo Mercator.
- Load your point data
- In data-defined properties, specify
"RADIUS(m)" * 2
as the size (diameter) - Make sure units are set to map units (not mm)
Since you are quite close to the equator and high precision does not seem to be an issue, you should be able to get away with using Pseudo Mercator. Otherwise things get more complicated because you cannot use OpenLayers layers directly since they only support Pseudo Mercator.
No comments:
Post a Comment