Skip to content

Extracting SRID from metadata CRS #1421

@sunng87

Description

@sunng87

I'm trying to get the SRID from geoarrow metadata, for postgis.

Reading the docs from CRS struct, I saw it's a wrapper of PROJJSON. I learned PROJJSON structure may look like this:

{
  "type": "GeographicCRS",
  "name": "WGS 84",
  "id": {
    "authority": "EPSG",
    "code": 4326
  },
  ...
}

But from the test cases of CRS module it seems we could have other representations fo SRID.

So my question is:

  • What would be the standard way to extract SRID from the CRS metadata?
  • Is it possible to add something srid(&self) -> Option<u64> to CRS?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions