Skip to content

Add converter from WKT2 to PROJJSON strings #150

@juliohm

Description

@juliohm

Issue

The GeoParquet specification does not adhere to OGC WKT-CRS standards, and instead relies on PROJJSON strings.

Therefore, we need to convert from our native CoordRefSystems.wkt2 strings added in JuliaEarth/CoordRefSystems.jl#245 to the PROJJSON encoding in order to save data in GeoParquet format.

Bounty

Our current implementation, which can be found here, relies on external calls to GDAL:

function projjsonstring(code; multiline=false)
  spref = spatialref(code)
  wktptr = Ref{Cstring}()
  options = ["MULTILINE=$(multiline ? "YES" : "NO")"]
  GDAL.osrexporttoprojjson(spref, wktptr, options)
  unsafe_string(wktptr[])
end

We need to rewrite this function in terms of CoordRefSystems.wkt2(code), parsing the resulting string into a valid PROJJSON.

A Julia-native solution that

  1. satisfies the PROJJSON schema
  2. matches the GDAL results to the best extent possible
  3. adheres to our code style and is tested with most relevant CRS codes

will get a /bounty $250.

Tips

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions