No, your records have the same SRID as the rest of the records in your table.
I've tested your code on one of my spatial tables. And, surprise! I've observed the same problem:
How did I've resolved? By loading the table as a layer in QGIS. Then checking the geometry validity,
this was the result:
It is true, I have a lot of other errors, but repairing the invalide shapes, I was able to eliminate those nasty white lines.
Today I've faced again the white lines problem, working on another table. As you can see bellow, there is a white line (741):
No big deal, I've said, I need only to follow my own advice and to check the table geometry validity. But again, another surprise: the feature 741 is missing from the non-valid list:
Now really I'm in trouble! Inside QGIS, the shape is in its place, it is valid but why on earth I cannot see it in PgAdmin? I've had the idea to go to the PostGIS site and here is what I have found: pgAdmin shows no data:
Every one or two months, someone asks on the PostGIS users list usually somewhat panicked, My geometry is missing when I look in pgAdmin III.
Spatial objects can be big things and if your geometry, geography, or raster row field is big enough, pgAdmin is not going to load it and will just show an empty field. This is by design. There are a couple of ways to verify you really have data.
Ok, I've understand there isn't really a problem, but because I was able to solve some shapes by cleaning their wrong vertices, I've realize that, when you have a shape with a lot of vertices, if you are sure that it is valid, you have nothing to worry about!
I've followed the site advice and I've checked there is really data:
As you can see, I have 0 null geometries.
Eventually I was curious to see how really big was that shape. For this task I've used the following script:
layer = qgis.utils.iface.activeLayer()
iter = layer.getFeatures()
for feature in iter:
geom = feature.geometry()
if geom.type() == QGis.Line:
x = geom.asPolyline()
feature_vertices = len(x)
print "Feature %d: Vertices %d" % (feature.id(), len(x))
# other geometry type
print "Other geometry type"
And here is the script running result:
Yet what to do when the user understands why the data weren't shown, but really need to see the values behind those white lines?
In this case just export the query result into a file, and everything will be ok, as it must be:
Steps to solve similar problems:
Assure yourself that you have 0 null geometries.
if you have a data output greater than 0:
bad luck; you have features with null geometry (but, at least, you know the real cause)
if you are not sure about the geometry validity:
check geometry validity
clean the excessive points avoiding intersections
if now you can see the missing data:
you've done a good job (in fact, your shape has not so much vertices...)
the shape have too many vertices to be displayed in a single row
(optionally) you can count the vertices number
your data are safe and ok, so why bother running all those boring tasks?
just perform a query export as a file, and the data will be inside!