Extensión Map Sheets mejorada para gvSIG 2.0

Se acaba de publicar el complemento Map Sheets para gvSIG 2.0 (ver anuncio oficial aquí). Este complemento permite crear automáticamente series de mapas que cubran un cierto área de interés, permitiendo la variación de los valores de los campos para cada hoja. Además, se trata de una versión mejorada del complemento, ya que permite la rotación durante el ajuste de la zona de cada hoja, de modo que en ese mapa en concreto (que se generará automáticamente con el resto) el Norte no será necesariamente el margen superior de la hoja, aunque el mapa en sí seguirá teniendo forma rectangular:

El marco de cada hoja puede rotarse arrastrando y manteniendo pulsada la tecla SHIFT (mayúsculas). Pinche para ver imagen completa.
El marco de cada hoja puede rotarse arrastrando y manteniendo pulsada la tecla SHIFT (mayúsculas).
Descripción de algunos elementos del mapa final. Pinche para ver imagen completa.
Descripción de algunos elementos del mapa final.

En el siguiente vídeo puede verse una demostración completa del uso de este complemento repasando sus funcionalidades principales:

Versión corta (59 segundos) Versión completa (5 minutos)
Posted in development, gvSIG Desktop, spanish | Tagged , , , | 12 Comments

gvSIG 2.0: Symbols Library “Numbers”

In more than a time we find ourselves with a need of a library with numerical symbols to identify specific elements in our layouts created with gvSIG.

To solve it we generated  a new symbols library, which we call “numbers” and that contains, basically, numerical symbols.

0_numbers2To create the markers symbols we started from different sources on public domain.

  • The symbols of  “Letters & Numbers” published by Little Web Things      that contains beyond symbols from number 0 to 99, letters symbols in      upper-case of Latin alphabet.
  • The fonts of text from Data Deja View (DDV) called “Circle, Diamond, Hexagon, Pentagon, Shield and Square”, that with Inkscape we transformed to svg files imported with gvSIG.
  • The numbers icons belonging to the set called Red Orb Alphabet Icons of Icon Archive.

Combining this markers we completed the library with symbols of lines and filling.

Of course, when using point symbols of set “IwtMapIcons” consider that by default it don’t have applied a offset in “y”, if wanted the vignette appears over geometric point we have to edit the symbol properties and add an offset in “y” of a half the size ( in our case, as we set these symbols in size 32, we’ll use a offset of 16).

Commenting too  that one of the improvements planned to new versions consist in the symbols appears to us sorted alphabetically, what with no doubt will facilitate identifying them and, in cases like this library, will turn the time to search one of them smaller.

