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

ogrinfo: add -skip-null #9944

Open
jidanni opened this issue May 16, 2024 · 0 comments
Open

ogrinfo: add -skip-null #9944

jidanni opened this issue May 16, 2024 · 0 comments

Comments

@jidanni
Copy link
Contributor

jidanni commented May 16, 2024

Feature description

I'm not sure the following feature request is worthwhile, because the user could always just grep -v the results that are bothering them, but here goes anyway:

Sometimes half a file might be filled with nulls,

$ ogrinfo $@ -al | grep --fixed-strings --count ' = '
512910
$ ogrinfo $@ -al | grep --fixed-strings --count ' = (null)'
263320

You know, page upon page of

FRSTDIVNO (String) = 22
FRSTDIVDUP (String) = 0
FRSTDIVLAB (String) = 22
SECDIVID (String) = IL020180N0140W0SN220
SECDIVTYP (String) = (null)
SECDIVTXT (String) = (null)
SECDIVNO (String) = (null)
SECDIVSUF (String) = (null)
SECDIVNOTE (String) = (null)
SECDIVLAB (String) = (null)
SURVID (String) = (null)
SURVTYP (String) = (null)
SURVTYPTXT (String) = (null)

So maybe have a -nonull or -skip-null option, that would act like

| grep --fixed-strings --invert-match ' = (null)'

i.e., leaving just the

FRSTDIVNO (String) = 22
FRSTDIVDUP (String) = 0
FRSTDIVLAB (String) = 22
SECDIVID (String) = IL020180N0140W0SN220

without needing an additional grep process, or some massive -sql or -where, with sub-quires.

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

No branches or pull requests

1 participant