Skip to content

[FR] Type conversions #123

Open
Open

Description

@KronosTheLate

I just just now tring to use this package to convert a list of Points into a MultiPoint, and was supprised to finy myself unable to do so. Looking at the docstrings, string to guess how to construct a MultiPoint, and reading the online documentation proved unhelpful. Could it really be that the only available features right now are reading, writing, and converting to a table?

In any case, I think there sure are some type conversions that make sense, or at least some constructors that can be defined. The obvious onces are an iterable of Point into a MultiPoint, and equivalent for Polygon and LineString.

Activity

  1. asinghvi17 commented on Jun 1, 2026

    @asinghvi17
    Member

    It is, usually you would use a GeoInterface wrapper type to create a multipoint out of an array of points. We should have some more ecosystem-wide documentation for this in the next month or so.

    But the idea of all these writer packages (GeoJSON.jl, Shapefile.jl, GeoParquet.jl, WellKnownGeometry.jl, etc.) is specifically that you can read some GeoInterface compatible thing, write consuming some GeoInterface compatible thing, and get a table. Anything else should go through GeoInterface.

  2. KronosTheLate commented on Jun 1, 2026

    @KronosTheLate
    Author

    Well in that case, I see a quite nice soluition here: Those last two sentences would be really nice to have as the start of both the readme and documentation page for each of the writer packages.

    EDIT: skimming the docs for GeoInterface was rather intimidating in the sense that it talked a lot abouth things I know nothing about. And even knowing that I should be able to lean how to convert a list of points into a multipoint, I was unable to figure it out from skimming the docs. So that just goes to say that going to GeoInterface to do this did not feel terribly easy, and that I would likely have assumed that it was the wrong package for my use case if I was exploring this alone. I am not sure what the best solution would be though... Showing some simple operation from reading, transforming and writing a geojson file inthe GeoJSON.jl readme would go a long way, even if it feels somewhat messy to showcase GeoInterfaces in other packages... But the current state is not great either, so I would prefer that messyness for the added availability of the capabilities provided.

  3. asinghvi17 commented on Jun 2, 2026

    @asinghvi17
    Member

    Thanks for the feedback, yeah that would definitely be great. I'll probably have a bit of time next week to PR but if you have time before then feel free

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions