gvSIG bugs #3089

Can't save data of plugin org.gvsig.projection.app.jcrs

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

Status:Closed% Done:

0%

Priority:NormalSpent time:-
Assignee:Joaquín del Cerro Murciano
Category:CRS
Target version:2.1.0-2263
Severity:Major Add-on version:
gvSIG version:2.1.0 Add-on build:
gvSIG build:2262 Add-on resolve version:
Operative System: Add-on resolve build:
Keywords:crs, persistence, transformation Proyecto:
Has patch: Hito:
Add-on name:Unknown

Description

The coordinate transformations (EPSG, manual, NTv2) are not persistent, because the 'org.gvsig.crs.persistence.TrData' values of attribute '_unknow_'.
How to reproduce the issue:
  • create and open a view, e.g. in EPSG:4326;
  • add one (or more) layer(s) defined e.g. in EPSG:2303x and apply an EPSG (or manual or NTv2 grid) transformation;
  • finally, save the gvSIG project.

Result: if we reopen the project, the layer(s) are not reprojected on the fly correctly.

gvSIG.log (346 KB) Antonio Falciano, 01/04/2015 04:23 PM

gvSIG_2nd_issue.log (364 KB) Antonio Falciano, 01/05/2015 01:25 PM

Associated revisions

Revision 320
Added by Joaquín del Cerro Murciano over 9 years ago

refs #3089, modificado el CrsFactory para que tenga en cuenta en la cache de memoria si una proyeccion tiene asociada una transformacion.

History

#1 Updated by Antonio Falciano over 9 years ago

  • Target version set to 2.1.0-2268-rc4

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

Hola Antonio...
se han mezclado dos cosas. Por un lado esta la persistencia del plugin y por otro la persistencia del proyecto.
El error que se produce al seguir los pasos que indicas afecta a la persistencia del plugin. Los datos almacenados en el proyecto parecen correctos (por lo menos en la prueba que he realizado).
El error que se produce afecta a que si reabres gvSIG, cuando quieres cargar una capa y intentas seleccionar la proyeccion de esta, no te muestra las ultimas proyecciones usadas, ya que estos valores son los que no se guardaron correctamente en la persistencia del plugin.

Si realmente cuando cargas de nuevo el proyecto este no se reproyecta adecuadamente, son dos errores distintos:

  • Uno, no recuerda las ultimas proyecciones usadas (el relacionado con TrData)
  • Dos, no reproyecta correctamente al recuperar un proyecto una capa con reproyeccion+transformacion al vuelo

El primero no me precupa excesivamente, es incomodo para el usuario; pero el segundo es mas grave ya que esta "estropeando" el proyecto al usuario.
Lamentablemente, asi a vote pronto, parece mas facil de corregir el primero que el segundo.

Si pudieses darme mas informacion de que pasos he de seguir para reproducir el error y verificar que no lo ha reproyectado correctamente te agradeceria que dieses un tiquet nuevo con ese error. Algo como cargar una capa de referencia en concreto en 4326 una en concreto en 23030 con una transformacion en concreto para que pueda ver que al guardar el proyecto se han desplazado las cosas y puede ver si es un problema de persistencia. Si no acaba siendo un problema de persistencia no se si podre arreglarlo, de proyecciones no se mucho, bueno se bastante poco.

Gracias
Joaquin

#3 Updated by Antonio Falciano over 9 years ago

Joaquín del Cerro Murciano wrote:

Hola Antonio...
se han mezclado dos cosas. Por un lado esta la persistencia del plugin y por otro la persistencia del proyecto.
El error que se produce al seguir los pasos que indicas afecta a la persistencia del plugin. Los datos almacenados en el proyecto parecen correctos (por lo menos en la prueba que he realizado).
El error que se produce afecta a que si reabres gvSIG, cuando quieres cargar una capa y intentas seleccionar la proyeccion de esta, no te muestra las ultimas proyecciones usadas, ya que estos valores son los que no se guardaron correctamente en la persistencia del plugin.

Si realmente cuando cargas de nuevo el proyecto este no se reproyecta adecuadamente, son dos errores distintos:

  • Uno, no recuerda las ultimas proyecciones usadas (el relacionado con TrData)
  • Dos, no reproyecta correctamente al recuperar un proyecto una capa con reproyeccion+transformacion al vuelo

El primero no me precupa excesivamente, es incomodo para el usuario; pero el segundo es mas grave ya que esta "estropeando" el proyecto al usuario.
Lamentablemente, asi a vote pronto, parece mas facil de corregir el primero que el segundo.

Hi Joaquín,
I'm agree with you about the analysis. In my humble opinion, we could check well the second issue you mention (project persistence) only after the fix of the first one (TrData).

