[mapserver-users] shp/dbf file's name
P Kishor
punk.kish at gmail.com
Fri Aug 20 06:42:20 PDT 2010
On Fri, Aug 20, 2010 at 8:22 AM, Clément MONIER
<Clement.MONIER at v-trafic.com> wrote:
> Hi,
>
>
>
> I would like to know if it’s possible to draw geometries from a shp file
>
> according to attributes from a dbf
>
> but with 2 files named differently.
>
>
>
> For instance :
>
>
>
> LAYER
>
> NAME layer1
>
> DATA shapefile1.shp
>
> CLASS
>
> EXPRESSION ([col1]=1)
>
> STYLE
>
> END
>
> END
>
> END
>
>
>
> Where col1 is a field inside a file storing attributes (dbf/csv/txt/…) but
> not named shapefile1.dbf
>
How would MapServer know which row in your external dbf file matches
which row (aka feature) in your ShapeFile? What if the external dbf
file doesn't have the same number of rows as the number of features in
your ShapeFile?
The dbf format is pretty primitive. Your best bet is to actually add
to your ShapeFile the data that is now in your external file. It will
also likely be faster.
>
>
> I already tried to use the JOIN option but I think it’s inappropriate for my
> purpose
>
> since “You cannot use joins to affect the look of a map”
> (http://mapserver.org/mapfile/join.html)
>
>
>
> Thanks for your help !
>
>
>
> Clément
>
>
>
> _______________________________________________
> mapserver-users mailing list
> mapserver-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>
>
--
Puneet Kishor http://www.punkish.org
Carbon Model http://carbonmodel.org
Charter Member, Open Source Geospatial Foundation http://www.osgeo.org
Science Commons Fellow, http://sciencecommons.org/about/whoweare/kishor
Nelson Institute, UW-Madison http://www.nelson.wisc.edu
-----------------------------------------------------------------------
Assertions are politics; backing up assertions with evidence is science
=======================================================================
More information about the MapServer-users
mailing list