I have an ogr2ogr bat file to convert SQL to KML that has worked fine for years. All of a sudden the three most recent geometries aren't appearing in the kml file it produces. The error is "ERROR 1: GetNextRawFeature(): Corrupt Data". I have repopulated all fields in case there were dodgy characters and I have recreated the geometries. They looked valid to begin with and are very simple. No self intersections. What could be the cause of this?
3 Answers
I can't explain what caused the problem as these Geometries looked completely valid and normal in GIS and SQL, but I moved the vertices in our mobile GIS (which these were created in by our service provider) and now the errors have disappeared. It was the last three geometries that were problematic so I will get the user to let me know when he next creates a polygon and I'll test again. It sounds like something to do with his device but I'd need to investigate.
Unfortunately, even though the errors have disappeared the geometries still don't display when viewing the kml in Google Earth. I found another one with an error that I fixed but it hasn't fixed the problem. I see the same person created these but what could be causing the problem and any ideas on how to fix? Creating a kml directly from GIS works fine. Adding a buffer to the geometry also works fine.
I have figured it out. It was two issues, corrupt geometries and a new version of the batchfile outputting to a different server, which shouldn't be live yet. I was looking at old kml files not being updated. All good.