-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Export>Save Features As... : Omits records with NULL geom when "Current Layer Extent" is pressed #58599
Comments
@multiquadric, since you have set the option "Extent (current: layer)" (why have you set such option?), then IMHO the intended behavior should be to only export features having the associated geometry that is within the current layer extent and it seems to me that a null geometry (or a feature without an associated geometry) cannot be considered to be within the current layer extent. |
The example file allows one to reproduce the error. It is unexpected behavior. The original data contained over 100,000 points. The intended behavior should not differ with this option. Changing the data representation ought not be a filter. The behavior is not documented (AFAICT). For the moment, this is a QGIS question. Is the API call correct? Were assumptions made? As time permits, this bug will find its way to GDAL. A feature request, for GDAL (ogr2ogr) would be to have see input feature counts and output feature counts. A simple flag. |
I disagree. These features do not lie within the filter extent, so should clearly be omitted from the export. |
@nyalldawson It is not a filter. Please do not muddy the waters. Thank you. The generation of the layer extents is an ordinary task. There was neither an ask nor guidance (that I have seen) regarding the culling of records absent geom. It is entirely reasonable to expect a clean change in the data format. |
What would you call it then?
Please give me SOME credit here. https://github.com/qgis/QGIS/graphs/contributors I know what I'm talking about! 🤣 |
The notion of exporting data from one format to another is easy to grasp. The subtleties (advantages and disadvantages) are not (so easy). It is reasonable to expect the data to be preserved unless an action is taken place to remove some features (e.g. those with NULL geom). If we assume setting the extent will filter data, then the same should be explicitly documented. Who reads documentation? Perhaps a warning should be available to a user somewhere in the process: 48 features exported (converted, ...) and 2 features dropped. Why? It is not unusual to find data that are being managed in odd and different ways. Deleting a feature? An intermediate steps may be to first delete the positional information. Later, the record (attribution) may also be deleted. Not uncommon. There is no need to point out countries and agencies publishing data with this strategy. Or companies. Supposing only the documentation were to be changed? OK, however let's also see a change in the GUI for the user. The use case is not relevant, but suffice it say that a bounding box was a part of a pipeline for handling a large amount of data. The extents were required. It is clear now that such a pipeline will have an extra step, or perhaps skip QGIS entirely and use ogr2ogr directly. Docs?
The former was the goal for me. Filtering was not the intent. Cheers. |
The QGIS project highly values your report and would love to see it addressed. However, this issue has been left in feedback mode for the last 14 days and is being automatically marked as "stale". |
While we hate to see this happen, this issue has been automatically closed because it has not had any activity in the last 42 days despite being marked as feedback. If this issue should be reconsidered, please follow the guidelines in the previous comment and reopen this issue. |
What is the bug or the crash?
GeoJSON input. CSV output. Pressed "Current Layer Extent" and two records were not exported (converted, from GeoJSON, to CSV).
Steps to reproduce the issue
gn_50000-6.geojson.txt
Versions
<style type="text/css"> p, li { white-space: pre-wrap; } </style>Active Python plugins
Socrata
2.2
Coordtransform
1.1
latlontools
3.7.0
wfs_styler
1.0.1
gml_application_schema_toolbox
1.3.1
processing
2.12.99
grassprovider
2.12.99
db_manager
0.1.20
MetaSearch
0.3.6
Supported QGIS version
New profile
Additional context
Absent any warning, it was a surprise to see two records omitted from a large dataset.
It is not clear, to me, if the ogr2ogr call in QGIS can be duplicated at the command-line. One cannot see what parameters were passed to ogr2ogr.
The text was updated successfully, but these errors were encountered: