Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for WKT conversion #1

Closed
duncandewhurst opened this issue Aug 21, 2023 · 5 comments
Closed

Support for WKT conversion #1

duncandewhurst opened this issue Aug 21, 2023 · 5 comments

Comments

@duncandewhurst
Copy link
Collaborator

We'll need to decide how to handle Flatten Tool's WKT conversion option. That will be informed by the outcome of GFDRR/rdls-spreadsheet-template#9 and OpenDataServices/flatten-tool#429.

@duncandewhurst
Copy link
Collaborator Author

We are using WKT for geometries in the spreadsheet template so we'll need to set the wkt option in Flatten Tool's kwargs.

@radix0000
Copy link
Collaborator

Added "convert_wkt": True

@duncandewhurst
Copy link
Collaborator Author

Doesn't seem to be working when testing with wkt.xlsx:

Expected output, as returned by flatten-tool unflatten -s schema/rdls_schema.json -m datasets -f xlsx --convert-wkt ../rdls-cove/test_data/wkt.xlsx:

{
    "datasets": [
        {
            "id": "1",
            "spatial": {
                "geometry": {
                    "type": "Polygon",
                    "coordinates": [
                        [
                            [
                                30.0,
                                10.0
                            ],
                            [
                                40.0,
                                40.0
                            ],
                            [
                                20.0,
                                40.0
                            ],
                            [
                                10.0,
                                20.0
                            ],
                            [
                                30.0,
                                10.0
                            ]
                        ]
                    ]
                }
            }
        }
    ]
}

Actual output from CoVE:

{
  "datasets": [
    {
      "id": "1",
      "spatial": {}
    }
  ]
}

Resulting error:

image

@radix0000
Copy link
Collaborator

Was a flattentool version issue. Let me know if looks good now.

@duncandewhurst
Copy link
Collaborator Author

Looks good to me. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants