Shapefile questions

Stephen Woodbridge woodbri at SWOODBRIDGE.COM
Fri Oct 1 05:20:37 PDT 2004


Sandeep Bashyal wrote:

> Hello,
>
> I have the following questions about shapefiles and mapserver:
>
> 1. Does Mapserver support "merged" polygons in shapefiles? E.g. arcview
> allows you to merge two or more NON-ADJACENT polygons, such that they are
> treated as a single shape and point to the same rows in the attribute
> table. I was wondering if mapserver supports such shapefiles with  merged
> non-adjacent polygons.

Yes, this should not be a problem.

> 2. Is there a way to assign shapeindex for shapes in a layer from one of
> the fields in the attribute table (like in the mapfile or by dnamically
> adding a layer with phpmapscript)? I have a layer with over 4000 polygons
> whose attribute ID's do not correspond to the shapeindex returned from
> query results. I need the attribute ID's to link to a external database
> and display results.

You can access and attribute in a query and in fact I think you can do a
join of any attribute in a query result with and external database. Read
up on JOIN in the mapfile reference.

> Any advice on an easy way to write shapeindexes into a field in the
> attribute table would also be helpful.
>
> Thanks in advance.
>
> --
> Sandeep Bashyal
> --
>   National GIS Officer
>   Humanitarian Assistance Information System (HAIS)
>   United Nations (NEP/01/008)
>   UN House, Pulchowk
>   G.P.O. Box 107
>   Kathmandu, Nepal
>   Tel: (+977) 01 5543957
>        (+977) 01 5554304
>   Cell:(+977) 9841270854
>   Fax: (+977) 01 5528059
> --------------------------------------------------
> mailto:gis at undphais.org.np
> mailto:sandeep at earthmapping.com
> http://www.undp.org.np
>



More information about the MapServer-users mailing list