spatialdata-io icon indicating copy to clipboard operation
spatialdata-io copied to clipboard

In `.geojson` parsed, the index should be parsed from `.geojson`

Open LucaMarconato opened this issue 1 year ago • 2 comments

The .geojson parsed (currently in spatialdata.models.ShapesModels.parse(), which will be moved to spatialdata-io, doesn't try to parse the index of the object from the .geojson file.

This behavior should be implemented. For instance in the incoming seqFISH reader #227 the index is assumed to match the index from the table (which is reasonable and expected), but more robust parser would read it from the .geojson.

CC @LLehner @quentinblampey

LucaMarconato avatar Dec 12 '24 10:12 LucaMarconato

Hi @LucaMarconato! In the current PR for the CLI (https://github.com/scverse/spatialdata-io/pull/239), they call ShapesModels.parse() inside spatialdata-io instead of moving the function itself. Which option do you prefer? I'm fine with both.

(just to know if we need to do make PR in spatialdata, or update the spatialdata-io PR)

quentinblampey avatar Dec 12 '24 10:12 quentinblampey

I think it will be cleaner to move the function inside spatialdata-io so that the parser is detached from reading from files. I will review the PRs shortly after the incoming release.

LucaMarconato avatar Dec 12 '24 16:12 LucaMarconato