[postgis-users] Need some advice in my Postgis table design

Gustavo Henrique Sberze Ribas gribas at cpqd.com.br
Mon Jul 25 09:56:59 PDT 2005


Hello,

  Well, I keep my data in separate tables (road name/road segment data/
road segment geometry), then I use a view to join all tables and show it 
as a single layer (roads) in MapServer. 

  Editing would still be a problem thought, I think you'd have to create
triggers/rules for the view in order to update the tables properly.


Gustavo


> Hi,
> 
> I'm trying to write an application which will allow creating digital
> maps. I'm using postgis as my DB and I'm using GPS traces to create my
> map.
> I'd like everything in the DB to be as simple as possible so it could
> be easily viewed by external software connected to postgis (mapserver)
> and edited (qgis, uDig, etc').
> My main problem is with roads. I'm using two tables: one to keep nodes
> and another to keep road segments. The problem is that a single street
> is typically built from several segments, and so I'm not sure how to
> handle street names. I'd like to have another street table with all
> the information about a street and link each segment to a street using
> its ID. But if I choose this solution, external software will not
> handle the indirection and won't show the street names. Putting the
> name for each segment seems as a waste.
> Is there any other option?




More information about the postgis-users mailing list