tdmorello / napari-geojson

BSD 3-Clause "New" or "Revised" License
2 stars 1 forks source link

Read and add Point and MultiPoint geometries as separate napari layers #6

Closed NHPatterson closed 2 years ago

NHPatterson commented 2 years ago

This PR changes a few things to allow reading in points. Essentially the reader logic checks for Point and MultiPoint geometries and if MultiPoint, creates an individual layer (each MultiPoint in the geojson gets its own Points layer). Individual points that are not grouped into a MultiPoint layer are collated into a single Points layer. Properties are maintained. Once points layers have been made, shape layers from polygon and line string data are constructed.

This also tweaks a few things to support the basic output being multiple layer data tuples. For QuPath geojson files, the is_polyline had a type check on geom that didn't work as intended because QuPath geom's have type Feature.

Let me know your thoughts, happy for any changes you'd like to see.

tdmorello commented 2 years ago

Thank you so much for your pull request! I will take a look later today. (Sorry, I've been very busy at work)

arundasan91 commented 2 years ago

Hello @NHPatterson, thanks a lot for working on this! I was wondering how I can import QuPath annotations to Napari. @tdmorello , could you please check this again when you get a chance? This would be a very good addition to a lot of us.

Thanks, Arun

tdmorello commented 2 years ago

I'm terribly sorry for the delay. I'm merging your request. Thank you so much for your contribution!