You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jul 2, 2019. It is now read-only.
On buildings_AOI_5_Khartoum_img3.geojson the script crashed and I got the traceback below indicating a NULL pointer.
Traceback (most recent call last):
File "createDataSpaceNet.py", line 317, in <module>
bboxResize= args.boundingBoxResize
File "createDataSpaceNet.py", line 110, in processChipSummaryList
entry = lT.geoJsonToSBD(annotationName_cls, annotationName_inst, chipSummary['geoVectorName'], chipSummary['rasterSource'])
File "/path/spacenet_utilities/python/spaceNetUtilities/labelTools.py", line 1066, in geoJsonToSBD
my_inst_segmentation = createInstanceSegmentation(my_raster_source, my_vector_source)
File "/path/spacenet_utilities/python/spaceNetUtilities/labelTools.py", line 1016, in createInstanceSegmentation
cell_array[i] = createSegmentationByFeatureIndex(i, rasterSrc, vectorSrc, npDistFileName='', units='pixels')
File "/path/spacenet_utilities/python/spaceNetUtilities/labelTools.py", line 1004, in createSegmentationByFeatureIndex
dist_trans_by_feature = createDistanceTransformByFeatureIndex(feature_index, rasterSrc, vectorSrc, npDistFileName='', units='pixels')
File "/path/spacenet_utilities/python/spaceNetUtilities/labelTools.py", line 950, in createDistanceTransformByFeatureIndex
Feature_Layer.CreateFeature(my_feature)
File "/path/python2.7/site-packages/osgeo/ogr.py", line 1727, in CreateFeature
return _ogr.Layer_CreateFeature(self, *args)
ValueError: Received a NULL pointer.
The error seems to be caused by the geojson file having no building footprints in it. So the script passes this empty set of footprints to OGR and OGR interprets that as a NULL. I think the solution would be to check for an empty value before passing the value to OGR.
The text was updated successfully, but these errors were encountered:
I ran the code below to convert the Spacenet 2 Khartoum dataset to SBD format.
On
buildings_AOI_5_Khartoum_img3.geojson
the script crashed and I got the traceback below indicating a NULL pointer.The error seems to be caused by the geojson file having no building footprints in it. So the script passes this empty set of footprints to OGR and OGR interprets that as a NULL. I think the solution would be to check for an empty value before passing the value to OGR.
The text was updated successfully, but these errors were encountered: