OK, I will do that.
I had thought about that before, it is doesn't feel intuitive to read tens
of thousands of features from a layer and then just ignore/delete them. I
had hope that with the filter I could get better performance by not reading
them at all.
But it seems that's not how it works wi
Le mardi 04 mars 2014 21:41:45, agerrius a écrit :
> > Only set the filter on the multipolygons layer.
>
> But if I don't set any filter on the other layers I do get all other point
> and line features (for example highway, etc). And I don't want them, I for
> example only want landuse features. S
> Only set the filter on the multipolygons layer.
But if I don't set any filter on the other layers I do get all other point
and line features (for example highway, etc). And I don't want them, I for
example only want landuse features. So I want no features to be returned
from layers that don't h
Le mardi 04 mars 2014 20:56:59, agerrius a écrit :
> Even,
>
> In my actual application I am looping over all layers, but it still doesn't
> work.
>
> But from your feedback I now know what is going wrong. My problem is what
> to do with layers that don't contain the field I am filtering on. If I
agerrius agerrius.nl> writes:
> So how would one get all the OSM features that have an attribute landuse? As
> you can see I used "landuse IS NOT NULL" for the attribute filter. But if I
> set that on the points layer I get an error, since there are no landuse
> points. How can I set the filter
Even,
In my actual application I am looping over all layers, but it still doesn't
work.
But from your feedback I now know what is going wrong. My problem is what to
do with layers that don't contain the field I am filtering on. If I apply
the filter to them and error is thrown (ERROR 1: 'landuse'
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
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();
Even,
No, this is not the same problem as before. With the changes we discussed
before I did get the filter to work perfectly. But now when I add the
do-while loop around it for the interleaved reading I get unexpected results
again.
I'll try to isolate the problem in a small sample program tonig
Le dimanche 02 mars 2014 21:26:39, agerrius a écrit :
> Thanks for the answer.
>
> I do have a question about the interleaved mode. I have trouble to combine
> it with the SetAttributeFilter command on a layer. I have the impression
> that when the first "slice" of the interleaved reading doesn't
Thanks for the answer.
I do have a question about the interleaved mode. I have trouble to combine
it with the SetAttributeFilter command on a layer. I have the impression
that when the first "slice" of the interleaved reading doesn't contain any
features that match the filter, that the reading sto
Le dimanche 02 mars 2014 17:59:49, agerrius a écrit :
> Even,
>
> Thanks for the quick reply and the quick fix.
>
> I'm looking at implementing the interleaved reading in my code as well,
> since some files throw an error with the normal reading mode. Are you
> saying this issue will not happen w
Even,
Thanks for the quick reply and the quick fix.
I'm looking at implementing the interleaved reading in my code as well,
since some files throw an error with the normal reading mode. Are you saying
this issue will not happen with interleaved reading mode?
Arno
--
View this message in conte
Le dimanche 02 mars 2014 15:47:37, agerrius a écrit :
> Hi all,
>
> I'm using the OGR libraries from a C# application to read OSM data. But I
> have a problem now, with a certain file the reading of the features
> "stalls". It seems GetNextFeature() never returns anything.
>
> When I use ogrinfo
Hi all,
I'm using the OGR libraries from a C# application to read OSM data. But I
have a problem now, with a certain file the reading of the features
"stalls". It seems GetNextFeature() never returns anything.
When I use ogrinfo -al on the same file it also seems to stall (probably at
the same po
15 matches
Mail list logo