Re: [gdal-dev] Missing features after copying layers from Shapefiles to SQLite

2014-03-03 Thread Nik Sands
Thanks Chaitanya, It's finally dawned on me that this is what the following is about in the OGR SQLite format web page: Tables with multiple geometries Starting with OGR 1.10, tables that have multiple geometry columns registered in geometry_columns can be used by OGR. For such tables, there a

Re: [gdal-dev] Missing features after copying layers from Shapefiles to SQLite

2014-03-03 Thread Chaitanya kumar CH
Nik, One option I frequently use when uploading shapefiles to PostGIS is to set the -nlt option in ogr2ogr. Setting it as multipolygon/multilinestring/multipoint for a shapefile defined as polygon/linestring/point usually overcomes the problem. Check if Spatialite allows adding single geometries

Re: [gdal-dev] Missing features after copying layers from Shapefiles to SQLite

2014-03-03 Thread Nik Sands
So now, instead of the 'OGR_DS_CopyLayer', I'm using the code below to run SQL queries to split each layer from the source data set into multiple layers in the destination (Spatialite) dataset based on the geometry types. (The addNewLayerNames: method will not add empty layers). It appears to

Re: [gdal-dev] Missing features after copying layers from Shapefiles to SQLite

2014-03-03 Thread Nik Sands
Thanks for this tip. I think you're on the right track with mixing single line strings with multi line strings and single polygons with multi polygons. (I don't think the number of features is causing any problems as it happens for some very small groups of features also.) It appears as though

Re: [gdal-dev] C# OGR reading OSM features "stalls"

2014-03-03 Thread Even Rouault
Arno, > > Now if I enable interleaved reading and add the extra do-while loop around > my code I get 0 features returned. I only apply the filter to the layer the > first time I go through the loop. > > Ogr.RegisterAll(); > Gdal.SetConfigOption("OGR_INTERLEAVED_RE

Re: [gdal-dev] C# OGR reading OSM features "stalls"

2014-03-03 Thread agerrius
Arno, I have made a small sample to show my problem. It uses the same OSM file as I mentioned above. Hopefully you can see what I did wrong from my code. If I read the data in non-interleaved mode it all works fine, I find 298 features on the layer: Ogr.RegisterAll();