Estilos vectoriales básicos

Para crear un mapa, uno tiene que aplicar estilos a los datos del SIG y presentarla en una forma que sea visualmente informativo. Hay un gran número de opciones disponibles en QGIS para aplicar diferentes tipos de simbología a los datos . En este tutorial, vamos a explorar algunos conceptos básicos de estilo.

Descripción de la tarea

Vamos a diseñar una capa vectorial para mostrar la esperanza de vida en los diferentes países del mundo.

Otras habilidades que aprenderá

  • Ver la tabla de atributos de una capa vectorial.

Obtener los datos

The data we will use is from Center for Sustainability and the Global Environment (SAGE) at the University of Wisconsin-Madison.

You can download the Life Expectancy GIS Grid data from the human impact dataset.

For convenience, you may directly download a copy of the dataset from the link below:

lifeexpectancy.zip

Fuente de Datos [SAGE]

Procedmiento

  1. Abra QGIS y vaya a Capas ‣ Añadir capa vector...

../_images/112.png
  1. Browse to the downloaded lifeexpectancy.zip file and click Open. Select newsweek_data.shp and click Open. Next you will be prompted for choosing the CRS. Select WGS84 EPSG:4326 as the Coordinate Reference System (CRS).
../_images/210.png
  1. El shapefile contenido dentro del archivo zip se carga y puede verse el estilo predeterminado que se le aplico.

../_images/35.png
  1. Haga clic con el botón derecho sobre el nombre de la capa y seleccione Abrir tabla de atributos.

../_images/42.png
  1. Explore the different attributes. To style a layer, we must pick an attribute or a column that would represent the map we are trying to create. Since we want to create a layer represting life expectancy, i.e. the average age till a person lives in a country, the field LIFEXPCT is the attribute we want to use in styling.
../_images/52.png
  1. Cierre la tabla de atributos. Haga clic derecho sobre la capa nuevamente y seleccione Propiedades.

../_images/62.png
  1. The various styling options are located in the Style tab of the Properties dialog. Clicking on the drop-down button inthe Style dialiog, you will see there are five options available - Single Symbol, Categorized, Graduated, Rule Based and Point displacement. We will explore the first three in this tutorial.
../_images/72.png
  1. Select Single Symbol. This option allows you to choose a single style that will be applied to all the features in the layer. Since this is a polygon dataset, you have two basic choices. You can fill the polygon, or you can style with only outline. You can choose the dotted pattern fill and click OK.
../_images/82.png
  1. Usted verá un nuevo estilo aplicado a la capa con el patrón de relleno que usted eligió.

../_images/92.png
  1. You will see that this Single Symbol style isn’t useful in communicating the life expectancy data we are trying to map. Let us explore another styling option. Right-click the layer again and choose Properties. This time choose Categorized from the Style tab. Categorized means the features in the layer will be shown in different shades of a color based on unique values in an attribute field. Choose LIFEXPCT value as the Column. Choose a color ramp of your choice and click Classify at the bottom. Click OK.
../_images/102.png
  1. Usted verá los diferentes países que aparecen en tonos de azul. Los tonos más claros significan menor esperanza de vida y los tonos más oscuros una mayor esperanza de vida. Esta representación de los datos es más útil y claramente muestran cómo la esperanza de vida en los países desarrollados frente a los países en desarrollo. Este sería el tipo de estilo que nos propusimos crear.

../_images/113.png
  1. Let us explore the Graduated symbology type in the Style dialog now. Graduated symbology type allows you to break down the data in a column in unique classes and choose a different style for each of the classes. We can think of classifying our life expectancy data into 3 classes, LOW, MEDIUM and HIGH. Choose LIFEXPCT as the Column and choose 3 as the classes. You will see there are many Mode optionsa vailable. Let us see the logic behind each of these modes. There are 5 modes available. Equal Interval, Quantile, Natural Breaks (Jenks), Standard Deviation and Pretty Breaks. These modes use different statistical algorithms to break down the data into separate classes.

    • Intervalo Igual: Como su nombre lo sugiere este método crea clases con el mismo tamaño. Si nuestros datos varía de 0-100 y queremos 10 clases, este método sería crear una clase de 0-10, 10-20, 20-30 y así sucesivamente, manteniendo cada clase el mismo tamaño de 10 unidades

    • Cuantil - Este método definirá las clases de tal manera que el número de valores en cada una son los mismos. Si tiene 100 valores y queremos 4 clases, el método cuantil definirá las clases de tal manera que cada clase tendrá 25 valores.

    • Natural Breaks (Jenks) - This algorithm tries to find natural groupings of data to create classes. The resulting classes will be such that there will be maximum variance between individual classes and least variance within each class.
    • Standard Deviation - This method will calculate the mean of the data, and create classes based on standard deviation from the mean.
    • Pretty Breaks - This is based on the statistical package R’s pretty algorithm. It is a bit complex, but the pretty in the name means it creates class boundaries that are round numbers.

    To keep things simple, let’s use the Quantile method. Click Classify at the bottom and you will see 3 classes show up with their corresponding values. Click OK.

Nota

For an attribute to be used in Graduated style, it must be a numeric field. Integer and Real values are fine, but if the attribute field type is String, it cannot be used with this styling option.

../_images/122.png
  1. You will see a map showing countries in either of 3 colors representing average life expectancy in the country.
../_images/132.png
  1. Now go back to the Style dialog by right clicking the layer and choosing Properties. There are some more styling options available. You can click on the Symbol for each of the classes and choose a different style. We will choose Red, Yellow and Green fill colors to indicate low, medium and high life expectancy.
../_images/142.png
  1. In the Symbol Selector dialog, click on Color selector.
../_images/152.png
  1. Click on a color fom the Select Color dialog.
../_images/162.png
  1. Back in the Layer Properties dialog, you can double-click on the Label column next to each value and enter the text that you want to display. Similarly, you may double-click on the Value column to edit the selected ranges. Click OK once you are satisfied with the classes.
../_images/171.png
  1. This style definitely conveys a lot more useful map than the previous two attempts. There are clearly marked class names and colors to represent our interpretation of the life expectancy values.
../_images/182.png
comments powered by Disqus

This work is licensed under a Creative Commons Attribution 4.0 International License