[postgis-users] gps points to postgis

Markus Schaber schabios at logi-track.com
Tue Nov 2 11:50:40 PST 2004


Hi, Mike,

On Tue, 2 Nov 2004 08:39:10 +0200
Mike Jackson <mj at sci.fi> wrote:

> > Do you really have one line segment that is 8500 GPS points, or do you 
> > have multiple segments?
> 
> It has 8500 points in one segment. This is actually a file from a friend,
> so I hadn't really understood it's generation or looked that closely at
> it before. Upon closer inspection, it seems like there is a new pointline
> for every second over a period of about 2h 45m.
>
> The real question here is "What is the maximum amount of points that it makes
> sense to store in one LINESTRING record?".

I think, in your case, it absolutely makes sense to store 8500 points in
a single Linestring, as it is a single trip.

As soon as your objects are large enough, you need this much points to
describe them with the needed accuracy.

Here's an example from our navteq database, the admin boundaries:

logigis=# select npoints(geom) as np,count(*) from admin_area_bnd group by np order by np desc limit 10;
   np   | count 
--------+-------
 344168 |     1
 291424 |     1
 138826 |     2
 107663 |     1
  71412 |     2
  67092 |     1
  65594 |     1
  62626 |     1
  62427 |     1
  61670 |     2

Okay, I admit this are polygons and not linestrings, but the message
should be clear. (The duplicates come from the same areas having more
than one name, this comes from the non-perfect orthogonalization of the
navteq data.)

HTH,
Markus

-- 
markus schaber | dipl. informatiker
logi-track ag | rennweg 14-16 | ch 8001 zürich
phone +41-43-888 62 52 | fax +41-43-888 62 53
mailto:schabios at logi-track.com | www.logi-track.com



More information about the postgis-users mailing list