Webinar 6 de fevereiro: ‘Utilização do gvSIG na Defesa Civil’

MundoGEO [1], Associação gvSIG [2] e SIG-RB [3] convidam toda a comunidade de geotecnologias a participar de um seminário online em Português sobre a elaboração de um Plano Municipal de Defesa Civil utilizando o gvSIG.

Com inscrições gratuitas, este seminário é indicado para qualquer usuário que utilize informação geográfica, em qualquer setor, que encontrará no gvSIG uma potente ferramenta, sem custo de licença e com total liberdade de uso, estudo, aprimoramento e distribuição.

Os participantes poderão interagir com o apresentador, enviando suas questões através do chat. Após o webinar, serão enviados certificados digitais de participação a todos que estiverem online na sessão.

– Webinar: Utilização do gvSIG na Defesa Civil
– Data: 6 de fevereiro de 2014
– Horário: 13:00 (UTC)
– Hora local: http://www.timeanddate.com/worldclock/fixedtime.html?msg=Utiliza%C3%A7%C3%A3o+do+gvSIG+na+Defesa+Civil&iso=20140206T11&p1=45
–  Linguagem: Português

As inscrições são gratuitas, mas as vagas são limitadas!

Reserve já seu espaço neste seminário online: https://www2.gotomeeting.com/register/139521994

[1] http://mundogeo.com
[2] http://www.gvsig.com
[3] http://www.sigrb.com.br

Posted in events, gvSIG Desktop, portuguese, training | Leave a comment

Webinar 3 de Febrero de 2014: ‘gvSIG aplicado a Medio Ambiente’

MundoGEO [1] y la Asociación gvSIG [2] os invitan a participar, el próximo 3 de febrero, en un seminario online sobre gvSIG aplicado a Medio Ambiente.

Con inscripción gratis, este evento online está dirigido a todas aquellas personas interesadas en conocer las multiples funcionalidades que hay disponibles con gvSIG Desktop aplicadas a temas de Medio Ambiente.

