rgeo/activerecord-postgis-adapter

How are @time and @speed to be formatted in a multilinestring point for the values to be extracted?

tyrauber opened this issue · 2 comments

I am using activerecord-postgis-adapter in a rails app to import and manipulate geojson data in postgis. I have been using a multlinestring geojson with point arrays containing [@lng, @lat, @elevation, @time]. rgeo perfectly extracts, @lat, @lng, @elevation, but not @time. I have added @time (epoch time in ms) as the 4th value in the point array, but perhaps that isn't the right place or format? rgeo is not able to properly extract the time. I understand that time isn't specifically part of the gejson spec, but it seems like time and speed have been defined in rgeo.

How is rgeo expecting @time and @speed to be formatted in a linestring point for the values to be extracted?

"#<GPX::TrackPoint:0x0000000106967a10 @gpx_file=nil, @lat=43.11, @lon=6.15, @elevation=122.05, @time=nil, @speed=nil, ...

@tyrauber what type of factory are you using? You may need to manually specify a *ZM factory in order to get all 4 values back.

hey @keithdoggett, Sorry, forgot to update this. You are correct, I was able to resolve this with GeometryZM.