[Qgis-developer] Issue with Shapefile creation algorithm

Jean-Christophe Bastin jcbastin at thelis.be
Mon Mar 21 02:36:50 PDT 2016


I just found the "checking tool" of geometry in the Vector menu of QGIS.
It tells me "Unknown geometry type 0", "The geometry has 1 error".
But in my algorithm, I put 5 as type, as explained in specifications.
 From where comes this 0 ? ...

Regards,

JCB

Le 21/03/2016 10:16, Jean-Christophe Bastin a écrit :
> Thank you for the answer Maximilian
>
> Indeed, the Python console shows me None for some geometries.
> Do you know any tool that can analyse what's wrong with the shape ?
> Maybe something that can translate the shp file into a readable format 
> according to specifications from 
> https://www.esri.com/library/whitepapers/pdfs/shapefile.pdf ?
>
> Regards,
>
> JCB
>
> Le 18/03/2016 14:54, Maximilian Krambach a écrit :
>> For the one shape I get 7 valid and one "none" geometries (the last
>> feature).
>> for the other shape, just a "none" geometry
>>
>> It seems that some "end of file" is off.
>>
>> Function I used with the python console in QGIS:
>>
>> layer = iface.activeLayer()
>> for feature in layer.getFeatures():
>>      print feature
>>      print feature.geometry()
>> print layer.featureCount()
>>
>>
>> Am 18.03.2016 um 14:18 schrieb Jean-Christophe Bastin:
>>> Hi QGIS Developers :-)
>>>
>>> I asked some help on QGIS support, but they told me that I don't ask my
>>> question at the right place, and that I should go througth developers
>>> email list.
>>> That's why I'm here. So let me explain what's going on.
>>>
>>> I developped an application with a class able to read data from an
>>> Oracle database with MapXtreme (MapInfo), 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 that I tried to open in QGIS :
>>> - 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.
>>> I have no problem when I open these files with MapInfo.
>>> I don't have ArcMap to check on this side.
>>> The support told me they were not able to open my files with SAGA, 
>>> but I
>>> downloaded SAGA GIS 2.2.3 and was able to open the file without any 
>>> issue...
>>>
>>> According to QGIS support, it looks like an issue in my creation
>>> algorithm, but I really don't see what's wrong, it seems to follow well
>>> the ESRI specifications.
>>> I'm not a "GIS expert", so maybe some of you could help me to discover
>>> what's wrong.
>>> Or if you have any GIS tool that can tell me what's not correct in my
>>> shapefile, it could really help me.
>>>
>>> You can find in attachment the source code of my class in VB.Net.
>>>
>>> Many thanks !
>>>
>>> Regards,
>>>
>>> JCB
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> _______________________________________________
>>> Qgis-developer mailing list
>>> Qgis-developer at lists.osgeo.org
>>> List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
>>> Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer
>>>
>> _______________________________________________
>> Qgis-developer mailing list
>> Qgis-developer at lists.osgeo.org
>> List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
>> Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer
>
> _______________________________________________
> Qgis-developer mailing list
> Qgis-developer at lists.osgeo.org
> List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer



More information about the Qgis-developer mailing list