[postgis-users] 4d lines and time selects

David Bitner osgis.lists at gmail.com
Mon Jun 27 09:41:27 PDT 2005


I'm looking at a couple different approaches at filtering flight track
data from an airport by both time and space.

Currently, my data is stored in PostGIS as 4-d lines where the 4th
dimension is an offset from the starting time of the line.  Other
attributes with the line are the starting time of the line and the
ending time of the line.  With these lines, I can use spatial
intersections to limit my lines.  I can also use my start time and end
time attributes to simply filter what's in the air.

What I need is to find out exactly what features are intersecting
during my selected time period.  Keeping the features as lines, a good
approximation could be used by limiting the data by simply limiting
the data as above by figuring out what's in the air and then using the
new line subset function and the differences in time between my
requested times and the starting and ending time of the lines to
subset.  This assumes constant speed and so would get me close, but
would still not be as exact as I would like.

The next better, but still not perfect, approach that I am looking at
is to store my flight tracks not as lines, but as individual points
that maintain an id (along with x,y,z, and time)  that could tie them
back together.  To use these, I would want to create an Aggregate
function based on the MakeLine() function so that I could create a
query such as the following:
select MakeLine(geom) from flighttracks where time between x and y
group by id order by time

Eventually, I would like to build the following functions to work on
this type of dataset:
-- show where an aircraft is at a given single time (interpolated
between the points along the line)
-- show segments (and use these segments for intersections, etc.)
interpolated between a given time period

Given the nature that measures and time as common 4th dimensions are
always by nature always increasing or decreasing in a nice orderly
fashion I was wondering what effort it might take to expand the
line_interpolate_point() function and the new line subset function to
a version that worked not off of percentage, but off of the measure or
time values stored in the 4th dimension.

I was hoping that anybody could comment on either of the stopgap
approaches I have presented using existing PostGIS functionality as
well as the creation of line interpolation/subset functions that
utilize the 4th dimension.

Thanks,
David



More information about the postgis-users mailing list