The installation way is the usual, from add-ons manager (selecting URL http://downloads.gvsig.org/download/gvsig-desktop/ and searching for “Types/Symbols”) or directly downloading the package here.

0_numbers1

Posted in english, gvSIG Desktop | Leave a comment

Names of icons, menus and actions on gvSIG 2.0 (II): Applying it on gvSIG

Some days ago we started a little series of articles related to the names of the icons, menus and actions with the article: Names of icons, menus and actions on gvSIG 2.0 (I). We’re going to continue telling some other things that can be interesting for the developers.

When we create a plugin for gvSIG, it’s usually that we want to add some option to the menus, or some button to the button bar of the application. To do this we have to indicate it in the config.xml file, the same that we did it in the previous versions of gvSIG. Nevertheless a new concept has been introduced in the 2.x version. This is the action.

An action, as its name indicates, identify an action that the user can make on gvSIG, without being joined to a menu or a button of the toolbar. The actions can be run or linked from any part of gvSIG, we only have to know its name. The action has a series of associated data:

  • A name that identifies it in an only way in all the actions registered in the application.
  • A label, that can be used to present this, for example in a button or in a contextual menu.
  • A tip, with a short description about the tasks made by the action, to present it in buttons or menus.
  • An icon that represents it, to be used for example in buttons.
  • A keyboard accelerator associated to the action for the case that it’s needed to.
  • An absolute position regarding to the other actions.
  • A code associated to this, to calculate when the action must be visible or enable or what is the code associated to the action running.

Having this centralized information associated to an action allows us to have them in a homogeneous way, and it’s not important where they do it from. They always can have the same label, or the same icon, or the same accelerator, or the same position regarding to other actions.

At this way, if we want to present the same action in a menu and a button at the buttons bar we only will have to associate the action to the menu or the bar, and add the rest of the options that they need and that aren’t defined at the action.

The class that represents the action can’t be overwritten by code. It’s a class offered by andami as an own service, and the developer can use it but not overload it… then… How is the associated code provided for an action?

To contribute with the code associated to an action it’s used the extensions mechanism that gvSIG included in the previous versions. An action has:

  • A plugin that contains it.
  • A Iextension that provides its logic.
  • An action-command, to identify the action of the extension.

How to configure the actions and menus

To configure the actions, menus and tool buttons in gvSIG, the config.xml file is used. This file has the general configuration of our plugin: its extensions, the actions, menus, toolbars and buttons.

We are going to suppose that we have an extension that allows us to import images from a folder, like gvSIG point symbols, and we want to add to the Tools menu, Symbology submenu, an entrance Import point symbols. The first step would be to define our action. We are going to see how to do it. Our action would have the following attributes:

  • name, that will have the name of the action. In our case we will call it “tools-symbology-import-point-symbols“.
  • label, that will have a label that represents the action. This label will be translated to the language that gvSIG is being run, and must be registered at the translations database of the application. In our case we will add “_import_point_symbols“.
  • tooltip, with a short description to be used as a tip where it’s needed, we will select “_import_images_from_folder_as_point_symbols“. This string will also be translated before being used.
  • icon, here we will write the name of the icon to be used from the icons theme that is loaded in gvSIG. Our extension will usually register an icon by default in the icons theme with the name that we indicate here. We will write “tools-symbology-import-point-symbols
  • position, we will indicate the absolute position respecting the other actions. We will write “900400200“.
  • accelerator, where we would indicate what keyboard accelerator we want to associate to this action. The format to specify the keyboard accelerator would be:

       modifier + key

without spaces, where modifier would be able to be one or several of the following ones, separated by the “+” character:

      • CTRL
      • SHIFT
      • META
      • ALT

And the keys would be:

      • Letters from A to Z
      • Numbers from 0 to 9
      • Strings from F1 to F12
      • The DELETE string.

For our example we won’t indicate any accelerating key, and for that we only would leave the value as “” or simply not specifying the attribute.

  • action-command, that will be the value sent to our extension when the execute method is invoked. In our case we will write the same that we selected for our action, “tools-symbology-import-point-symbols

All these aspects would be finally:

<action 
   name="tools-symbology-import-point-symbols" 
   label="_import_point_symbols"
   tooltip="_import_images_from_folder_as_point_symbols" 
   action-command="tools-symbology-import-point-symbols"
   icon="tools-symbology-import-point-symbols" 
   position="900400200" 
   accelerator="" 
/>

Once our action is defined, we would be able to use it to be associated to menus or buttons. In our case we had thought to associate it to a menu. To do this, we would have to select the same the menu the same as the action, and then we only would have to fill in the “text“ attribute. It would be something like this:

<menu
     name="tools-symbology-import-point-symbols" 
     text="tools/Symbology/Import_point_symbols"
/>

If we also want to add It to the buttons we would be able to create a toolbar and add the button to it. To add the button to the toolbar we would be able to do it at this way:

<tool-bar name="symbology" position="10">
  <action-tool name="tools-symbology-import-point-symbols" />
</tool-bar>

With that we would create the toolbar “symbology” if it doesn’t exist, and a button with the data of our action would be added. For that we only have to name the button the same as the action that we had defined.
The three labels that we have seen must be in the label that defines our extension, “extensión“. We are going to see how our “config.xml“ would be able to be written:

<?xml version="1.0" encoding="ISO-8859-1"?>
<plugin-config>
  <libraries library-dir="lib" />
  <depends plugin-name="org.gvsig.app" />
  <resourceBundle name="text" />
  <extensions>
    <extension
      class-name="org.gvsig.symbology.app.importsymbols.ImportSymbolsExtension"
      description="Import images from a folder as point symbols" 
      active="true">

      <action 
         name="tools-symbology-import-point-symbols" 
         label="_import_point_symbols"
         tooltip="_import_images_from_folder_as_point_symbols" 
         action-command="tools-symbology-import-point-symbols"
         icon="tools-symbology-import-point-symbols" 
         position="900400200" 
         accelerator="" 
      />
      <menu
           name="tools-symbology-import-point-symbols" 
           text="tools/Symbology/Import_point_symbols"
            />
    </extension>
  </extensions>
</plugin-config>
Posted in opinion | 1 Comment

gvSIG 2.0: Biblioteca de símbolos “Numbers”

En más de una ocasión nos encontramos con la necesidad de una biblioteca con símbolos numéricos para identificar determinados elementos en nuestros mapas realizados con gvSIG.

Para resolverla hemos generado una nueva biblioteca de símbolos, a la que en un alarde de originalidad hemos llamado “Numbers” y que contiene, básicamente, símbolos numéricos. 0_numbers2

Para realizar los símbolos de marcadores hemos partido de distintas fuentes de dominio público.

  • Los símbolos de “Letters & Numbers” publicados por Little Web Things que contiene además de símbolos de los números del 0 al 99, símbolos letras en mayúsculas del alfabeto latino.
  • Las fuentes de texto de Data Deja View (DDV) denominadas “Circle, Diamond, Hexagon, Pentagon, Shield y Square”, que mediante Inkscape hemos transformado a ficheros svg importados con gvSIG.
  • Los iconos de números pertenecientes al conjunto denominado Red Orb Alphabet Icons de Icon Archive.

Combinando estos marcadores hemos completado la biblioteca con símbolos de líneas y de relleno.

Por cierto, cuando uséis los símbolos puntuales del subconjunto “lwtMapIcons” tened en cuenta que por defecto no tienen aplicado un offset en “y”, por lo que si queréis que la viñeta aparezca encima del punto geométrico debemos editar las propiedades del símbolo y añadir un offset en “y” de la mitad del tamaño del símbolo (en nuestro caso, como a estos símbolos les hemos dado por defecto el tamaño de 32, utilizaremos un offset de 16).

También comentar que una de las mejoras planificadas para próximas versiones consiste en que los símbolos nos aparezcan ordenados alfabéticamente, lo que sin duda facilitará la identificación de los mismos y que, en casos como el de esta biblioteca, agilizarán la búsqueda de uno de ellos.

La forma de instalación es la habitual, a través del administrador de complementos (seleccionando la URL http://downloads.gvsig.org/download/gvsig-desktop/ y buscando por “Tipos/symbols”) o directamente descargándoos el paquete desde aquí. 0_numbers1

Posted in gvSIG Desktop, spanish | Tagged , | Leave a comment

gvSIG 2.0: some tricks with folders

wizard_penguin In the last posts dedicated to the news of gvSIG 2.0 we have seen how we can create new symbols libraries or thematic maps. In both cases gvSIG stores information in folders.

Let’s see some tricks to the most restless users (and careful).

Deleting a symbols library

Symbols are stored by default in user folder /gvSIG/plugins/org.gvsig.app/Symbols.

Searching this folder we’ll see a subfolder for each symbols library installed in gvSIG. By default it only shows “gvSIG basic” that’s the symbols library that comes with basic installation of gvSIG 2. If you have installed other libraries as Google, OSM, OCHA, … you’ll find a subfolder for each one.

If you want to delete one of them and it is not shown in your gvSIG, it is so easy as delete the subfolder.

This could be very useful when creating our own symbols libraries and we want to test if we can delete it easily.

Joining two symbols libraries

Imagine you want to join two symbols libraries in one or, for example, add a part of the symbols of a library in other. Well, is so easy as copy the content of one in the other. When opening again gvSIG, it will read the new organization of folders/symbols and will show it in the symbology manager.

Deleting a thematic map

In gvSIG 2.0 thematic maps are stored by default inside user folder gvSIG/plugins/org.gvsig.educa.thematicmap.app.viewer/thematicMaps.

Here we find a list of all thematic maps we have been creating and  are available in gvSIG. We’ll find a subfolder for each thematic map created. This subfolder will content two files, a .info and a .gvsthm. To delete a thematic map just delete the corresponding subfolder.

Posted in english, gvSIG Desktop, opinion | 6 Comments

gvSIG 2.0: algunos trucos con carpetas

wizard_penguinDurante los últimos post dedicados a las novedades de gvSIG 2.0 hemos visto como podemos crear nuevas bibliotecas de símbolos o mapas temáticos. En ambos casos gvSIG almacena la información en carpetas.

Vamos a indicar algún pequeño truco para los usuarios más inquietos (y cuidadosos).

Borrar una biblioteca de símbolos.

Los símbolos se guardan por defecto dentro de la carpeta del usuario en /gvSIG/plugins/org.gvsig.app/Symbols.

Si consultamos que contiene esta carpeta veremos que hay una subcarpeta por cada biblioteca de símbolos que tengamos instalada en nuestro gvSIG. Por defecto sólo aparecerá “gvSIG basic” que es la biblioteca de símbolos que viene por defecto en la instalación básica de gvSIG 2. Si habéis instalado otras bibliotecas como la de Google, OSM, OCHA,… encontraréis una subcarpeta por cada una de ellas.

Si queréis borrar una de ellas y que no os aparezca en vuestro gvSIG, es tan fácil como eliminar dicha subcarpeta.

Esto puede ser bastante útil cuando estamos creando nuestras propias bibliotecas de símbolos y queremos realizar pruebas que podamos borrar con facilidad.

Combinar dos bibliotecas de símbolos

Imagina que quieres unificar dos bibliotecas de símbolos en una o, por ejemplo, añadir parte de los símbolos de una biblioteca a otra biblioteca. Bien, es tan simple como copiar el contenido de una dentro de la otra. Al abrir de nuevo nuestro gvSIG, leerá la nueva organización de carpetas/símbolos y la mostrará en el gestor de simbología.

Borrar un mapa temático

En gvSIG 2 los mapas temáticos se almacenan por defecto dentro de la carpeta del uuario en gvSIG/plugins/org.gvsig.educa.thematicmap.app.viewer/thematicMaps.

Aquí encontraremos un listado de todos los mapas temáticos que hemos ido creando y que tenemos disponibles desde gvSIG. Encontraremos una subcarpeta por cada mapa temático creado. Esta subcarpeta contendrá dos ficheros, un .info y .gvsthm. Para eliminar un mapa temático basta con borrar la subcarpeta correspondiente

Posted in gvSIG Desktop, spanish | Tagged , | 1 Comment

gvSIG 2.0: Creating symbols libraries (IV)

With this post we are finishing the series initiated to show the new possibilities that gvSIG 2.0 has to create our own symbols libraries. We hope it has been useful, as seen following simple steps and getting help in other free applications like Inkscape or Gimp, is very simple massively incorporate symbols of every type to gvSIG and, besides, share with other users.

Up to now we have seen how to generate a symbols library starting both on image files (svg, png…) like on a source. Now we are presenting a new case: we have a PDF with symbols we’d like to incorporate in gvSIG: can we do it?

We’ll show a way to do it in a practical example. For this we will use as origin of our symbols the public PDF of FGDC (Federal Geographic Data Committee) named “Digital Cartographic Standard for Geologic Map Symbolization”. Let’s imagine that what’s interesting for us is the fossils symbols recompiled in page 109.

Fos_01First step is open the PDF in Inkscape. It will ask what page we want to open and we’ll indicate 109. Once opened, each symbol is an individual element, that we can select, copy and paste in other file we’ll save in SVG. Easy, isn’t it?

Repeating it to each symbol we have our set of images listed to import to gvSIG.

Fossils_gvSIGThese symbols will serve as basis to a new library of symbols we’re preparing and we’ll share with other users soon.

Posted in english, gvSIG Desktop | Leave a comment

gvSIG 2.0: Crear Bibliotecas de Símbolos (IV)

Finalizamos con este post la serie iniciada para mostrar las nuevas posibilidades que presenta gvSIG 2.0 para crear nuestras propias bibliotecas de símbolos. Esperamos que hayan sido de utilidad, ya habréis visto como siguiendo unos sencillos pasos y ayudándose de otros programas libres como Inkscape o GIMP es muy sencillo incorporar masivamente símbolos de todo tipo a gvSIG y, además, compartirlos con el resto de usuarios.

Hasta ahora habíamos visto como generar una biblioteca de símbolos partiendo tanto de ficheros de imagen (svg, png,…) como de una fuente. Ahora vamos a plantear un nuevo caso: tenemos un PDF con símbolos que queremos incorporar en gvSIG. ¿Podemos hacerlo?

Vamos a mostrar un método para hacerlo mediante un ejemplo práctico. Para ello vamos a usar como origen de nuestros símbolos el PDF público del FGDC (Federal Geographic Data Commitee) denominado “Digital Cartographic Standard for Geologic Map Symbolization”. Vamos a imaginar que nos interesan los símbolos de fósiles recopilados en la página 109.Fos_01

El primer paso será abrir el PDF con Inkscape. Nos preguntará que página queremos abrir y le indicaremos la 109. Una vez abierta, cada símbolo es un elemento individual, que podemos seleccionar, copiar y pegar en otro documento que guardaremos como SVG. ¿Fácil, verdad?

Repitiendo esto para cada símbolo tendremos nuestro conjunto de imágenes listas para importar en gvSIG.Fossils_gvSIG

Estos símbolos nos servirán de base para una nueva biblioteca de símbolos que estamos preparando y que compartiremos con el resto de usuarios en breve.

Posted in gvSIG Desktop, spanish | Tagged , | 1 Comment

gvSIG 2.0: Symbols Library “OCHA-Humanitarian”

In a previous post we commented the gradual increase in use of gvSIG in sphere of civil protection and emergency management. In the moment of publication of symbols library “Emergency”, we received information from two diferent sites about existence of a set of symbols that would be interesting to include in gvSIG.

It is the set of symbols created by the Office for the Coordination of Humanitarian Affairs (OCHA) with humanitarian goals aiming help workers and volunteers show and interpret information about emergencies and crisis quickly and easily.

When a disaster is on, it’s essential that all diferent humanitarian organisms and workers can get accurate information about needs of people affected and locations and resources available to help them. This set of symbols is, in a way, the standard of symbology of emergencies.

As said came to us information in two different ways, one of them an organism of civil protection which told us that had to pay to include these symbols in a corporative GIS which name I don’t want to say and, by the way, we talked how it would be important and useful these symbols were in gvSIG. As said.

We generated the library, including the symbols with white window and color window, generating several subfolders, first by usual colors (white, blue, green and purple) and second by thematics. In final, we improved what this organism had to pay to have this set of icons available in a private GIS, and seems that (also in this cases) money is over everything.

OCHA_01

Hundred of symbols that thanks to these new tools gvSIG 2.0 brings, we included in a few minutes in our gvSIG.

We completed the library, as usual, with many line and polygonal symbols that can be useful to show seriousness of an specific phenomenon add inspirated in different maps created by humanitarian organisms.

OCHA2

This package is available in add-ons manager (selecting URL http://downloads.gvsig.org/download/gvsig-desktop/ and searching for “Types/symbols”) or directly downloading the package here.

We hope that this new library be useful and, surely, it don’t need to be used many times.

Posted in english, gvSIG Desktop | Leave a comment

Names of icons, menus and actions on gvSIG 2.0 (I)

One of the goals we set in the development phase of the 2.0 version of gvSIG was to improve usability. This is a field in which there is always room for improvement and that involves making changes on many fronts. One of those fronts are the issues regarding menus and icons where two objectives were set: to relocate the menu entries and icons, and provide to gvSIG the ability to exchange its set of icons. Currently we have achieved the first of these goals and we are very close to getting the second one.

We started with this post, a series dedicated to describe the work done in this field.

The key to exchange sets of icons is the standardizing of their names. While there are some naming rules for generic application icons, we found no specific for GIS icons. In this situation we decided to do the following:

  1. Choose a standard naming rule.
  2. Define names for the needed GIS icons based on the criteria used in the chosen standard.
  3. Attempt to register new names in the standard.

After analyzing several alternatives we decided to start working with freedesktop.org as a reference, as it is a standard used among other free software projects, by KDE and GNOME.

Since we had to rename all the icons of gvSIG, one of the first tasks to be done was to identify all the icons used by the application at that time. With the help of Mario Fèvre (TReCC), active project partner and member of the working group of usability, we did an initial list of icons, distinguishing those belonging to the toolbar (which were, in fact, our goal) from other icons. After detecting that this list had some icons that were not actually used (from older versions) it was decided that the final list was necessary made by a gvSIG developer.

Once a reliable list of the icons used in gvSIG 2.0 got ready, the next step was to establish a criteria for naming them. At this point we realized that before standardize the names of the icons we had to standardize the names of the actions to which they refer. In most cases the name of the icon and the action are the same, but in some other cases the same icon can be associated to different actions (for example, the “copy” icon does not the same if we are in a gvSIG view that if we are on a map, the actions are different but the icon is the same).

On the other hand, based on recommendations from freedesktop.org, we deduced that the names of the icons are closely related to the arrangement of the menu entries as these are organized by levels of specificity. Thus, the name of an icon – better said its action – would correspond to the concatenation of the different levels of a given input menu. Just taking a look at the names already registered in freedesktop.org, it is easy to see that the names of the icons match, in most cases, with the concatenation of the menu entries.

We finally decided that the next task to perform would be to define all menu entries and only then, define the actions and the names of the icons. In order to finish the standardization work, it would also be advisable to define each tooltip of the application (tooltips are descriptive labels that appear when the mouse pointer is held over an icon).

The position of the menu entries, therefore, was another key work. To set the new position of them, we rely on a complete analysis for the reorganization of menus that was done time ago by the project ‘s usability group. This group includes both gvSIG team members and external partners. This analysis is also based on standards and style guides widely used.

Thanks to this work, gvSIG 2.0 has its menu entries and icons placed in a more logical and natural (and therefore more intuitive) place, as well as standard icon names. We hope that, in future versions of gvSIG, the icons could also be exchanged.

But all this work would be useless if we do not ensure that future developments follow the naming rule set. To achieve that goal we have also defined a procedure that will be the issue of upcoming posts to this blog.

Posted in development, english, gvSIG Desktop | 1 Comment