Assign special dbf to shapefile

Jacob Delfos jacob.delfos at MAUNSELL.COM
Fri Jan 7 09:51:07 EST 2005


Bill,

Good point about MS Excel. I forgot to mention that you do need to check on
the result. It tends to leave out columns and change number formats. But
when it works, it's quick and easy.

regards,

Jacob


-----Original Message-----
From: UMN MapServer Users List
To: MAPSERVER-USERS at LISTS.UMN.EDU
Sent: 1/7/2005 9:42 PM
Subject: Re: [UMN_MAPSERVER-USERS] Assign special dbf to shapefile

Holger,

If you really want to do this and your site has low enough traffic you
could
always juggle the files using php.  At run-time re-name the files
accordingly.  I usually avoid touching the disk as much as possible, but
if
you need to do it, this is one way to make it work.

FYI - I would recommend to anyone to use a dbf editor as opposed to MS
Excel
to edit dbfs, unless you know the ins and out of Excel and how to deal
with
named ranges etc.


Regards,
Bill

________________________________________________
William A. Bronsema, C.E.T.
Applications and Software Development,
DM Solutions Group Inc.



> -----Original Message-----
> From: UMN MapServer Users List [mailto:MAPSERVER-USERS at LISTS.UMN.EDU]
On
> Behalf Of Jacob Delfos
> Sent: January 7, 2005 8:31 AM
> To: MAPSERVER-USERS at LISTS.UMN.EDU
> Subject: Re: [UMN_MAPSERVER-USERS] Assign special dbf to shapefile
>
> Holger,
>
> Correct me if I'm wrong, but that would be redefining the definition
of
> a shapefile. As far as I know, a "shapefile" is not the .shp file, but
> the collection of ".shp", ".dbf", "sbx", "sbn", and ".shx" files. I
> think you'd have to seriously hack the source of mapserver to do that,
> unless if you created a join on a dbf, and accessed it separately.
>
> Why would you not want to join them? If you have access to MS Excel,
it
> would be as simple as copying a column across. No doubt other software
> can do the same thing. You would have access to both attributes in one
> shapefile. What is the actual problem that causes you not to want to
> have two shapefiles, and not to want to join the attributes?
>
> regards,
>
> Jacob
>
>
> -----Original Message-----
> From: UMN MapServer Users List
> To: MAPSERVER-USERS at LISTS.UMN.EDU
> Sent: 1/7/2005 9:03 PM
> Subject: [UMN_MAPSERVER-USERS] Assign special dbf to shapefile
>
> Hi all,
>
> am I able to assign a special dbf-file to a shape file? For example
> rendering the 'airports.shp', but using data from
> 'airports_passengers.dbf'
> and not from 'airports.dbf' (ensuring the correct order for the
> shape-information-mapping). Or another example, render some area
shapes
> on
> the one hand with popuplation data and on the other hand with
> unemployment
> data without integrating both data sets into the dbf of the shape file
> and
> without producing two different shape-files. I use php-mapscript and
> mapserver 4.4.
>
> HolgeR



More information about the mapserver-users mailing list