<div dir="ltr"><div>Currently I am writing a python program to aggregate GTFS-RT vehicle positions. I'm looking to both save this data in Moving Feature JSON for archiving, and also load it to MobilityDB to build out some analysis. </div><div><br></div><div>Some example Moving Feature JSON from the program is here: <a href="https://github.com/ankoure/gtfspb_2_mfjson/tree/main/sample_mf_json">https://github.com/ankoure/gtfspb_2_mfjson/tree/main/sample_mf_json</a></div><div><br></div><div>The JSON is laid out in the toMFJSON method here: <a href="https://github.com/ankoure/gtfspb_2_mfjson/blob/main/code/helpers/Entity.py">https://github.com/ankoure/gtfspb_2_mfjson/blob/main/code/helpers/Entity.py</a></div><div><br></div><div>If it would be easier to load to mobilitydb using pymeos I'm open to doing that as well. However I'm also not sure that I am laying out the Moving Feature JSON correctly. </div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sat, Apr 12, 2025 at 7:44 AM SCHOEMANS Maxime <<a href="mailto:maxime.schoemans@ulb.be" target="_blank">maxime.schoemans@ulb.be</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><u></u>




<div>
<font face="monospace">Hi Andrew,<br>
<br>
I believe that tgeompointFromMFJSON requires a TemporalGeometry object as input, instead of a full MovingFeature object.<br>
Could you try to use the value of your TemporalGeometry field as input instead of the complete JSON?<br>
<br>
Additionally, could you explain your use-case in more detail and maybe give an example MFJSON that you want to input in MobilityDB?<br>
Do you want to produce a single tgeompoint object out of it, or does the MFJSON also have additional temporal properties (speed, etc.) that you also want to input?<br>
This would give us a better idea of how these functions are used in practice.<br>
If these functions work differently to how you might expect them to, don't hesitate to let us know so we can potentially improve their documentation or their behavior.<br>
<br>
Best regards,<br>
Maxime<br>
</font><br>
<div>On 12/04/2025 06:16, Andrew Koure via Mobilitydb-users wrote:<br>
</div>
<blockquote type="cite">
<div dir="ltr">Dear Esteban, 
<div>Thanks for the advice! </div>
<div><br>
</div>
<div>I am receiving this error: SQL Error [XX000]: ERROR: Invalid 'type' value in MFJSON string. The types for my TemporalProperties objects are "Measure", on temporalGeometry it is "MovingPoint", and the top level type is Feature. </div>
<div><br>
</div>
<div>I suspect that I may not be formatting my MFJSON files correctly, is there a way to validate MFJSON easily? I can also send some examples if that is helpful. </div>
<div><br>
</div>
<div>All the Best, </div>
<div>Andrew</div>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">On Fri, Apr 11, 2025 at 12:25 PM Esteban Zimanyi <<a href="mailto:estebanzimanyi@gmail.com" target="_blank">estebanzimanyi@gmail.com</a>> wrote:<br>
</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div dir="ltr">
<div dir="ltr">Dear Andrew
<div><br>
</div>
<div>As part of our CI tests we do the following kind of queries to ensure that the input/output for MFJSON works correctly.</div>
<div><br>
</div>
<div>--------------------------------------------------------------</div>
<div>test=# SELECT COUNT(*) FROM tbl_tgeompoint WHERE asEWKT(temp) != asEWKT(tgeompointFromMFJSON(asMFJSON(temp)));<br>
 count<br>
-------<br>
     0<br>
(1 row)</div>
<div><br>
</div>
<div><br>
test=# SELECT COUNT(*) FROM tbl_tgeompoint3D WHERE asEWKT(temp) != asEWKT(tgeompointFromMFJSON(asMFJSON(temp)));<br>
 count<br>
-------<br>
     0<br>
(1 row)</div>
<div><br>
</div>
<div>test=# SELECT COUNT(*) FROM tbl_tgeogpoint WHERE asEWKT(temp) != asEWKT(tgeompointFromMFJSON(asMFJSON(temp)));<br>
 count<br>
-------<br>
     0<br>
(1 row)<br>
<br>
test=# SELECT COUNT(*) FROM tbl_tgeogpoint3D WHERE asEWKT(temp) != asEWKT(tgeompointFromMFJSON(asMFJSON(temp)));<br>
 count<br>
-------<br>
     0<br>
(1 row)<br>
--------------------------------------------------------------<br>
<br>
</div>
<div>Therefore you should be able to able to input and output in MFJSON format.</div>
<div><br>
</div>
<div>Please let us know if you find any issues on this.</div>
<div><br>
</div>
<div>Esteban</div>
<div><br>
</div>
<div>On Fri, Apr 11, 2025 at 6:12 PM Andrew Koure via Mobilitydb-users <<a href="mailto:mobilitydb-users@lists.osgeo.org" target="_blank">mobilitydb-users@lists.osgeo.org</a>> wrote:<br>
><br>
> Hello All, <br>
> I have a program that is generating moving feature JSON, and I am looking to load the JSON into MobilityDB.
<br>
><br>
> Does anyone have guidance on how best to do this? I've tried looking through the documentation for MovingPandas, MobilityDB, and MEOS. Most of what I have found so far is for writing out to MFJSON.
<br>
><br>
> Thanks in Advance, <br>
> Andrew<br>
> _______________________________________________<br>
> Mobilitydb-users mailing list<br>
> <a href="mailto:Mobilitydb-users@lists.osgeo.org" target="_blank">
Mobilitydb-users@lists.osgeo.org</a><br>
> <a href="https://lists.osgeo.org/mailman/listinfo/mobilitydb-users" target="_blank">
https://lists.osgeo.org/mailman/listinfo/mobilitydb-users</a></div>
</div>
</div>
</blockquote>
</div>
<br>
<fieldset></fieldset>
<pre>_______________________________________________
Mobilitydb-users mailing list
<a href="mailto:Mobilitydb-users@lists.osgeo.org" target="_blank">Mobilitydb-users@lists.osgeo.org</a>
<a href="https://lists.osgeo.org/mailman/listinfo/mobilitydb-users" target="_blank">https://lists.osgeo.org/mailman/listinfo/mobilitydb-users</a>
</pre>
</blockquote>
<br>
</div>

</blockquote></div>