MapStore2 icon indicating copy to clipboard operation
MapStore2 copied to clipboard

Attribute table crash when additional geometries in attributes

Open jusabatier opened this issue 1 year ago • 2 comments

Description

We have some layers with additional geometries as attributes :

Image

Here the «parking_geom» and «departure_geom»

When we try to open the attribute table of this layer, Mapsore crash

How to reproduce

  • Add a layer with additional geometries as attributes
  • Open this layer attribute table

Expected Result The attribute table should open without crash, don't know how to render geometries fields (maybe EWKT or just hide them)

Current Result Mapstore crash ("Something wents wrong" message)

  • [x] Not browser related

jusabatier avatar Nov 28 '24 15:11 jusabatier

Will it be possible/simple to at least fix the crash for next release (2025.01.00) ? I don't know if it needs a small or a big change.

It would be much appreciated as we have some contexts that are unusable because of this bug making MS2 crash when user try to open attribute table.

@tdipisa

jusabatier avatar Feb 20 '25 14:02 jusabatier

@jusabatier

Will it be possible/simple to at least fix the crash for next release (2025.01.00) ?

We will try to schedule a check for this. Thank you for reporting.

tdipisa avatar Feb 20 '25 14:02 tdipisa

Hi @tdipisa I need clarifications for 2 things:

  • What action should I do, hide the field from attribute table? Or parsing it to string or what ?
  • Are there other fields types rather than wkt should I handle in this issue ?

mahmoudadel54 avatar Jun 30 '25 09:06 mahmoudadel54

@mahmoudadel54 (FYI @offtherailz) Probably the better should be to let the user to choose the geom he want to manage when the Table is loaded with the possibility to switch between available geometries trough a selector.

tdipisa avatar Jun 30 '25 09:06 tdipisa

I think it will be complicated for end user to choose the geom, as sometimes they begin with carto.

The geometry representation is handled via styles, and we can choose what geometry to shows or not there. The WKT representation can be usefull sometimes, but I suggest to simply hide them as it's not a human readable field.

jusabatier avatar Jun 30 '25 09:06 jusabatier

Yes, attribute table should not show any geom field as column, and this should avoid the crash. About "what geometry field to show/use for editing etc..." we can not see what geometry is used by the style (and the style may use more than one). On mapstore side we can decide to use the first one found (that I think is the current behavior). This, together with the fix above, should provide the minimum functionality, avoiding crashes. Then an additional feature can be to make a button show, when multiple geometry are available, to select the geom field to use.

offtherailz avatar Jun 30 '25 10:06 offtherailz

On mapstore side we can decide to use the first one found (that I think is the current behavior). This, together with the fix above, should provide the minimum functionality, avoiding crashes. Then an additional feature can be to make a button show, when multiple geometry are available, to select the geom field to use.

yes @offtherailz, that's what I suggested indeed.

tdipisa avatar Jun 30 '25 10:06 tdipisa