Open theamnesic opened 4 months ago
Hi, thanks for the question, and sorry for the delay. I had much stuff going on in life 😄. I'll try to get to it asap. In the meantime, you can try dev-recursive
version from #36 if it works for you. Let me know.
HI!
I tried this:
$datas = Items::fromFile('datas/50041.json', ['recursive' => true]);
foreach ($datas as $data) {
foreach ($data as $d) {
foreach ($d as $dKey => $dValue) {
if ($dKey === 'properties') {
if ($dValue->contenance == 248) {
echo $dValue->commune;
echo $dValue->section;
echo $dValue->numero;
}
}
}
}
}
... but it doesn't seem more efficient.
Is it the good way to use recursive ?
What exactly do you mean by efficient? Quicker or less memory usage?
This is the same execution time with the two methods.
Yes. The recursive method is there to lower memory consumption in bigger subtrees. The speed is more or less the same.
Hi!
I'm working with GeoJSON large files. An example of entry:
I only need some
properties
informations likecontenance
,section
andnumero
. From now, I using this:But, I don't need
geometry
who takes a lot of time to load. So I tried to use this more precise pointer:But JSON Machine don't return an object...
So, is it possible to pointer GeoJSON
properties
as an object with JSON Machine without loadgeometry
?Thanks!