Si pudieses darme mas informacion de que pasos he de seguir para reproducir el error y verificar que no lo ha reproyectado correctamente te agradeceria que dieses un tiquet nuevo con ese error. Algo como cargar una capa de referencia en concreto en 4326 una en concreto en 23030 con una transformacion en concreto para que pueda ver que al guardar el proyecto se han desplazado las cosas y puede ver si es un problema de persistencia. Si no acaba siendo un problema de persistencia no se si podre arreglarlo, de proyecciones no se mucho, bueno se bastante poco.

Ok, here's an exercise in order to better understand the problem(s):
  • create and open a view defined in EPSG:4326;
  • add the WFS layer called "Unità Amministrative - Regioni" from this service [1] and consider it as the reference layer;
  • add Reg2011_ED50.shp from this URL [2] defined in EPSG:23032 without applying a coordinate transformation (error of some meter tens);
  • add Reg2011_ED50.shp again, always defined in EPSG:23032 but applying the EPSG transformation called "ED50 to WGS84 (1)" (EPSG:1133) this time (error of some meters);
  • zoom on a little detail e.g. on the coasts and finally save the project.
Result:
  • 1st issue - the gvSIG.log after saving the project is similar to the previous one (Can't save data of plugin org.gvsig.projection.app.jcrs [...] Caused by: [...] 'org.gvsig.crs.persistence.TrData' values of attribute '_unknow')_.

Then, if we reopen the project (and activate the cache of WFS layer, see ), the result is:

  • 2nd issue - Reg2011_ED50.shp two layers are projected in the same way, more specifically the EPSG transformation is applied on both layers (because the error is only of few meters). Note: the CRS in the Metadata tab of layer properties cannot be checked (see gvSIG_2nd_issue.log).

[1] http://wms.pcn.minambiente.it/ogc?map=/ms_ogc/wfs/LimitiAmministrativi_2011.map
[2] http://www.istat.it/storage/basi_territoriali_2013/LimitiAmministrativi/Limiti2011/Reg2011_ED50.zip

#4 Updated by Antonio Falciano over 9 years ago

Antonio Falciano wrote:

Ok, here's an exercise in order to better understand the problem(s):
  • create and open a view defined in EPSG:4326;
  • add the WFS layer called "Unità Amministrative - Regioni" from this service [1] and consider it as the reference layer;
  • export this WFS layer as Reg_4326.shp (in order to avoid #2831, very time consuming)
  • add Reg2011_ED50.shp from this URL [2] defined in EPSG:23032 without applying a coordinate transformation (error of some meter tens);
  • add Reg2011_ED50.shp again, always defined in EPSG:23032 but applying the EPSG transformation called "ED50 to WGS84 (1)" (EPSG:1133) this time (error of some meters);

Note: if I invert the last two steps, the two layers (same shp) are reprojected on the fly in the same way before saving the project! So I've made a copy of Reg2011_ED50.shp renamed as Reg2011_ED50_NoTrans.shp (in order to understand if the issue could depend by the same shp) and retried in a new project obtaining the same result of before. So it seems that the same CRS code is the cause: once assigned a first transformation to the CRS, it will be always applied.

  • zoom on a little detail e.g. on the coasts and finally save the project.
Result:
  • 1st issue - the gvSIG.log after saving the project is similar to the previous one (Can't save data of plugin org.gvsig.projection.app.jcrs [...] Caused by: [...] 'org.gvsig.crs.persistence.TrData' values of attribute '_unknow')_.

Then, if we reopen the project (and activate the cache of WFS layer, see ), the result is:

  • 2nd issue - Reg2011_ED50.shp two layers are projected in the same way, more specifically the EPSG transformation is applied on both layers (because the error is only of few meters). Note: the CRS in the Metadata tab of layer properties cannot be checked (see gvSIG_2nd_issue.log).

[1] http://wms.pcn.minambiente.it/ogc?map=/ms_ogc/wfs/LimitiAmministrativi_2011.map
[2] http://www.istat.it/storage/basi_territoriali_2013/LimitiAmministrativi/Limiti2011/Reg2011_ED50.zip

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

  • Target version changed from 2.1.0-2268-rc4 to 2.1.0-2263

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

Bueno, al final a resultado que el error que hacia que las dos tablas en 23032, una con transformacion y otra sin, se guardaran con la misma proyeccion no era un error de persistencia. Tenia que ver con la cache de proyecciones en memoria que no tenie en cuenta las transformaciones de una proyeccion.

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

  • Assignee set to Joaquín del Cerro Murciano
  • Status changed from New to Fixed

#8 Updated by Antonio Falciano over 9 years ago

  • Status changed from Fixed to Closed

Also available in: Atom PDF