Assign special dbf to shapefile

Shashi Gireddy gireddy at GMAIL.COM
Fri Jan 7 12:47:44 EST 2005


Hi all,
 I have no luck when used Excel to edit dbf files (it didn't worked),
after that i used dbfmanager and it worked. now my problem is i am
working with alabama census and i have 67 counties, a single shape
file is enough to describe all these county boundaries. Now i want to
map SF1&SF3 data which is in my mysql database onto this shape file
and i want generate maps based on this data. as i mailed earlier i
shp2mysql.pl is giving errors for me, so i replaced use Shape with use
Geo::ShapeFile, then it worked but just gave me two empty tables. Can
anybody help me working with shape files with mysql. Is there any way
to create a single shape object dynamically(by reading shape file) and
map that to mysql data?

thank you,
shashi.

On Fri, 7 Jan 2005 09:31:49 -0800, Ken Lord <kenlord at gmail.com> wrote:
> This definately calls for PostGIS, and I'm sure it would process the
> request much faster.
>
> But,
>
> Why not use the join object in mapserver?
>
> http://mapserver.gis.umn.edu/doc44/mapfile-reference.html#join
>
> Or is this join system, that was broken i think after mapserver 3.4,
> still not functional? ... and if it is still not functional why have
> the instructions remained in the current documentation for the last 2
> years+ ... since at least mapserver 3.6?
>
> There is another option:
>
> Don't join the data on-the-fly. Instead when the user queries the
> airport, have a link parsed in the query results that when followed
> displays the attribute data you want based on the query results
> returned. ... A little ASP works wonders here to take a mapserver
> query result and query another database with it.
>
> Cheers,
> Ken
>
> On Fri, 7 Jan 2005 10:22:02 -0500, Stephen Woodbridge
> <woodbri at swoodbridge.com> wrote:
> > The only way that I know of to do runtime joins in mapserver is to use
> > PostGIS. You might be able to do something with gdal, but I think it is
> > very slow.  I have requested support for runtime shapefile joins to
> > either DBF or MySQL multiple times and nothing has happened in that
> > direction. Basically, it would be very slow because for each object in
> > the shapefile, you would have to scan the whole DBF file, because there
> > are no indexes support for DBF files, or the developers would have to
> > build DBF indexing support into mapserver. For Mysql, you could index
> > the columns, but you would still need to make a separate query for every
> > object in the shapefile.
> >
> > In PostGIS, since you have all the data in the database to start with
> > you can make one query for the layer and do the join in that query, then
> > you only have to fetch back the objects to render.
> >
> > -Steve W.
> >
> > Holger Floerke wrote:
> > > Hi Jacob,
> > >
> > >
> > >>Why would you not want to join them?
> > >
> > > If the information I would like to present is evaluated at runtime, I have
> > > to produce a full set of ".shp", ".dbf", "sbx", "sbn", and ".shx" files. The
> > > shapes always stays the same, but the data is extracted from a database on a
> > > user's query. I would like to save space by not copying the shape
> > > information every time.
> > >
> > >
> > >>unless if you created a join on a dbf, and accessed it separately.
> > >
> > > Is it possible to join external data sources (one or more dbf-files or
> > > oci-sources) to shape files at runtime with the mapserver-api?
> > >
> > > HolgeR
> > >
> > >
> > > Jacob Delfos schrieb:
> > >
> > >
> > >>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
> > >>
> > >
> > >
>


--
Shashi Kiran Reddy. Gireddy,
Graduate Assistant,
CBER, University of Alabama.
http://www.cs.ua.edu/shashi
Home: 205-752-5137 Cell: 205-657-1438



More information about the mapserver-users mailing list