scverse / scverse/spatialdata

`ShapesModel.parse()`, for `.geojson` files, ignores non-geometry colums.

Open
#1,008 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

needs: triage priority: low
Dominant language
Python
Stars
394
Forks
95
Avg merge
4d 3h
Merged PRs (30d)
7

Description

The spatialdata_io.visium_hd() SpaceRanger 4.0 reader needs to read non-geometry columns from a .geojson file and store them to a GeoDataFrame. Since ShapesModel.parse() ignores such non-geometry columns, @stephenwilliams22 has to write a custom function spatialdata_io.readers.visium_hd._extract_geometries_from_geojson().

It would be convenient to extend ShapesModel.parse() to make it read non-geometry columns, so that visium_hd() can be simplified.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with ShapesModel.parse() and the spatialdata_io.visium_hd() reader, especially spatialdata_io.readers.visium_hd._extract_geometries_from_geojson(). Trace how the .geojson input becomes a GeoDataFrame, then ensure non-geometry columns are preserved so the custom extraction function can be simplified. Done means visium_hd() can use ShapesModel.parse() without losing those columns.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
data
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.