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

Tracking bug for kart export command (vector / table) #992

Open
olsen232 opened this issue May 10, 2024 · 2 comments
Open

Tracking bug for kart export command (vector / table) #992

olsen232 opened this issue May 10, 2024 · 2 comments
Labels
enhancement New feature or request meta Meta issue for a larger set of issues/PRs/tasks

Comments

@olsen232
Copy link
Collaborator

olsen232 commented May 10, 2024

kart import lets you take a non-Kart dataset and import it to Kart.
There's no opposite command that takes a Kart dataset and exports it as some non-kart dataset type.

(Except that, if you really need to, you can use the working-copy creation functionality to export a dataset, or, use ogr2ogr on the contents of your working copy, or use ogr2ogr plus the experimental OGR driver in checked into contrib/.

This is the tracking bug for adding a kart export command. It will use GDAL OGR drivers internally and so will immediately support export to most anything that OGR supports, and it will feel familiar for anyone used to using ogr2ogr.

A downside to this approach is that we might have a bit more OGR behaviour / bugs than we want, until and unless we special case them or work around them. For example:

  • Connection strings for postgres / MSSQL drivers will have to be in the format that OGR expects, not the format that Kart expects.
  • OGR's type system doesn't have NUMERIC as a separate type from INTEGER / FLOAT, so handling of these types tends to be a bit inconsistent - this is one reason that kart import mostly doesn't use OGR any more.

(This issue is just for vector + tabular datasets - kart export for raster or point cloud datasets will need a separate command to be written. Using the working copy contents + gdal_translate or pdal translate works okay for exporting those formats in the meantime)

@olsen232 olsen232 added enhancement New feature or request meta Meta issue for a larger set of issues/PRs/tasks labels May 10, 2024
@olsen232
Copy link
Collaborator Author

Implemented in the following PRs:
#988
#990
#991

@olsen232 olsen232 changed the title Tracking bug for kart export command Tracking bug for kart export command (vector / table) May 10, 2024
@olsen232
Copy link
Collaborator Author

Mostly done except I should update the docs at https://docs.kartproject.org/en/latest/pages/command_reference.html

Possible future enhancements:

  • export for raster and point clouds
  • export lots of things at once eg kart export --all-tables
  • prevent the user (or at least warn them against) exporting data into the working copy that kart is already maintaining

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request meta Meta issue for a larger set of issues/PRs/tasks
Projects
None yet
Development

No branches or pull requests

1 participant