Toni,

The entire purpose of the dbf file in the ESRI model is to hold the 
attributes for the shapes in the shape file.  Why would you create a NULL 
shape just to hold data?  That stands to reason that you NEED a separate 
database file.

What I have that is different is a set of shape files with each having a one 
to one relationship with data in its dbf file.  I also have some "related" 
data in "extra" dbf files that I tie to the other data using a sql query.  I 
can use the query because I've added it all to postgres.


I think the misunderstanding for me is that you would have data not 
corresponding to a shape. My apologies if this is a practice that I haven't 
heard of before.

Gail

--
Things are only difficult while you don't understand them.




>From: "toni" <fiorenontaglio at libero.it>
>To: "pmapper mailing list" <pmapper-users at faunalia.it>
>Subject: [Pmapper-users] R:  attribute query and records with no geometry
>Date: Fri, 26 May 2006 23:03:04 +0200
>
>I think we're misunderstanding...
>
>I don't have an external dbf file to tie.
>I'm talking about the *shape dbf* file (shp shx -->dbf<--):
>this file contains records not linked to the geometry in the related shp
>file. Infact all the geometries have their own data but there are plenty
>data without a geometry (these are no spatial data, not linkable to the
>geometries). Files are not corrupted because they're intentionally made in
>this way.
>
>No spatial data are useful for me because when you search for them you
>should have the answer: data + "unlocatable".
>
>Gail Long told me he added a search function to parse the shape dbf
>searching for records without geometry tie, then he migrated to postgis &
>postgres because search was faster.
>
>Any other suggestion?
>thanks in advance, bye
>
>
>
>
>----- Original Message -----
>From: Armin Burger
>To: Gail Long
>Cc: fiorenontaglio at libero.it ; pmapper-users at faunalia.it
>Sent: Wednesday, May 24, 2006 11:18 PM
>Subject: Re: [Pmapper-users] attribute query and records with no geometry
>
>
>Just a more general remark using dbf files and querying them with PHP:
>If for whatever reasons whatsoever you need to use them and not putting
>the data into a real DB, on Windows you can speed up things via ODBC. If
>you have MS Access, just define an MDB and link the dBase files to it as
>external data source. Then access the MDB via the ODBC driver. Works
>*much* faster than native dbf functions.
>
>Another remark for shapefiles and dbf: If you modify the dbf part of a
>shapefile with pure dBase functions/programs, and add or remove records,
>you might get into trouble sooner or later with a corrupt shapefile that
>is not readable any more.
>
>Armin
>
>Gail Long wrote:
> > Tony,
> >
> > A layer is made up of shape files for geometry and data in the dbf files
>for
> > attributes.  If there is no tie to the geometry there are no records to 
>be
> > returned.
> >
> > However, I had a similar need and know that what you want to do can be
>done.
> >   I have several .dbf files that have lots of useful data in them.  For
>the
> > most part I've been able to use a pmapper JOIN and tie the data uniquely
>to
> > a record in a shape file ( a feature) by adding a key field to the dbf
> > tables that links back to my Postgres tables.  This should work the same
>way
> > with shape files and link back to an attribute.
> >
> > With two of the tables however, I don't have a clean way to join them to 
>a
> > geographic feature.  So, in order to get to that data I added an
>additional
> > search form to search.phtml, and copied info.phtml and called a dbase
>search
> > using php to return records from the table with no shapefile ties.  
>After
> > using this method for awhile and finding it slow, I've converted the dbf
> > files to a postgres tables so that its easier to deal with them and I 
>can
> > index them for MUCH better performance.
> >
> > This worked so well for me that I've extended this to do searches on a
> > couple of mysql dbs as well.
> >
> > As to mapping, I'm very close to finding a quick way to create point 
>data
>in
> > a shape so that each of my featureless data records will now be able to 
>be
> > mapped when I want them mapped.
> >
> > In order to do this you'll have to either write a new query class and a
> > couple of new print functions, or alter the ones that Armin has 
>provided,
>so
> > that it will create a zoompoint link rather than zoomextent.  Not 
>trivial
> > but not too difficult either.  Because I wasn't mapping these tables I
>just
> > encapsulated all of that functionality in my altered info_data.phtml.
> >
> > I do encourage you to setup Postgres with PostGIS if you are planning on
> > doing much pure data manipulation.  The windows installer for Postgres 
>and
> > PostGIS are very simple to use and you'll find that you gain lots of
> > advantages over using shape files and dbf files.
> >
> > Good luck!
> > --
> > Things are only difficult while you don't understand them.
> >
> >
> >
> >
> >> From: "toni" <fiorenontaglio at libero.it>
> >> To: "pmapper mailing list" <pmapper-users at faunalia.it>
> >> Subject: [Pmapper-users] attribute query and records with no geometry
> >> Date: Tue, 23 May 2006 23:23:05 +0200
> >>
> >> Hi everybody,
> >>
> >> i'm using win xp, ms4w v.1.5.0, pmapper 1.2.0, shape files for layers.
> >>
> >> I've set as pmapper layer a shape file including records without 
>geometry
> >> (let me explain: my shape .dbf file contains records not linked with 
>the
> >> objects in the .shp file, these records do not have geographic
> >> localization).
> >> If I use the attribute query in the search frame looking for a record
> >> without geometry I get: "no data found", when instead data are stored.
> >>
> >> Does the attribute query work only if the geometry exists or not?
> >> I created a "conventional geometry" for these records just to make the
> >> query
> >> work, but it doesn't seem the most correct way to avoid the problem
>(bigger
> >> file for nothing, slow map loading)
> >>
> >> thanks
> >> toni
> >>
> >>
> >>
> >> _______________________________________________
> >> Pmapper-users mailing list
> >> Pmapper-users at faunalia.it
> >> http://faunalia.it/cgi-bin/mailman/listinfo/pmapper-users
> >
> >
> >
> > _______________________________________________
> > Pmapper-users mailing list
> > Pmapper-users at faunalia.it
> > http://faunalia.it/cgi-bin/mailman/listinfo/pmapper-users
> >
> >
>
>
>_______________________________________________
>Pmapper-users mailing list
>Pmapper-users at faunalia.it
>http://faunalia.it/cgi-bin/mailman/listinfo/pmapper-users



Reply via email to