VS: [mapserver-users] Mapserver search performance

Varun saraf vsaraf.gmu at gmail.com
Wed May 4 11:22:51 EDT 2011


Hi Andreas,

I have looked and looked but could not find how to use ogr2ogr to do
the operation I am interested in. Could you point me in the right
direction here as to how can ogr2ogr be used to add new fields to an
existing dbf file from another dbf file. The external dbf file from
which I need to fetch data does not have a corresponding shp file
associated with it. Its just a simple data file that has a common
field with the shp file attributes.

Varun

On Wed, May 4, 2011 at 4:23 AM, Eichner, Andreas - SID-NLKM
<Andreas.Eichner at sid.sachsen.de> wrote:
>
> Hi. The first thing to note: editing a DBF with Excel & Co. seems to be
> a _really_ bad idea. Those who tried that got Shapes wired to wrong
> attribute lines. So DBF, SHP, SHX and QIX files have to be used as a
> whole or will usually end up in a corrupted dataset. I would suggest
> "ogr2ogr" from the GDAL suite. It's fast, reliable, can do joins and is
> aware of the mentioned dependencies.
> Please note that such a fileset can only provide a spatial index via a
> QIX file. This is OK if you only want to filter by BBOX. If you want to
> filter by attribute all lines of the DBF still need to be scanned. In
> such cases it's wise to use ogr2ogr to split the data in pre-filtered
> sets.
> Using a more sophisticated database like PostGIS or SpatialLite can help
> you implement more complex scenarios. Since MapServer has no native
> driver for SpatialLite it's probably not as fast as it is supposed to
> be. This mostly depends on OGRs implementation.
>
> Greetings
>
>> Is there a DBF editor out
>> there that can be used to import the fields from any external data
>> source into the shapefile attribute DBF without affecting the
>> structure? I looked for a lot but they do not have the capability of
>> doing a JOIN based on a common field and pulling data into the
>> shapefile DBF automatically.
>


More information about the mapserver-users mailing list