2

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
2
  • Could you explain why you are against using size-scale field? It is there exactly for this use case.
    – underdark
    Commented Aug 22, 2014 at 9:11
  • @underdark, if i'll use size-scale field, will the resulting size be accurate to the actual value of the attribute? Say for example, if the value is 60 nautical miles, will it be drawn to scale? thanks...
    – euler
    Commented Aug 22, 2014 at 9:38

1 Answer 1

3

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:

  1. Load the OpenLayers layer --> The project CRS will be set to Pseudo Mercator.
  2. Load your point data
  3. In data-defined properties, specify "RADIUS(m)" * 2 as the size (diameter)
  4. 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.

enter image description here

6
  • I did try using size-scale field and data-defined properties, changed to map unit instead of millimeter and then set the preferred measurement units to use nautical miles but my data is not displaying after I changed from mm to map units. Also, I'm using EPSG:4326 as my project CRS. Is there anything I need to configure or change? Can I use the "Measure line" to check if the resulting distance is accurate? Thanks in advance @underdark
    – euler
    Commented Aug 22, 2014 at 10:18
  • Changing the measurement units does not affect the map units and therefore also won't help to display the symbols in correct size. You should switch to a CRS with metric units and convert the nautical miles to meters. Yes, you can use the measure line tool to check the results.
    – underdark
    Commented Aug 22, 2014 at 10:40
  • Sorry if I misunderstood your instruction. I added a new column to my table with radius in meters, save as new shp using EPSG:21781. I then create a new project (set the project crs to EPSG:21781) that was set to use meters as canvas units, set the symbol units of this layer from mm to map units and then use size-scale/data-defined properties using the attribute radius in meters. The resulting symbols are very big. Is there anything that I missed? Should I change the default value of simple marker size after I changed it to map unit (e.g. 0.001)?
    – euler
    Commented Aug 23, 2014 at 3:04
  • Can you share a sample data: the project and a subset of the points to test? Easier to check the project than to continue guessing. The marker size should be 1.
    – underdark
    Commented Aug 23, 2014 at 21:24
  • please see csv format of my sample data, I've converted the radius from nm to meters. Is this enough for testing? Also, I'd like to use maps from openlayers plugin as my basemap, but AFAIK, not all of them are using CRS with meters as units, any pointers on what to use/do as well? But first I'd like to make my styling work. Thank you very much in advance...
    – euler
    Commented Aug 25, 2014 at 8:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.