[Xastir] ESRI shapefile troubles

Tom Russo russo at bogodyn.org
Tue Oct 5 18:35:54 EDT 2004


On Tue, Oct 05, 2004 at 03:47:33PM -0600, we recorded a bogon-computron collision of the <russo at bogodyn.org> flavor, containing:
> 
> Until you write a dbfawk file that recognizes your dbf file's structure, though,
> you won't get road names displayed along with them, or be able to distinguish
> between roads of differing classifications --- they'll all just be black lines.
> If I could read the language in which the field names were wirtten I might 
> be able to help, but I can't see one that looks anything like "road name"
> or "road type".  

Unfortunately, it looks like (by guessing roughly at what field values
seem to be in the dbf files), this set of road data does not put all the
attributes for a road into a single dbf table --- the names appear to be
in a separate dbf file that could be linked to the original one by appropriate
use of category columns, but that is just a bit too much for xastir.  In a
sense, this is similar to the problem in the US Census shapefiles, where
polygon information is maintained by linking boundary polylines together with
external tables, rendering it impossible to fill them easily.

To get your roads displayed in xastir with road classification visualized
by color, dash style, and width *and* labeled with road name, you'll not only 
need to convert them  to 2D shapefiles with ogr2ogr, but you'll probably need 
the help of a full-featured GIS program that can merge the data in the various 
tables and create a single table.

Even so, there might be enough information in the dbf files that go with the
shapes to get road classification visualized.  To do that, look at how
the various "tgr*.dbfawk" files do it, and see if you can identify which 
fields of your dbf files are associated with the feature type.  You'll need
to use "dbfinfo" and "dbfdump" (included in the shapelib distribution) to
see what fields are actually in each dbf file.

HTH,
T.

-- 
Tom Russo    KM5VY     SAR502  DM64ux         http://www.swcp.com/~russo/
Tijeras, NM  QRPL#1592 K2#398  SOC#236 AHTB#1 http://www.qsl.net/~km5vy/
(1) Ignorance of your profession is best concealed by solemnity and silence,
which pass for profound knowledge upon the generality of mankind.
                -------"Advice to Officers of the British Army", 1783



More information about the Xastir mailing list