[postgis-users] Who is Using PostGIS?
Christoph Spoerri
spoerri at duke.edu
Mon Mar 8 14:58:23 PST 2004
(sorry for the long post ... )
What a considence, I just started to look at the LRS support. A friend of mine
contacted me the other day and mentioned that this would be a nice feature to
have.
Here's a brief summary of the approach we would like to take (not sure if
everybody is familier with LRS, so please forgive me if I explain well know
facts):
In order to make linear referencing work, we would need to have a measure
value for each point of a linear feature. This is the same approach that's
used in shapefiles. The measure values are then used as reference units to
map events along the line independant of the vertices.
Now, currently the data model in PostGIS allows only X,Y or X,Y,Z coordinates
for each point. Initially we could use the Z coordinate as measure (M) to
come up with a proof of concept system. Later one, we should think about
creating shapes with X,Y,Z,M cooridnates (PointM, MultilineM, etc.).
Next we need to have an 'event' table. The event table can contain point or
linear events which consist of fields that specify where the events is
located (for points) or where the events starts and ends (for lines). The
values in those fields are in the same units as the M value of the shape. In
addition the event table would need an ID field that would map to primary key
field of the spatial table. The event and spatial table are then joined based
on this ID field, and the location field(s) of the events are used to
calculated (interpolate) the real world position of the event.
So much for the data model. PostGIS could also provide functions to create,
edit, manipulate and map measured features as well as event tables.
Initiallly we were thinking of creating the following three functions:
- dynseg_create(): would populate the Z coord. with percentages along the
line. Later on, the user could specify if % or length of feature should be
used. We could even allow the user to specify a function to populate
the measure value (not sure if this is possible).
E.g. to create/populate the measure on the ROADS table with the shape field
the_geom: SELECT dynseg_create(the_geom) FROM roads
- dynseg_getMeasure(): would return the measure value of a specified shape.
E.g. to get the measure value for a point P (a Point object) on the shape
with ID=12 from the ROADS table: SELECT dynseg_getMeasure(P, the_geom) FROM
roads WHERE id = 12
- dynseg_getShape(): would return the shapes of the various events (points
or shapes).
E.g. event table EVENTS with FROM, TO, ID fields mapped agains the ROAD
table:
SELECT dynseg_getShape(roads.the_geom, events.from, events.to) FROM events,
roads WHERE events.id=roads.id
I was thinking of getting started with this in the next few weeks and to have
a proof of concept system done within the next 2-3 months. We'll also try to
write up a more detailed description of linear referencing, and why it would
be good to have support for it in PostGIS.
Please let me know what you think.
cheers,
Christoph
On Tuesday 09 March 2004 02:57, Paul Ramsey wrote:
> Randy Goss wrote:
> >> What makes you unhappy about your PostGIS installation?
> >
> > Lack of decent integration with ArcGIS. And, while I'm at it, it would
> > be nice to have linear referencing capability.
>
> The first one I have to lay at ESRI's feet :)
> But the second one is intriguing -- what database capabilities do you
> think are necessary to support linear referencing? What we are really
> missing in the linear referencing side is any kind of design direction.
> What does "linear referencing support" really mean from a database
> perspective?
More information about the postgis-users
mailing list