gvSIG bugs #2851

RuntimeException: Name descriptor duplicated executing SEXTANTE vector geoprocesses

Added by Antonio Falciano over 9 years ago. Updated over 9 years ago.

Status:Closed% Done:

100%

Priority:HighSpent time:-
Assignee:Francisco Díaz Carsí
Category:Geoprocess
Target version:2.1.0-2255-testing
Severity:Major Add-on version:
gvSIG version:2.1.0 Add-on build:
gvSIG build: Add-on resolve version:
Operative System: Add-on resolve build:
Keywords:geometry, geoprocess, sextante Proyecto:
Has patch: Hito:
Add-on name:Unknown

Description

Executing some SEXTANTE vector geoprocesses a RuntimeException: Name descriptor duplicated occurs.

Example 1: "Union".
The name descriptor duplicated is GEOMETRY, because both input layers have a GEOMETRY field. (see #2849)

Example 2: "Geometric properties of polygons"
It happens only when the input layer attribute table contains at least one of the fields added by the geoalgorithm (e.g. AREA).


Related issues

Related to Application: gvSIG desktop - gvSIG bugs #2849: Several SEXTANTE geoprocesses don't work fine due to the ... Closed 10/03/2014

Associated revisions

Revision 570
Added by Francisco Díaz Carsí over 9 years ago

refs #2851 Arreglado para que cuando el geoproceso crea la capa temporal no tenga en cuenta las columnas de tipo GEOMETRY de las capas de origen y cree él una única columna de éste tipo.

Revision 100
Added by Francisco Díaz Carsí over 9 years ago

refs #2851 añadidos los métodos necesarios para inicializar los valores por defecto en las features (para evitar los valores nulos) y chequear y ofrecer los nombres de los atributos para evitar duplicidades y longitud superior a 10 caracteres.

Revision 587
Added by Francisco Díaz Carsí over 9 years ago

refs #2851 arreglado el chequeo de los nombres de los atributos para evitar duplicidades y longitud superior a 10 caracteres.

Revision 588
Added by Francisco Díaz Carsí over 9 years ago

refs #2851 Sobreescritos los métodos necesarios para que los geoprocesos puedan acceder al los types y names de los atributos del featureType como es habitual en sextante sin el atributo de geometría por defecto.

Revision 115
Added by Francisco Díaz Carsí over 9 years ago

refs #2851 Creado el método checkAttrName en la clase ShapesTools para poder ser utilizado en el método addFields de la propia clase y también desde la clase GeoAlgorithm.

History

#1 Updated by Antonio Falciano over 9 years ago

I've forgotten to say that the final effect of this exception is that the "File not found" window appears. If we check for the output layer in the tmp-andami folder we discover that it's not created at all.

#2 Updated by Álvaro Anguix over 9 years ago

  • Related to gvSIG bugs #2849: Several SEXTANTE geoprocesses don't work fine due to the GEOMETRY field added

#3 Updated by Francisco Díaz Carsí over 9 years ago

  • % Done changed from 0 to 100
  • Target version set to 2.1.0-2259-rc3
  • Assignee set to Francisco Díaz Carsí
  • Status changed from New to Fixed

gvsig-geoprocess:r570

Se ha arreglado para que cuando el geoproceso crea la capa temporal no tenga en cuenta las columnas de tipo GEOMETRY de las capas de origen y cree él una única columna de este tipo.

#4 Updated by Joaquín del Cerro Murciano over 9 years ago

  • Target version changed from 2.1.0-2259-rc3 to 2.1.0-2251-testing

#5 Updated by Antonio Falciano over 9 years ago

Francisco Diaz wrote:

gvsig-geoprocess:r570

Se ha arreglado para que cuando el geoproceso crea la capa temporal no tenga en cuenta las columnas de tipo GEOMETRY de las capas de origen y cree él una única columna de este tipo.

Thanks Francisco, I imagine that you have used the same approach of the AbstractSextanteGeoProcess class. So the Union (example 1) should work. Instead, in reference to the case of example 2, how to manage the duplicated fields? Can we use a truncation field name mechanism like that of "Export to" (see #2681)? Or do we let the user to rename the duplicated fields?

#6 Updated by Antonio Falciano over 9 years ago

  • Status changed from Fixed to New

SEXTANTE "Union" returns the difference between the two layers in build 2251. There's not trace of error in the gvSIG.log.

#7 Updated by Francisco Díaz Carsí over 9 years ago

  • Status changed from New to Fixed

Restablezco la tarea como arreglada. Abro otro tiquet con el problema de tu último comentario #2913.

Gracias.

#8 Updated by Álvaro Anguix over 9 years ago

  • Status changed from Fixed to Closed

#9 Updated by Antonio Falciano over 9 years ago

  • Target version changed from 2.1.0-2251-testing to 2.1.0-2259-rc3
  • Status changed from Closed to New

Hi Alvaro,
if we skip the GEOMETRY field in SEXTANTE geoprocesses (see #2849), then the example 1 will works fine, instead the example 2 not because the duplicated descriptor names are not managed yet (i.e. the issue in subject). So the ticket is still open.

#10 Updated by Francisco Díaz Carsí over 9 years ago

  • Status changed from New to In progress

#11 Updated by Francisco Díaz Carsí over 9 years ago

  • Status changed from In progress to Fixed

#12 Updated by Joaquín del Cerro Murciano over 9 years ago

  • Target version changed from 2.1.0-2259-rc3 to 2.1.0-2254-testing

#13 Updated by Antonio Falciano over 9 years ago

  • Target version changed from 2.1.0-2254-testing to 2.1.0-2259-rc3
  • Status changed from Fixed to New

Same issue of RC2 in build 2254. It seems that the org.gvsig.geoprocess add-on build version is 2087 (the same of RC2) instead of 2090.

#14 Updated by Álvaro Anguix over 9 years ago

  • Status changed from New to Fixed

Hi Antonio, the bug is fixed but we don't test in build 2254. I change to fixed.

#15 Updated by Joaquín del Cerro Murciano over 9 years ago

  • Target version changed from 2.1.0-2259-rc3 to 2.1.0-2254-testing

#16 Updated by Antonio Falciano over 9 years ago

  • Target version changed from 2.1.0-2254-testing to 2.1.0-2259-rc3
  • Status changed from Fixed to New

The Union (example 1) works fine now, while the example 2 not yet. It returns always: "java.lang.RuntimeException: Name descriptor AREA duplicated.".

#17 Updated by Francisco Díaz Carsí over 9 years ago

  • Status changed from New to Fixed

Corregido.
Algunos algoritmos como el de "unión" introducían ellos mismos los nombres de las columnas en la capa resultado, y esto es lo que se había arreglado en el commit anterior.
Pero otros, como el de "Geometric properties of polygons", delegaban en un método estático de la clase ShapesTools. Se ha arreglado este método para que arregle los nombres que se vayan a introducir en la capa resultado evitando los duplicados.

Así pues, los siguientes algoritmos (que son potencialmente conflictivos en este sentido), no deberían dar este problema en el futuro:

CostInRoutesAlgorithm
CostInRoutesAnisotropicAlgorithm
CostInRoutesAnisotropicBAlgorithm
VectorFieldCalculatorAlgorithm
VectorSplitFieldAlgorithm
ExtendLinesLayerWithGridsAlgorithm
ExtendPointsLayerWithGridsAlgorithm
GeometricPropertiesAlgorithm
GeometricPropertiesLinesAlgorithm
GeometricPropertiesLinesBAlgorithm
GridStatisticsInPolygonsAlgorithm
pointCoordinatesAlgorithm
VectorClusterAlgorithm
VectorSpatialClusterAlgorithm

#18 Updated by Antonio Falciano over 9 years ago

  • Status changed from Fixed to Closed

Just tested the fix in the new addon and it works fine. Thank you!

#19 Updated by Joaquín del Cerro Murciano over 9 years ago

  • Target version changed from 2.1.0-2259-rc3 to 2.1.0-2255-testing

Also available in: Atom PDF