[Mobilitydb-users] Loading Moving Feature JSON to Mobility DB?

Andrew Koure andrew at koure.org
Fri Apr 11 13:16:06 PDT 2025


Dear Esteban,
Thanks for the advice!

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.

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.

All the Best,
Andrew

On Fri, Apr 11, 2025 at 12:25 PM Esteban Zimanyi <estebanzimanyi at gmail.com>
wrote:

> Dear Andrew
>
> As part of our CI tests we do the following kind of queries to ensure that
> the input/output for MFJSON works correctly.
>
> --------------------------------------------------------------
> test=# SELECT COUNT(*) FROM tbl_tgeompoint WHERE asEWKT(temp) !=
> asEWKT(tgeompointFromMFJSON(asMFJSON(temp)));
>  count
> -------
>      0
> (1 row)
>
>
> test=# SELECT COUNT(*) FROM tbl_tgeompoint3D WHERE asEWKT(temp) !=
> asEWKT(tgeompointFromMFJSON(asMFJSON(temp)));
>  count
> -------
>      0
> (1 row)
>
> test=# SELECT COUNT(*) FROM tbl_tgeogpoint WHERE asEWKT(temp) !=
> asEWKT(tgeompointFromMFJSON(asMFJSON(temp)));
>  count
> -------
>      0
> (1 row)
>
> test=# SELECT COUNT(*) FROM tbl_tgeogpoint3D WHERE asEWKT(temp) !=
> asEWKT(tgeompointFromMFJSON(asMFJSON(temp)));
>  count
> -------
>      0
> (1 row)
> --------------------------------------------------------------
>
> Therefore you should be able to able to input and output in MFJSON format.
>
> Please let us know if you find any issues on this.
>
> Esteban
>
> On Fri, Apr 11, 2025 at 6:12 PM Andrew Koure via Mobilitydb-users <
> mobilitydb-users at lists.osgeo.org> wrote:
> >
> > Hello All,
> > I have a program that is generating moving feature JSON, and I am
> looking to load the JSON into MobilityDB.
> >
> > 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.
> >
> > Thanks in Advance,
> > Andrew
> > _______________________________________________
> > Mobilitydb-users mailing list
> > Mobilitydb-users at lists.osgeo.org
> > https://lists.osgeo.org/mailman/listinfo/mobilitydb-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mobilitydb-users/attachments/20250411/049f6855/attachment.htm>


More information about the Mobilitydb-users mailing list