[mapserver-users] Combine GetFeatureInfo for layers with same data source

Jörg Thomsen jt at mapmedia.de
Thu Mar 27 05:58:30 PDT 2014


Hi,

okay, join is not what you need, sorry.
Would it work for you if only one of the two layers is queryable?

At the moment I have no idea...

Jörg

Am 27.03.2014 11:57, schrieb TDS:
> Hello,
> 
> I've read this and I'm confused of how it can work...
> ONE-TO-ONE or ONE-TO-MANY or ... I want to have a solution *scream* If
> both layers are queried it should be one table, because the date is the
> same. Only the class item differs.
> 
> 
> Example Mapfile:
>     LAYER
>         STATUS    on
>         NAME    "Trinkwasserversorgung"
>         TYPE    POLYGON
>         DATA    "wv_wilster_84.shp"
>         DUMP    true
>         TOLERANCE        3
>         TOLERANCEUNITS    pixels
>         CLASSITEM        "TW"
> 
>         HEADER            "templates/header.html"
>         TEMPLATE        "templates/template.html"
>         FOOTER            "templates/footer.html"
> 
>         JOIN
>             NAME "Wasser"
>             TABLE "wv_wilster_84.dbf"
>             FROM "Id"
>             TO "Id"
>             TYPE ONE-TO-ONE
>         END
> 
>            CLASS
>             NAME  "Trinkwasser"
>             EXPRESSION  "Trinkwasser"
>             STYLE
>                 COLOR   130  192  255
>             END
>             STYLE
>                 OUTLINECOLOR   120 120 120
>                 WIDTH 2
>                 ANTIALIAS TRUE
>             END
>         END
> 
>         CLASS
>             NAME  "Selbstversorger"
>             STYLE
>                 SYMBOL "im_schraffur"
>             END       
>             EXPRESSION  "Selbstversorger"
>             STYLE
>                 OUTLINECOLOR   120 120 120
>                 WIDTH 2
>                 ANTIALIAS TRUE
>             END
>         END
> 
>         PROJECTION
>             "init=epsg:4326"
>         END
> 
>         METADATA
>             "wms_title"                "Verbandsgebiet"
>             "wms_title metadata"    ""
>             "wms_include_items"        "all"
>             "wms_srs"                "EPSG:4326 EPSG:54004 EPSG:41001
> EPSG:31467 EPSG:31468"
>         END
>     END
> 
>     LAYER
>         STATUS    on
>         NAME    "Abwasserentsorgung"
>         TYPE    POLYGON
>         DATA    "wv_wilster_84.shp"
>         DUMP    true
>         TOLERANCE        3
>         TOLERANCEUNITS    pixels
>         CLASSITEM        "AW"
> 
>         HEADER            "templates/header.html"
>         TEMPLATE        "templates/template.html"
>         FOOTER            "templates/footer.html"
> 
>         JOIN
>             NAME "Wasser"
>             TABLE "wv_wilster_84.dbf"
>             FROM "Id"
>             TO "Id"
>             TYPE ONE-TO-ONE
>         END
> 
>         CLASS
>             NAME  "Abwasser"
>             EXPRESSION  "Abwasser"
>             STYLE
>                 COLOR   255 128 0
>             END
>             STYLE
>                 OUTLINECOLOR   120 120 120
>                 WIDTH 2
>                 ANTIALIAS TRUE
>             END
>         END
> 
>         CLASS
>             NAME  "Diverse Abwasseraufgaben"
>             STYLE
>                 SYMBOL "schraffur_orange"
>             END
>             EXPRESSION  "Diverse Abwasseraufgaben"
>             STYLE
>                 OUTLINECOLOR   120 120 120
>                 WIDTH 2
>                 ANTIALIAS TRUE
>             END
>         END
> 
>         CLASS
>             NAME  "Kein Abwasser"
>             EXPRESSION  "Kein Abwasser"
>             STYLE
>                 OUTLINECOLOR   120 120 120
>                 WIDTH 2
>                 ANTIALIAS TRUE
>             END
>         END
> 
>         PROJECTION
>             "init=epsg:4326"
>         END
> 
>         METADATA
>             "wms_title"                "Abwasser"
>             "wms_title metadata"    ""
>             "wms_include_items"        "all"
>             "wms_srs"                "EPSG:4326 EPSG:54004 EPSG:41001
> EPSG:31467 EPSG:31468"
>         END
>     END
> 
> 
> 
> Bye, TDS
> ------------------------------------------------------------------------
> mailto:tds at tds-net.de
> ------------------------------------------------------------------------
> 1+1=10
> You have a question? - 42 or RTFM.
> Am 26.03.2014 21:50, schrieb jt at mapmedia.de:
>>
>> Hi,
>>
>> Referring to your signatur: rtfm ;)
>>
>> Try http://mapserver.org/de/mapfile/join.htm
>>
>> Join streets_main with the dbf of streets_sub. Read the doc carefuly,
>> it's a bit tricky.
>>
>> You may find a working example under
>> http://mapmedia.de/downloads/viewcategory/5-vortraege (
>>
>> Workshop_umn...)
>>
>> Jörg
>>
>>  
>>
>> On Wed, 26 Mar 2014 20:58:17 +0100, TDS wrote:
>>
>>>     Hello,
>>>
>>>
>>> is it possible to join two layers in GetFeatureInfo with same
>>> template and same shape file to output only one combined html file?
>>>
>>> Example:
>>> Streets_Main => streets.shp => template.html
>>> Streets_Sub => streets.shp => template.html
>>>
>>> OUTPUT:
>>>
>>> Current:
>>> Output for Streets_Mains
>>> Output for Streets_Sub
>>>
>>> Wish:
>>>
>>> Streets_Mains unique id Streets_sub (e.g. main street and sub street
>>> have both id=1 in shape file)
>>>
>>>
>>> -- 
>>> Bye, TDS
>>> ------------------------------------------------------------------------
>>> mailto:tds at tds-net.de
>>> ------------------------------------------------------------------------
>>> 1+1=10
>>> You have a question? - 42 or RTFM.
>>
>>  
>>
>>
>>
>> _______________________________________________
>> mapserver-users mailing list
>> mapserver-users at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/mapserver-users
> 




More information about the MapServer-users mailing list