Bug report #14349
Generated shapefile from custom application is not always displayed in QGIS (not resolved)
|Affected QGIS version:||master||Regression?:||No|
|Operating System:||Windows||Easy fix?:||No|
|Pull Request or Patch supplied:||No||Resolution:||invalid|
|Crashes QGIS or corrupts data:||No||Copied to github as #:||22334|
This is following the Bug report #14338 :
I have an issue with Shapefiles opened in QGIS. I developped an application with a class able to read data from an Oracle database, and convert them in Shapefile. This class follows the ESRI specifications from here : https://www.esri.com/library/whitepapers/pdfs/shapefile.pdf You can find in attach 2 samples : - 4480___S12_060_4 : there is only one polygon, but it is not displayed on the map - 4480___327550 : there are 8 polygons in this one, and all of them are well displayed The strange thing is that the polygon from "4480___S12_060_4" is common with "4480___327550", but in one case it is not shown, and in the other case it is shown (see screenshot in attach)... I have no problem when I open these files with MapInfo. I don't have ArcMap to check on this side. Are you able to check if it is a bug from the Shapefile or from QGIS ? I spent some hours to check what's wrong, but I have no more ideas right now... Many thanks.
I got a quick response from Saber Razmjooei, telling me that SAGA also can't read it and that it is an issue in my implementation.
I just downloaded SAGA GIS 2.2.3 and was able to open the file without any issue...
I can accept that the shape could be badly formed because of my implementation, but can you at least guide me how can I check where could be the issue ? Is there any tool that can analyze a shapefile to check what's wrong in it ?
My shapefile opens well in other GIS systems, and I follow the ESRI specifications as explained before.
I'm not a "GIS expert" and if you are sure that the issue comes from my shapefile, a little help at least to know how I can analyze where the problem comes from will be greatly appreciated.
#1 Updated by Saber Razmjooei about 4 years ago
- Status changed from Open to Feedback
Dear Jean-Christophe Bastin,
To get help, I suggest to send an email to QGIS users or developers mailing list, as this is for tracking bugs related to the core qgis code (not even 3rd party plugins).
There might be someone who can look to your code and point you to the right direction.
Hope that helps.
#2 Updated by Nyall Dawson about 4 years ago
First step would be to check if the OGR tools can read your shapefile correctly (eg, try using ogr2ogr to convert the shapefile into a different format and check if all features are present). If not, the bug lies either in the way you are creating the shapefile or in GDAL's handling of the shapefile (QGIS uses the GDAL library to read vector data files such as shapefiles).