Los participantes del webinar podrán interactuar con los ponentes a través del chat, además de poder seguir el evento por Twitter (@mundogeo #webinar). Todos los participantes online de este seminario recibirán certificados de su participación.

Detalles del Webinar:
– Webinar: gvSIG aplicado a Medio Ambiente
– Fecha: Lunes 3 de Febrero de 2014
– Hora: 14:00 (UTC)
– Hora local: http://www.timeanddate.com/worldclock/fixedtime.html?msg=Webinar+gvSIG+aplicado+a+Medio+Ambiente&iso=20140203T14&p1=325

– Idioma: Español
– Requisitos de Sistema:
PC – Windows 8, 7, Vista, XP o 2003 Server
Macintosh-Mac OS X 10.6 o más reciente
Mobile – iPhone, iPad, Android
– ¡Cupos limitados!

Inscríbete gratis en este webinar: https://www2.gotomeeting.com/register/801573762

[1] http://mundogeo.com/
[2] http://www.gvsig.com

Posted in events, gvSIG Desktop, spanish, training | Leave a comment

Presentar un PDF desde un script en gvSIG

Hola a todos.

Ayer me preguntaron que se necesitaría para presentar un PDF desde un script de gvSIG. Le dedique unos minutitos y vi que la herramienta de HyperEnlace ya presentaba PDFs, así que pensé que no seria complicado usar esa funcionalidad suya para presentar desde un script mio un PDF.

Después de un poquito de prueba y error, acabe con el siguiente código:

from gvsig import *

#====================================================
#
# Codigo para visualizar un PDF
#
from org.gvsig.tools import ToolsLocator
from org.gvsig.tools.swing.api import ToolsSwingLocator
from java.io import File

def mostrar(ruta):
    tipo = "PDF_format"
    formatManagers = ToolsLocator.getExtensionPointManager().get("HyperLinkAction")
    pdfManager = formatManagers.get(tipo).create()
    panel = pdfManager.createPanel(File(ruta).toURI())    
    windowManager = ToolsSwingLocator.getWindowManager()
    windowManager.showWindow(panel,"Visor",windowManager.MODE.WINDOW)

#
# Fin codigo visualizacion PDF
#=============================================================================

def main(*args):
    mostrar("/tmp/midocumento.pdf")

Bueno aquí os lo dejo por si os sirve.

Si lo queréis usar, solo tenéis que pegar el código de la función mostrar con sus tres imports al inicio de vuestro sctipt y luego ya lo llamáis donde lo necesites igual que lo hago en la función main especificando la ruta a vuestro PDF.

Por cierto, requiere gvSIG 2.1.0 build 2217 o superior para funcionar.

Un saludo

Joaquin

Posted in gvSIG Desktop, gvSIG development, scripting, spanish | 1 Comment

gvSIG 2.1: Test it!

(En castellano más abajo)

Hi all,

As we announce some days ago we’ve started the stabilization process of the next gvSIG version (2.1). At this moment the participation of the community in the testing is essential. When more people is testing we will be able to detect the gvSIG errors, prioritize them and refine the application.

With this post I want to encourage you to test this version as much as you can and report us all the errors or problems that you find, as it’s explained at the blog, through the mailing list or the bug tracker (where we compile the errors).

You can test the functionalities that you usually use, the new features, basing on the exercises of the workshops, etc. The important thing is to test it a lot and from different users.

Only with an active participation of the community we can secure a wider testing. Your participation is essential to build a good version.

We want to thank you for your participation and contribution to this new version.

Hola a todos,

Como anunciamos hace poco hemos comenzado el proceso de estabilización de la que será la siguiente versión de gvSIG (2.1). En estos momentos es fundamental la participación de la comunidad en el testeo. Cuanto más gente testeando más rápido podremos detectar los errores de gvSIG, priorizarlos e ir depurando la aplicación.

Con este post quiero animaros a todos a que probéis en la medida de vuestras posibilidades esta versión y nos reportéis, como indica en el post del blog, mediante la lista de usuarios o el denominado bug tracker (donde recopilamos los errores) todos aquellos errores o problemas con los que os vais encontrando.

Podéis probar lo que más uséis de gvSIG, las novedades, testear en base a ejercicios de talleres, etc. Lo importante es probar mucho y desde muchas “manos” distintas.

Sólo con una participación activa de la comunidad podemos asegurar el testeo más amplio. Vuestra participación es fundamental para construir una buena versión.

Agradeceros desde ya la participación y contribución a esta nueva versión.

Posted in english, gvSIG Desktop, spanish, testing | 1 Comment

Nueva convocatoria de cursos gvSIG-Training en español y portugués

La Plataforma de Capacitación a Distancia gvSIG-Training anuncia el inicio del proceso de inscripciones de los Cursos del Primer corte del 2014 en español y portugués, que forman parte de la oferta del Programa de Certificación de la Asociación gvSIG. Da inicio según se detalla a continuación:

En la modalidad de Matrícula Restringida (con Cupos Limitados) y con inscripciones abiertas a partir del 16 de Enero del presente año:

Portugués:

  • Geoprocesamiento Avanzado sobre gvSIG, 1era. Edición. Inicio: 17/02/2014.
  • Introdução al Geoanálise raster y vetorial, 1era. Edición. Inicio: 17/02/2014.
  • Análise do relevo e hidrológica, 1era. Edición. Inicio: 17/02/2014.
  • Análise de visibilidade e Iluminação, 1era. Edición. Inicio: 17/02/2014.
  • Rasterização e interpolação, 1era. Edición. Inicio: 17/02/2014.
  • Análise de perfis e seções transversais, 1era. Edición. Inicio: 17/02/2014.
  • Análise de Custos e rotas ótimas, 1era. Edición. Inicio: 17/02/2014.

Español:

  • gvSIG para usuarios, 8va. Edición. Inicio: 10/03/2014.
  • gvSIG aplicado a la Gestión de Pavimentos y Vialidad, 3ra. Edición. Inicio: 17/03/2014.
  • gvSIG + EPASWMM aplicado al diseño y gestión de redes de saneamiento y drenaje urbano, 3ra. Edición. Inicio: 24/02/2014.
  • gvSIG aplicado a la Gestión Municipal, 4ta Edición. Inicio: 17/03/2014.
  • gvSIG + EPANET aplicado al diseño y gestión de redes de abastecimiento, 2da. Edición. Inicio: 24/02/2014.
  • Geoprocesamiento Avanzado sobre gvSIG, 6ta Edición. Inicio: 17/02/2014.
  • Introducción al Geoanálisis raster y vectorial, 1era. edición. Inicio: 17/02/2014.
  • Análisis del Terreno e Hidrológico, 1era. Edición. Inicio: 17/02/2014.
  • Análisis de Visibilidad e iluminación, 1era. Edición. Inicio: 17/02/2014.
  • Creación de Mapas mediante interpolación y rasterización, 1era. Edición. Inicio: 17/02/2014.
  • Análisis de Perfiles y Secciones transversales, 1era. Edición. Inicio: 17/02/2014.
  • Análisis de Costes y Rutas óptimas, 1era. Edición. Inicio: 17/02/2014.
  • gvSIG aplicado a Geo-Marketing, 1era. Edición. Inicio: 17/02/2014.
  • gvSIG aplicado al Medio Ambiente, 2da. Edición. Inicio: 31/03/2014.

En la modalidad de Matrícula Abierta (con inscripciones abiertas de forma permanente), a partir del 16 de Enero del presente año:

  • Bases de Datos Geoespaciales: PostgreSQL – PostGIS (Idioma: Español).
  • Análisis de Redes con gvSIG Desktop (Idioma: Español).
  • Navtable y Normalización de Tablas (Idioma: Español).
  • Publicación de Servicios OGC (Idioma: Español).
  • Análisis Geoestadístico con gvSIG y Sextante (Idioma: Español).
  • Uso, creación y gestión de metadatos de información geográfica.
  • Análisis de datos LiDAR y determinación de caudales punta mediante gvSIG, HEC HMS (Idioma: Español). 
  • gvSIG 3D y animación (Idioma: Español). 
  • Base de Datos Espacial PostgreSQL – PostGIS Avanzado (Idioma: Español)

Al participar en cualquiera de estos cursos obtienes créditos del programa de certificación gvSIG que te permite optar a la certificación “gvSIG Usuario” y “gvSIG Usuario Experto” [1]; al mismo tiempo que contribuyes al sostenimiento del proyecto gvSIG.

Todos los cursos de la plataforma gvsig-training pueden ser bonificables al 100% para trabajadores en activo en España a través de la Fundación Tripartita para la Formación en el Empleo. Más información sobre esta bonificación en [2], o a través de la cuenta de correo contacto@gvsig-training.com. Así mismo, existen descuentos para autónomos y desempleados (consultar condiciones en cada curso).

Para mayor información visita nuestra plataforma [3] o escríbenos a la siguientes direcciones de correo electrónico: inscripciones@gvsig-training.com ó info@gvsig-training.com

[1] http://www.gvsig.com/servicios/certificacion/certificacion
[2] http://pdfs.gvsig-training.com/Condiciones_Fundacion_Tripartita_ESP.pdf
[3] http://www.gvsig-training.com

Posted in gvSIG Association, gvSIG Desktop, portuguese, spanish, training | 2 Comments

Homenaje a las Pymes

(El contenido de este post hace referencia a la situación de las Pymes en España)

Aclaración por si este término no se utiliza en otros países. Pymes son pequeñas y medianas empresas. Hacemos referencia a las empresas TIC de estas características.

Piden unas Pymes TIC competitivas. Unas Pymes que cuando facturan a la administración se encuentran en un escenario de absoluta incertidumbre sobre cuando cobrarán, eso sí, total certidumbre sobre cuando tendrán que abonar el IVA de las facturas que no saben cuando cobrarán. Tenemos a unas Pymes financiando a la administración.

Unas Pymes que sufren la morosidad y ya no sólo de las administraciones sino también de otras grandes, muy grandes empresas así como de empresas públicas TIC creadas en tiempos de saqueo.

Tenemos unos bancos a los que hemos entregado nuestro dinero para sanear sus cuentas y según nos cuentan, a condición de que hagan fluir el crédito. Crédito que cuando las Pymes van a pedir, aunque les presenten las facturas conformadas de la administración, esos bancos que han tomado nuestros dineros a través del gobierno, les piden a las Pymes avales personales de sus propietarios como sus viviendas familiares. No sé que querrán hacer los bancos con tantos pisos. Bueno, igual seguir vendiéndolos a esa cosa que denominan fondos de inversión que igual sería mejor denominarlos bandas de especulación.

Si esto no es una operación de concentración de capital de modo que sólo queden los grandes, los muy grandes y utilizando para ello el dinero de la ciudadanía, desde luego lo disimulan muy bien.

Pymes con problemas derivados de morosidad y financiación, pero que esos mismos que les exigen competitividad, les dicen que sus problemas vienen derivados de las relaciones laborales con sus trabajadores, y esto me sugiere que para afrontar esta complicada situación, les invitaría a la reflexión sobre dos temas.

1. Sobre las relaciones laborales con sus trabajadores. Ya sabemos que los mismos que nos llevan a esta situación son los que promueven reformas laborales y difunden la opinión de que los problemas de competitividad son porque los trabajadores cobran mucho, trabajan poco y sólo se preocupan por escaquearse. Sabemos que no es así, que esto es una gran mentira, una más. Quizás puede ser interesante reflexionar sobre un cambio en esas relaciones laborales. Explorar la vía de hacer partícipes a los trabajadores de la realidad, invitarles a ser parte de la solución, fórmulas como la cogestión o similares.

2. Ser capaces de quitarse ciertos miedos y apostar por un asociacionismo real que les permita afrontar mejor esta situación. Consolidar de verdad alianzas entre los que comparten la misma situación. Los que sufren la misma agresión.

Y en esta situación, permitan que a quien considere a bien ayudar al fortalecimiento de un proyecto como gvSIG, que ya saben que va más allá del software. Pues muchas gracias.

Fortalece gvSIG:
https://contribution.gvsig-training.com/index.php?idioma=es_ES

Posted in opinion | 1 Comment

gvSIG 2.1 beta available

(En castellano más abajo)

We are happy to announce the release of gvSIG 2.1 beta. We encourage you to download it, to test it and to give us feedback about bugs and feature requests. For that you can use our bug tracker or the users mailing list (read some general recomendations about bug reporting).

This new version has two main groups of new features: the recovering of the functionalities of gvSIG 1.x that were lost in gvSIG 2.0, and the real new features. Nevertheless, of course, we have also tried to fix the most relevant bugs of older versions.

This is the complete list of new features:

Integration of functionalities of gvSIG 1.x not present at gvSIG 2.0

  • Georeferencing
  • Legends
    • Expresions
    • Proportional symbols
    • Graduated symbols
    • Dot density
    • Quantities by category
    • Charts (pies and bars)
  • Advanced labeling
  • CSV support
  • Import/export SLD
  • Copy/paste geometries
  • Lateral buffer
  • Split line
  • Consecutive numbers function
  • Duplicated records function

New functionalities

  • Chart document
  • Map sheets (map series)
  • Connection with OpenStreetMap services
  • New symbol libraries
  • PostGIS 2.x support (raster and vector)
  • Layout
    • Insert table
    • Insert chart
  • Portable views (thematic maps plugin)
  • Advanced dissolve geoprocess
  • Labeling
    • Halo option
    • Always show label option
  • Raster
    • Set projection to layer
    • Change data type
    • Create multi-file layer
    • Convert to grayscale
  • Export to KML
    • Show attributes in ballon option
    • Use labels option
    • Convert to EPSG:4326 option
  • Scripting: raster data support

Other improvements

  • Raster
    • Integration of tools in the geoprocessing toolbox
    • Principal components tool improved
    • Georeferencing tool improved
  • Print performance improved
  • New design of info tool
  • Bug fixing

——

Nos complace anunciar la publicación de gvSIG 2.1 beta. Os animamos a que la descarguéis, la probéis y nos comuniquéis los fallos que encontréis así como las sugerencias de mejora que consideréis oportunas. Para ello podéis utilizar nuestro sistema de gestión de incidencias o la lista de correo de usuarios (leer recomendaciones generales sobre reporte de fallos).

Esta versión tiene dos grandes grupos de novedades: la recuperación de funcionalidades de la rama 1.x que no estaban presentes en gvSIG 2.0 y las nuevas funcionalidades propiamente dichas. No obstante, y como no podía ser de otra forma, también hemos intentado corregir los fallos más relevantes de las anteriores versiones.

A continuación os dejamos la lista completa de novedades:

Incorporación de funcionalidades de gvSIG 1.x no presentes en gvSIG 2.0

  • Georreferenciación
  • Leyendas
    • Expresiones
    • Símbolos proporcionales
    • Símbolos graduados
    • Densidad de puntos
    • Cantidades por categoría
    • Gráficas (tartas y barras)
  • Etiquetado avanzado
  • Soporte CSV
  • Import/export SLD
  • Copiar/pegar geometrías entre capas
  • Buffer lateral
  • Partir línea en tramos equidistantes
  • Función números consecutivos
  • Selección de registros duplicados

Nuevas funcionalidades

  • Documento gráfica
  • Generación de series de mapas
  • Conexión con servidores OpenStreetMap
  • Nuevas bibliotecas de símbolos
  • Soporte PostGIS 2.x (raster y vectorial)
  • Mapa
    • Insertar tabla
    • Insertar gráfica
  • Vistas portables (plugin mapas temáticos)
  • Geoproceso dissolve avanzado
  • Etiquetado
  • Opción incluir halo
  • Opción etiqueta siempre visible
  • Raster
    • Asignar proyección
    • Cambiar tipo de dato
    • Crear capa multifichero
    • Convertir a escala de grises
  • Export KML
    • Opción mostrar globos
    • Opción mostrar etiquetas
    • Forzar reproyección
  • Soporte scripting raster

Otras mejoras

  • Raster
    • Integración de herramientas en caja de herramientas de geoprocesos
    • Herramienta de componentes principales mejorada
    • Herramienta de georreferenciación mejorada
  • Velocidad de impresión mejorada
  • Nuevo diseño herramienta info
  • Corrección de bugs [enlace]
Posted in english, gvSIG Desktop, opinion, spanish, testing | Tagged , | 7 Comments

Usando PersistenceFactory para persistir muchas clases con un interface comun

Hola a todos.

El otro día un compañero me planteo un problema relacionado con la persistencia del proyecto. Tenia un montón de clases que implementaban un interfaz Filtro, con un montón quiero decir mas de 100, y todas ellas debían persistir los mismos atributos en el proyecto. Además estas implementaciones de Filtro, vivían en librerías, jars, distintos que se desplegaban en la aplicación en varios plugins.

Para su primera aproximación, lo que había echo es persistir los atributos comunes a todas junto con el nombre de la clase, y luego al levantarlos usaba Class.forName(filterClassName). El problema es que si la clase vivía en otro plugin de gvSIG el Class.forName fallaba.

En principio, todo el mecanismo de persistencia diseñado alrededor de la persistencia del proyecto en gvSIG esta pensado para que estas cosas no ocurran, y nunca deberíamos guardar nombres de clase en los atributos de nuestros objetos al persistirlos en el proyecto.

Para que algo sea persistente podemos:

Para nuestro caso, lo que necesitamos es una factoría de persistencia. En principio están pensadas para:

  • Dotar de persistencia a objetos que no podemos tocar, por ejemplo no podemos hacer que la clase Color de java implemente Persistent. Por ejemplo, en el proyecto org.gvsig.fmap.mapcontext se implementa la factoria ColorPersistenceFactory para gestionar la persistencia de java.awt.Color.
  • También podemos utilizarlas para persistir objetos que implementan un interfaz común, como por ejemplo IProjection. En gvSIG existe una sola factoria de persistencia para todas las implementaciones de proyecciones, ProjectionPersistenceFactory.
  • O para dotar de persistencia a un conjunto de clases cuales sean. No tienen por que implementar un interfaz común, ni siquiera tener un conjunto de atributos común Por ejemplo en los test de org.gvsig.tools.lib podemos encontrar la clase AwtFactory.

En nuestro caso deberíamos tener una factoría de persistencia por librería, jar, que aporte un filtro, y en su Library, registrarla en el manager de persistencia. Siguiendo con lo del Color, en el doPostInitialize de MapContextLibrary se registra el ColorPersistenceFactory.

Para implementar factorías de persistencia podemos:

  • Implementar directamente el interfaz PersistenceFactory, Tiene métodos como:
    • public boolean manages(Object obj)
    • public boolean manages(PersistentState state)

    Que deberían responder true si manejan la persistencia del objeto. Y otros como:

    • public Class getManagedClass(PersistentState state)
    • public Class getManagedClass(Object object)
    • public String getManagedClassName(Object object)

    Que nos dicen que clase java representa a un objeto dado.

    Con esto tendríamos el control para que cada librería indique que clases es capaz de levantar y no tendríamos problemas con los class-paths ya que maneja Class y no nombres de clase.

  • Extender de AbstractSinglePersistenceFactory que nos da ya casi todo hecho, solo tendríamos que implementar un par de métodos; pero no creo que nos valga ya que esta pensado para que la factoría trabaje con una clase o interfaz, y aunque pueda parecer que en nuestro caso tenemos un interfaz, como necesitaríamos tener varias factorías para ese interfaz, no nos valdría ya que cada factoría debería responder, no al interfaz común, si no solo a las implementaciones individuales que es capaz de levantar.
  • Extender de AbstractMultiPersistenceFactory. Este caso seria una buena aproximacion a nuestro problema. Actualmente no conozco ningún uso en gvSIG de esta clase abstracta, aunque en org.gvsig.tools.lib tenemos un test que la usa, AwtFactory , y no la usa exactamente para lo que precisaríamos nosotros ahora.

Me voy a extender un poco mas sobre esta ultima opcion ya que parece ser la mas adecuada para lo que necesitamos.

En nuestro caso precisaríamos extender de el e implementar tres métodos:

  • public Object createFromState(PersistentState state)
  • public void saveToState(PersistentState state, Object obj)
  • protected void makeDefinitions()

En el makeDefinitions se crearía la definición de persistencia invocando a addDefinition y creando nuestra definición de forma similar a como lo haríamos para cualquier objeto que implementase Persistent ; pero además deberemos llenar la variable de instancia “classes” con la lista de objetos Class que la factoría vaya a gestionar, y esto ya no es tan simple ya que hay que mantener la coherencia con un Map auxiliar que se usa internamente.

A la clase AbstractMultiPersistenceFactory le faltaría disponer de un método para ir añadiendo clases a una definición (por cierto, se lo añado ya para próximos usos 🙂 ), pero podemos implementarlo en nuestra factoría. Seria algo como:

protected void addManagedClass(Class managedClass, DynClass definition ) {
    if( !this.classes.contains(managedClass) ) {
        this.classes.add(managedClass);
    }
    this.nameToClass.put(managedClass.getName(), managedClass);
    this.nameToClass.put(definition.getFullName(), managedClass);
    if( definition.getNamespace().equals(PersistenceManager.PERSISTENCE_NAMESPACE) ) {
        this.nameToClass.put(definition.getName(), managedClass);
    }
}

Esto nos permitiría añadir varias clases con la misma definición de persistencia. Por ejemplo, si tuviésemos una factoría que fuese a gestionar tres implementaciones del interfaz Filter, FilterA, FilterB y FilterC podríamosacer en el método makeDefinitions() algo como:

protected void makeDefinitions() {
  // Creamos la definicion de persistencia asociandola a la primera clase FilterA
  DynStruct definition = this.addDefinition(FilterA.class, 
      "FilterNoseque", "Filtros de noseque") 

  definition.addDynField....
  ...

  // Ahora asociamos las demas clases a la misma definicion de persistencia.
  this.addManagedClass(FilterB.class,definition);
  this.addManagedClass(FilterC.class,definition);

}

Ojo con el “FilterNoseque”, ya que ese “Noseque” deberá ser distinto en cada factoría que creemos para cada librería. De alguna manera debería identificar el grupo de filtros que gestiona esa factoría de persistencia.

Ahora echemos un vistazo a los otros dos métodos, createFromState y saveToState. Nuestra factoría, en el createFromState lo primero que debería hacer es identificar de que clase filtro se trata, y en función de ello levantarla y rellenar sus propiedades. Pero esto no es tan simple, ya que solo hay una definición de persistencia para todos los filtros que soporta nuestra factoría. Para identificarla tendremos que persistir, además de los atributos del filtro, un identificativo de la clase. En este punto podríamos decidir persistir el nombre de la clase y usar un Class.forName para levantarla, ya que la factoría solo debe manejar lo que este implementado en su librería, así que no tendría problemas con el class-path. Sin embargo no soy partidario de usarlo ya que dificulta la identificación de las dependencias entre las clases. Personalmente prefiero mantener un Map que me devuelva la Class a partir del nombre de esta, lo me dejara constancia de las dependencias dentro de la librería. Añadiremos a la factoría una variable de instancia myfilters que inicializaremos en el makeDefinitions() que podría quedar algo como:

protected void makeDefinitions() {
  // Creamos la definicion de persistencia asociandola a la primera clase FilterA
  DynStruct definition = this.addDefinition(FilterA.class, 
      "FilterNoseque", "Filtros de noseque"); 

  definition.addDynFieldString("filterName");
  definition.addDynField....
  ... ;

  // Ahora asociamos las demas clases a la misma definicion de persistencia
  // y creamos nuestro map.

  this.myfilters = new HashMap();
  Class[] myclasses = {
      FilterA.class,
      FilterB.class,
      FilterC.class
  };
  for( int i=0; i<myclasses.length ; i++ ) {
      this.addManagedClass(myclasses[i],definition);
      this.myfilters.put(myclasses[i].getName(), myclasses[i]);

  }
}

Una vez tenemos inicializado myfilters, nuestros métodos createFromState y saveToState podrían quedar algo como:

public void saveToState(PersistentState state, Object obj)
            throws PersistenceException {
    Filter filter = (Filter) obj;
    state.set("filterName", filter.getClass().getSimpleName());
    // Seguimos persistiendo el resto de propiedades de nuestro filtro
    state.set(...  
    ...
}

public Object createFromState(PersistentState state)
            throws PersistenceException {
    String filterName = state.getString("filterName");
    Class filterClass = (Class) this.myfilters.get(filterName);
    if( filterClass==null ) {
            throw new PersistenceException("Can't manage filter '"+filterName+"'.");
    }
    // Ahora creamos e inicializamos ya nuestro filtro.
    Filter filter = (Filter) filterClass.newInstance();
    filter.setXXX( state.get("XXX"));

    return filter;
}

Si lo hacemos así, cada factoría solo maneja las clases para las que ha sido creada y nunca se levanta una instancia de clase por nombre, con lo que solo se crean objetos con los que nuestro código ha sido compilado. La responsabilidad de levantar otros filtros recaerá en otra factoría que sabe hacerlo, y no esta.

Las implementaciones que he puesto son solo ideas, cada cual que las adapte según lo que necesite.

Bueno, supongo que con esto, ya es ponerse a hacer pruebas.

Un saludo

Joaquin

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

First incursion in symbology on scripting in gvSIG 2.0

Hello everyone.

Other day a friend wrote in gvSIG user’s list about a project he was dealing in  gvSIG and needed to access symbology from scripting of a layer.

First, scripting’s API has nothing prepared to access symbology… well, we believe that was added a pair of functions for something very basic.

Question is he needed to export symbology’s configuration applied to a set of layers and he asked us how to do it.

As the answer was not “cut it” and could be useful to others gvSIG users we thought bring it here, in gvSIG blog, not only in users’s list.

Well, to grain…

Access legend’s configuration of a layer is relatively simple. With:

layer = currentLayer()
legend = layer.getLegend()

And we have an object legend of gvSIG.

Problem is that in gvSIG legend are recordable. So, doesn’t exist a “Legend”, but the different plugins of gvSIG can record many legends. The result is that it could be very difficult to know what operations the legend we’ll get with calling to getLegend().

We will focus on the basic types of legend that come with gvSIG 2.0 (in gvSIG 2.1 are included more legend types, but if it is necessary we’ll talk about them in other moment).

One classification could be:

  • Vector legends (IVectorLegend)
  • Raster legends (IRaterLegend)

But for now we will talk on vector ones.

Other classification could be:

Each legend type offers many operations, so what we do first is determine  what legend we are working. We let here some little functions to that. Simple, but if we need it, and meanwhile they’re not in scripting library, we can paste the entire block in our script.

#==========================================================
#
# Functions to dealing with basic types of legends
#
from org.gvsig.fmap.mapcontext.rendering.legend import ISingleSymbolLegend
from org.gvsig.fmap.mapcontext.rendering.legend import IClassifiedLegend
from org.gvsig.fmap.mapcontext.rendering.legend import IVectorialIntervalLegend
from org.gvsig.fmap.mapcontext.rendering.legend import IVectorialUniqueValueLegend
from org.gvsig.fmap.mapcontext.rendering.legend import IClassifiedVectorLegend

def getLegendName(legend):
  return legend.getClass().getSimpleName()

def isSingleSymbolLegend(legend):
  # https://devel.gvsig.org/sites/org.gvsig.fmap.mapcontext.api/2.0.18/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.mapcontext/org.gvsig.fmap.mapcontext.api/apidocs/org/gvsig/fmap/mapcontext/rendering/legend/ISingleSymbolLegend.html
  return isinstance(legend,ISingleSymbolLegend)

def isVectorialIntervalLegend(legend):
  # https://devel.gvsig.org/sites/org.gvsig.fmap.mapcontext.api/2.0.18/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.mapcontext/org.gvsig.fmap.mapcontext.api/apidocs/org/gvsig/fmap/mapcontext/rendering/legend/IVectorialIntervalLegend.html
  return isinstance(legend,IVectorialIntervalLegend)

def isVectorialUniqueValueLegend(legend):
  # https://devel.gvsig.org/sites/org.gvsig.fmap.mapcontext.api/2.0.18/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.mapcontext/org.gvsig.fmap.mapcontext.api/apidocs/org/gvsig/fmap/mapcontext/rendering/legend/IVectorialUniqueValueLegend.html
  return isinstance(legend,IVectorialUniqueValueLegend)

def isClassifiedLegend(legend):
  # https://devel.gvsig.org/sites/org.gvsig.fmap.mapcontext.api/2.0.18/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.mapcontext/org.gvsig.fmap.mapcontext.api/apidocs/org/gvsig/fmap/mapcontext/rendering/legend/IClassifiedLegend.html
  return isinstance(legend,IClassifiedLegend)

def isClassifiedVectorLegend(legend):
  # https://devel.gvsig.org/sites/org.gvsig.fmap.mapcontext.api/2.0.18/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.mapcontext/org.gvsig.fmap.mapcontext.api/apidocs/org/gvsig/fmap/mapcontext/rendering/legend/IClassifiedVectorLegend.html
  return isinstance(legend,IClassifiedVectorLegend)

It doesn’t matter to understand mucho the code, it’s enough know that once included in our script we can know our legend is of a type with something like:

layer = currentLayer()
legend = layer.getLegend()
if isVectorialUniqueValueLegend(legend):
  print "The layer has a legend of unique values"

With the lack of API and documentation on scripting for the types of legend, we can go to IVectorialUniqueValueLegend to see what operations or methods we can use. Well, with this information we access the object legend of our layer… but… and now what?

In general, a legend has a symbols definition  and a way to see how to get a certain symbol to apply it to a feature or line of a data table associated to a layer.

For example, the single symbol legend (ISimgleSimbolLegend) has a method  getDefaultSymbol() that will return the symbol to apply to all features of our view, therefore a vector classified legend will have a method getSymbols() that will return that legend’s symbols list. Problem is what’s next that there are many symbols types, like with legends, and each one with own operations or methods. So we’ll find:

Despite there are many symbols types, all respond to a set of basic operations like:

  • getDescription()
  • getColor()
  • getSymbolForSelection(), care with this to do not get confused.

To the rest of the operations, we’ll have to see what symbol type we’re dealing, and like done with legends, we’ll have a set of functions to ask what symbol type we have.

#==========================================================
#
# Functions to dealing with basic symbol types
#
from org.gvsig.symbology.fmap.mapcontext.rendering.symbol.fill import ISimpleFillSymbol
from org.gvsig.symbology.fmap.mapcontext.rendering.symbol.fill import IMarkerFillSymbol
from org.gvsig.symbology.fmap.mapcontext.rendering.symbol.fill import IPictureFillSymbol
from org.gvsig.symbology.fmap.mapcontext.rendering.symbol.line import ILineSymbol
from org.gvsig.symbology.fmap.mapcontext.rendering.symbol.line import IPictureLineSymbol
from org.gvsig.symbology.fmap.mapcontext.rendering.symbol.marker import IMarkerSymbol
from org.gvsig.symbology.fmap.mapcontext.rendering.symbol.marker import IPictureMarkerSymbol
from org.gvsig.symbology.fmap.mapcontext.rendering.symbol.marker import ISimpleMarkerSymbol
from org.gvsig.fmap.mapcontext.rendering.symbols import ITextSymbol
from org.gvsig.symbology.fmap.mapcontext.rendering.symbol.text import ISimpleTextSymbol

def getSymbolName(symbol):
  return symbol.getClass().getSimpleName()

def isFillSymbol(symbol):
  # https://devel.gvsig.org/sites/org.gvsig.symbology.lib.api/2.0.18/org.gvsig.desktop.library/org.gvsig.symbology/org.gvsig.symbology.lib/org.gvsig.symbology.lib.api/apidocs/org/gvsig/symbology/fmap/mapcontext/rendering/symbol/fill/IFillSymbol.html
  return isinstance(symbol,ISimpleFillSymbol)

def isMarkerFillSymbol(symbol):
  # https://devel.gvsig.org/sites/org.gvsig.symbology.lib.api/2.0.18/org.gvsig.desktop.library/org.gvsig.symbology/org.gvsig.symbology.lib/org.gvsig.symbology.lib.api/apidocs/org/gvsig/symbology/fmap/mapcontext/rendering/symbol/fill/IMarkerFillSymbol.html
  return isinstance(symbol,IMarkerFillSymbol)

def isPictureFillSymbol(symbol):
  # https://devel.gvsig.org/sites/org.gvsig.symbology.lib.api/2.0.18/org.gvsig.desktop.library/org.gvsig.symbology/org.gvsig.symbology.lib/org.gvsig.symbology.lib.api/apidocs/org/gvsig/symbology/fmap/mapcontext/rendering/symbol/fill/IPictureFillSymbol.html
  return isinstance(symbol,IPictureFillSymbol)

def isLineSymbol(symbol):
  # https://devel.gvsig.org/sites/org.gvsig.symbology.lib.api/2.0.18/org.gvsig.desktop.library/org.gvsig.symbology/org.gvsig.symbology.lib/org.gvsig.symbology.lib.api/apidocs/org/gvsig/symbology/fmap/mapcontext/rendering/symbol/line/ILineSymbol.html
  return isinstance(symbol,ILineSymbol)

def isPictureLineSymbol(symbol):
  # https://devel.gvsig.org/sites/org.gvsig.symbology.lib.api/2.0.18/org.gvsig.desktop.library/org.gvsig.symbology/org.gvsig.symbology.lib/org.gvsig.symbology.lib.api/apidocs/org/gvsig/symbology/fmap/mapcontext/rendering/symbol/line/IPictureLineSymbol.html
  return isinstance(symbol,IPictureLineSymbol)

def isMarkerSymbol(symbol):
  # https://devel.gvsig.org/sites/org.gvsig.symbology.lib.api/2.0.18/org.gvsig.desktop.library/org.gvsig.symbology/org.gvsig.symbology.lib/org.gvsig.symbology.lib.api/apidocs/org/gvsig/symbology/fmap/mapcontext/rendering/symbol/marker/IMarkerSymbol.html
  return isinstance(symbol,IMarkerSymbol)

def isPictureMarkerSymbol(symbol):
  # https://devel.gvsig.org/sites/org.gvsig.symbology.lib.api/2.0.18/org.gvsig.desktop.library/org.gvsig.symbology/org.gvsig.symbology.lib/org.gvsig.symbology.lib.api/apidocs/org/gvsig/symbology/fmap/mapcontext/rendering/symbol/marker/IPictureMarkerSymbol.html
  return isinstance(symbol,IPictureMarkerSymbol)

def isSimpleMarkerSymbol(symbol):
  # https://devel.gvsig.org/sites/org.gvsig.symbology.lib.api/2.0.18/org.gvsig.desktop.library/org.gvsig.symbology/org.gvsig.symbology.lib/org.gvsig.symbology.lib.api/apidocs/org/gvsig/symbology/fmap/mapcontext/rendering/symbol/marker/ISimpleMarkerSymbol.html
  return isinstance(symbol,ISimpleMarkerSymbol)

def isTextSymbol(symbol):
  # https://devel.gvsig.org/sites/org.gvsig.fmap.mapcontext.api/2.0.18/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.mapcontext/org.gvsig.fmap.mapcontext.api/apidocs/org/gvsig/fmap/mapcontext/rendering/symbols/ITextSymbol.html
  return isinstance(symbol,ITextSymbol)

def isSimpleTextSymbol(symbol):
  # https://devel.gvsig.org/sites/org.gvsig.symbology.lib.api/2.0.18/org.gvsig.desktop.library/org.gvsig.symbology/org.gvsig.symbology.lib/org.gvsig.symbology.lib.api/apidocs/org/gvsig/symbology/fmap/mapcontext/rendering/symbol/text/ISimpleTextSymbol.html
  return isinstance(symbol,ISimpleTextSymbol)

So we can do things like:

layer = currentLayer()
legend = layer.getLegend()
if isSingleSymbolLegend(legend):
  symbol = getDefaultSymbol()
  if isFillSymbol(symbol):
    print symbol.getFillColor()

With this, more or less we can start to investigate about what a legend offers to us, but one of the questions shown to us is How do we know what symbol is applied to each geometry?

The question has an answer easy and other hard. We’re gonna stay with the easy. To the legend we can ask what symbol is applied to a feature, getSymbolByFeature(). For example, we could do something like:

layer = currentLayer()
legend = layer.getLegend()
print 
print "Each feature symbols:"
for feature in layer.features():
  # The following line, is a hack to access the object feature of java  
  # in gvSIG 2.1 probably will not be missed.
  feature = feature() 

  symbol = legend.getSymbolByFeature(feature)
  ...

Here what we do is travel all around layer’s features, and for each feature, we ask legend what symbol would be applied to that feature.

Well,  we’m not gonna linger no more, this is just the start point to those would interest start to prove it, and if there’s any doubts, you can ask by gvSIG users’s list.

We leave here a script “complete” where is all together. The script gets the view active and tries to dump the data console of the layer symbology.

The “complete”, is why we was not exhaustive in verifying  the legends types and symbols, but we think it’s enough to start.

See you.

from gvsig import *

def main():
  #
  # To prove it we uploaded in a view a layer:
  # http://downloads.gvsig.org/download/geodata/vector/SHP2D/provincias_andalucia.zip
  # We activated it and added a unique values legend.
  #
  # This code means to be a start point, it’s not ended.
  # Not just because legends are missing
  # In many points we let na "#ALL" indicating from here you are alone
  # However, we think it’s a good start point
  # To those who want to start manipulate legends from scripting.
  #
  # In functions isXXXX we let below goes the url to javadocs of the
  # corresponding class/interface. In those you’ll see methods 
  # each class has.
  #
  layer = currentLayer()
  print layer.getName()
  #
  # Function dumpLegend is below in this script.
  dumpLegend(layer.getLegend())

  # Well, with the code above, we can see how to access information of the 
  # legend, but if we want to know what symbol corresponds with each layer element
  # we can do something like:

  legend = layer.getLegend()
  print 
  print "Each feature symbol:"
  for feature in layer.features():
  # The following line, is a hack to access the object feature of java
  # in gvSIG 2.1 probably will not be missed.
    feature = feature() 

    print feature.get(0), "(", feature.toString() ,")"
    dumpSymbol( legend.getSymbolByFeature(feature) )

#==========================================================
#
# And here is the code to do a dump in text of the 
# legend and symbols. It’s not exhaustive and surely it can be 
# improved but will Worth to see where to consult
# legend values and symbols.
#
def dumpLegend(legend):
  print getLegendName(legend)

  if isSingleSymbolLegend(legend) :
    # This legend has an unique symbol applied to all 
    # geometries.
    dumpSymbol(legend.getDefaultSymbol())
    return 

  if isClassifiedVectorLegend(legend):
    print "- Classification fields: ", legend.getClassifyingFieldNames()

  if isClassifiedLegend(legend):
    # If it is a classified legend will return a symbols list
    print "- Símbolos:"
    for symbol in legend.getSymbols():
      dumpSymbol(symbol)
      print 
    print "- Descriptions:", legend.getDescriptions()
    print "- Values:", legend.getValues()

  # Now we prove if it is another legend type, that could
  # or not be classified.
  if isVectorialIntervalLegend(legend) :
    # TODO
    print "Legend codifying missing (",getLegendName(legend),")"

  elif isVectorialUniqueValueLegend(legend) :
    # It is a classified legend with some
    # more values.
    print "- colorScheme: ", legend.getColorScheme()

  else:
    print "Don’t know what to do with this legend"

def dumpSymbol(symbol, indentacion=1, selection=False):
  spaces=("  "*indentacion)
  print spaces,"- name: ", getSymbolName(symbol)
  #
  # Attributes we can find in all symbols
  print spaces,"- description: ", symbol.getDescription()
  print spaces,"- color: ", symbol.getColor()
  print spaces,"- symbolForSelection: ", symbol.getSymbolForSelection()
  if not symbol.getSymbolForSelection() is None and not selection: 
    # We call dumpSymbol setting selection on true to avoid getting 
    # confused.

    # We comment it at the moment to avoid a large output on tests
    #dumpSymbol(symbol.getSymbolForSelection(),indentacion+1, selection=True)
    pass
  #
  # The remaining depend on symbol type
  # Careful, there’s no "else"s because can exist symbols that
  # are of many type at a time.
  #
  if isFillSymbol(symbol):
    print spaces,"- hasFill: ", symbol.hasFill()
    print spaces,"- hasOutline: ", symbol.hasOutline()
    print spaces,"- fillAlpha: ", symbol.getFillAlpha()
    print spaces,"- fillColor: ", symbol.getFillColor()
    print spaces,"- outline: ", symbol.getOutline()
    if not symbol.getOutline() is None : 
      # We comment it at the moment to avoid a large output on tests
      #dumpSymbol(symbol.getOutline(),indentacion+1, selection)
      #dumpSymbol(symbol.getOutline(),indentacion+1, selection)
      pass

  if isMarkerFillSymbol(symbol):
    # ALL
    print spaces, "Symbol dump codifying missing (", getSymbolName(symbol),")"

  if isPictureFillSymbol(symbol):
    # ALL
    print spaces, "Symbol dump codifying missing (", getSymbolName(symbol),")"

  if isLineSymbol(symbol):
    # ALL
    print spaces, "Symbol dump codifying missing (", getSymbolName(symbol),")"

  if isPictureLineSymbol(symbol):
    # ALL
    print spaces, "Symbol dump codifying missing (", getSymbolName(symbol),")"

  if isMarkerSymbol(symbol):
    # ALL
    print spaces, "Symbol dump codifying missing (", getSymbolName(symbol),")"

  if isPictureMarkerSymbol(symbol):
    # ALL
    print spaces, "Symbol dump codifying missing (", getSymbolName(symbol),")"

  if isSimpleMarkerSymbol(symbol):
    # ALL
    print spaces, "Symbol dump codifying missing (", getSymbolName(symbol),")"

  if isTextSymbol(symbol):
    # ALL
    print spaces, "Symbol dump codifying missing (", getSymbolName(symbol),")"

  if isSimpleTextSymbol(symbol):
    # ALL
    print spaces, "Symbol dump codifying missing (", getSymbolName(symbol),")"

#==========================================================
#
# Basic types of legends functions
#
from org.gvsig.fmap.mapcontext.rendering.legend import ISingleSymbolLegend
from org.gvsig.fmap.mapcontext.rendering.legend import IClassifiedLegend
from org.gvsig.fmap.mapcontext.rendering.legend import IVectorialIntervalLegend
from org.gvsig.fmap.mapcontext.rendering.legend import IVectorialUniqueValueLegend
from org.gvsig.fmap.mapcontext.rendering.legend import IClassifiedVectorLegend

def getLegendName(legend):
  return legend.getClass().getSimpleName()

def isSingleSymbolLegend(legend):
  # https://devel.gvsig.org/sites/org.gvsig.fmap.mapcontext.api/2.0.18/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.mapcontext/org.gvsig.fmap.mapcontext.api/apidocs/org/gvsig/fmap/mapcontext/rendering/legend/ISingleSymbolLegend.html
  return isinstance(legend,ISingleSymbolLegend)

def isVectorialIntervalLegend(legend):
  # https://devel.gvsig.org/sites/org.gvsig.fmap.mapcontext.api/2.0.18/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.mapcontext/org.gvsig.fmap.mapcontext.api/apidocs/org/gvsig/fmap/mapcontext/rendering/legend/IVectorialIntervalLegend.html
  return isinstance(legend,IVectorialIntervalLegend)

def isVectorialUniqueValueLegend(legend):
  # https://devel.gvsig.org/sites/org.gvsig.fmap.mapcontext.api/2.0.18/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.mapcontext/org.gvsig.fmap.mapcontext.api/apidocs/org/gvsig/fmap/mapcontext/rendering/legend/IVectorialUniqueValueLegend.html
  return isinstance(legend,IVectorialUniqueValueLegend)

def isClassifiedLegend(legend):
  # https://devel.gvsig.org/sites/org.gvsig.fmap.mapcontext.api/2.0.18/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.mapcontext/org.gvsig.fmap.mapcontext.api/apidocs/org/gvsig/fmap/mapcontext/rendering/legend/IClassifiedLegend.html
  return isinstance(legend,IClassifiedLegend)

def isClassifiedVectorLegend(legend):
  # https://devel.gvsig.org/sites/org.gvsig.fmap.mapcontext.api/2.0.18/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.mapcontext/org.gvsig.fmap.mapcontext.api/apidocs/org/gvsig/fmap/mapcontext/rendering/legend/IClassifiedVectorLegend.html
  return isinstance(legend,IClassifiedVectorLegend)

#==========================================================
#
# Basic types of symbols functions
#
from org.gvsig.symbology.fmap.mapcontext.rendering.symbol.fill import ISimpleFillSymbol
from org.gvsig.symbology.fmap.mapcontext.rendering.symbol.fill import IMarkerFillSymbol
from org.gvsig.symbology.fmap.mapcontext.rendering.symbol.fill import IPictureFillSymbol
from org.gvsig.symbology.fmap.mapcontext.rendering.symbol.line import ILineSymbol
from org.gvsig.symbology.fmap.mapcontext.rendering.symbol.line import IPictureLineSymbol
from org.gvsig.symbology.fmap.mapcontext.rendering.symbol.marker import IMarkerSymbol
from org.gvsig.symbology.fmap.mapcontext.rendering.symbol.marker import IPictureMarkerSymbol
from org.gvsig.symbology.fmap.mapcontext.rendering.symbol.marker import ISimpleMarkerSymbol
from org.gvsig.fmap.mapcontext.rendering.symbols import ITextSymbol
from org.gvsig.symbology.fmap.mapcontext.rendering.symbol.text import ISimpleTextSymbol

def getSymbolName(symbol):
  return symbol.getClass().getSimpleName()

def isFillSymbol(symbol):
  # https://devel.gvsig.org/sites/org.gvsig.symbology.lib.api/2.0.18/org.gvsig.desktop.library/org.gvsig.symbology/org.gvsig.symbology.lib/org.gvsig.symbology.lib.api/apidocs/org/gvsig/symbology/fmap/mapcontext/rendering/symbol/fill/IFillSymbol.html
  return isinstance(symbol,ISimpleFillSymbol)

def isMarkerFillSymbol(symbol):
  # https://devel.gvsig.org/sites/org.gvsig.symbology.lib.api/2.0.18/org.gvsig.desktop.library/org.gvsig.symbology/org.gvsig.symbology.lib/org.gvsig.symbology.lib.api/apidocs/org/gvsig/symbology/fmap/mapcontext/rendering/symbol/fill/IMarkerFillSymbol.html
  return isinstance(symbol,IMarkerFillSymbol)

def isPictureFillSymbol(symbol):
  # https://devel.gvsig.org/sites/org.gvsig.symbology.lib.api/2.0.18/org.gvsig.desktop.library/org.gvsig.symbology/org.gvsig.symbology.lib/org.gvsig.symbology.lib.api/apidocs/org/gvsig/symbology/fmap/mapcontext/rendering/symbol/fill/IPictureFillSymbol.html
  return isinstance(symbol,IPictureFillSymbol)

def isLineSymbol(symbol):
  # https://devel.gvsig.org/sites/org.gvsig.symbology.lib.api/2.0.18/org.gvsig.desktop.library/org.gvsig.symbology/org.gvsig.symbology.lib/org.gvsig.symbology.lib.api/apidocs/org/gvsig/symbology/fmap/mapcontext/rendering/symbol/line/ILineSymbol.html
  return isinstance(symbol,ILineSymbol)

def isPictureLineSymbol(symbol):
  # https://devel.gvsig.org/sites/org.gvsig.symbology.lib.api/2.0.18/org.gvsig.desktop.library/org.gvsig.symbology/org.gvsig.symbology.lib/org.gvsig.symbology.lib.api/apidocs/org/gvsig/symbology/fmap/mapcontext/rendering/symbol/line/IPictureLineSymbol.html
  return isinstance(symbol,IPictureLineSymbol)

def isMarkerSymbol(symbol):
  # https://devel.gvsig.org/sites/org.gvsig.symbology.lib.api/2.0.18/org.gvsig.desktop.library/org.gvsig.symbology/org.gvsig.symbology.lib/org.gvsig.symbology.lib.api/apidocs/org/gvsig/symbology/fmap/mapcontext/rendering/symbol/marker/IMarkerSymbol.html
  return isinstance(symbol,IMarkerSymbol)

def isPictureMarkerSymbol(symbol):
  # https://devel.gvsig.org/sites/org.gvsig.symbology.lib.api/2.0.18/org.gvsig.desktop.library/org.gvsig.symbology/org.gvsig.symbology.lib/org.gvsig.symbology.lib.api/apidocs/org/gvsig/symbology/fmap/mapcontext/rendering/symbol/marker/IPictureMarkerSymbol.html
  return isinstance(symbol,IPictureMarkerSymbol)

def isSimpleMarkerSymbol(symbol):
  # https://devel.gvsig.org/sites/org.gvsig.symbology.lib.api/2.0.18/org.gvsig.desktop.library/org.gvsig.symbology/org.gvsig.symbology.lib/org.gvsig.symbology.lib.api/apidocs/org/gvsig/symbology/fmap/mapcontext/rendering/symbol/marker/ISimpleMarkerSymbol.html
  return isinstance(symbol,ISimpleMarkerSymbol)

def isTextSymbol(symbol):
  # https://devel.gvsig.org/sites/org.gvsig.fmap.mapcontext.api/2.0.18/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.mapcontext/org.gvsig.fmap.mapcontext.api/apidocs/org/gvsig/fmap/mapcontext/rendering/symbols/ITextSymbol.html
  return isinstance(symbol,ITextSymbol)

def isSimpleTextSymbol(symbol):
  # https://devel.gvsig.org/sites/org.gvsig.symbology.lib.api/2.0.18/org.gvsig.desktop.library/org.gvsig.symbology/org.gvsig.symbology.lib/org.gvsig.symbology.lib.api/apidocs/org/gvsig/symbology/fmap/mapcontext/rendering/symbol/text/ISimpleTextSymbol.html
  return isinstance(symbol,ISimpleTextSymbol)
Posted in community, development, english, gvSIG Desktop, scripting | Leave a comment

gvSIG Latin American Conference will be held in Brazil along with MundoGEO#Connect 2014

The 6th Latin American and Caribbean gvSIG Conference will be held next year in Brazil, along with MundoGEO#Connect LatinAmerica, Conference and Trade Fair of Geomatics and Geospatial Solutions, that will take place from May 7 thru 9 May at Frei Caneca Convention Center in Sao Paulo, Brazil.

“gvSIG Association is pleased in communicating this alliance with MundoGEO. A joint celebration of the Latin American and Caribbean gvSIG Conference with MundoGEO#Connect 2014 allows us to state that, during these days, it will be held the most important Geomatics event in Latin America in 2014, “said Alvaro Anguix, CEO of gvSIG Association. “This agreement is marked by a continuous collaboration between both institutions, under the premise of joining efforts and disseminating knowledge and technological capability of Latin America. The 6th Latin American and Caribbean gvSIG Conference website will be available soon, with information about the event”, added the Director.

Latin American and Caribbean gvSIG Conference will have its sixth edition held in Brazil highlighting new technology and products to be launched in 2014. As usual in gvSIG Conferences, participation in lectures and workshops will be free in order to gather the maximum number of users and participants of the large Latin American gvSIG community.

MundoGEO team is very optimistic about this alliance, which will strengthen both events and provide the gvSIG community with the opportunity to expand their connections, by contacting other attendees of the conference and also the visitors of the Geomatics Trade Fair“, says Granemann Emerson, director of MundoGE, the company that organizes MundoGEO#Connect.

The 6th Latin American and Caribbean gvSIG Conference website will be released soon with all the information about the event. MundoGEO#Connect LatinAmerica website is already available with photos, videos, news, testimonials, information about exhibitors, location, hosting, exhibition floor, MundoGEO#Connect Awards and also the conference schedule. Information on previous editions of gvSIG Conferences are available in http://www.gvsig.org/web/community/events/jornadas-lac.

Posted in english, events | Tagged | Leave a comment