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

No option to force input format for streams #110

Open
dodinh opened this issue Dec 11, 2024 · 0 comments
Open

No option to force input format for streams #110

dodinh opened this issue Dec 11, 2024 · 0 comments

Comments

@dodinh
Copy link

dodinh commented Dec 11, 2024

There is currently no way to force an input format when using stream input.

Example: I want to convert a string in a CSV format:

let input = "wkt,\n\"POINT(10 20)\"";
let stream = Readable.from(input);
let output = await ogr2ogr(stream, { format: "geojson" });

This produces the following command:

ogr2ogr -f geojson -skipfailures /vsistdout/ /vsistdin/

and doesn't parse my input.

If we could optionally supply an input format, the command could look like this:

ogr2ogr -f geojson -skipfailures /vsistdout/ CSV:/vsistdin/

which works as expected.

(Using wavdev/ogr2ogr v5.1.0, ogr2ogr v3.8.4)

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

1 participant