[TinyOWS-users] two or more connections type

Marc-André Trottier marcandre_trottier at hotmail.com
Thu Nov 3 12:27:09 EST 2011


my mapfile using two "connectiontype" for two different layer
"connectiontype postgis" and "connectiontype WMS"
here is my mapfile :

MAP
    NAME "GOLOC_MODIFICATION_TINYOWS"
    EXTENT -1100000 -23500 1100000 2253500
    WEB
        METADATA
           "wms_title"                  "GOLOC_MODIFICATION_TINYOWS"
           "wms_label"                  "Service de données
GOLOC-Modification" ### required
           "wms_name"                   "GOLOC_MODIFICATION_TINYOWS"
           "wms_abstract"               "Service de données
GOLOC-Modification"
           "wms_description"            ""
           "wms_keywordlist"            "Service de données
GOLOC-Modification"
           "wms_onlineresource"         "
http://zzzzzzzzzz/cgi-wms/tinyowsCOG"

            "tinyows_schema_dir"
"/srv/www/msp/services/tinyows/schema/"
            "tinyows_onlineresource"     "
http://zzzzzzzzzzz/cgi-wms/tinyowsCOG"
            "tinyows_log"                "/srv/www/msp/log/tinyows.log"
            "tinyows_log_level"            "15"
            "wfs_srs"                    "EPSG:900913"
            "wfs_namespace_prefix"         "WFS-T"
            "wfs_namespace_uri"         "http://zzzzzzzzzzzzzzz/"
            "wfs_title"                   "tinyows"
            "wfs_onlineresource"
"http:/zzzzzzzzzz/cgi-wms/tinyowsCOG?"
            #"ows_enable_request"           "*"
        END
    END
    PROJECTION
        "init=epsg:900913"
    END

LAYER
        NAME "CASERNE_VIEW_MODIF"
        CONNECTIONTYPE postgis
        CONNECTION "XXXXXXXXXXX"
        PROCESSING "CLOSE_CONNECTION=DEFER"
        DATA "geom_p from admgeo1.msp_si_v_casernes_modif_p using unique
ogc_fid srid=900913"
        TYPE POINT
        DUMP TRUE
        HEADER "../templates/todo.html"
        TEMPLATE "../templates/todo.html"
        TOLERANCE 10
        TOLERANCEUNITS PIXELS
        #CLASSITEM "statut_maj"
        METADATA
            "wms_title"                "Caserne de pompier (MSP)"
            "wms_name"                "CASERNE_VIEW_MODIF"
            "wms_group_title"        "Surveillance du territoire/Réseaux"
            "wms_server_version"    "1.1.1"
            "wms_srs"               "EPSG:2036 EPSG:2037 EPSG:2148
EPSG:2149 EPSG:2150 EPSG:3797 EPSG:3857 EPSG:4269 EPSG:4326 EPSG:26917
EPSG:26918 EPSG:26919 EPSG:26920 EPSG:32183 EPSG:32184 EPSG:32185
EPSG:32186 EPSG:32187 EPSG:32188 EPSG:32189 EPSG:32190 EPSG:32198
EPSG:42105 EPSG:42304 EPSG:900913"
            "wms_extent"            "-1100000 -23500 1100000 2253500"
            "gml_include_items"     "all"
            "gml_exclude_items"     "geom_p, ogc_fid, statut_maj"
            "ows_include_items"     "all"
            "ows_exclude_items"     "geom_p, ogc_fid, statut_maj"
            "msp_classe_meta"       "MSP_SI_CASERNES_GEO"
            "wms_dataurl_format" "text/html"
            "wfs_title"             "Caserne de pompier (MSP)"
            "wfs_srs"                "EPSG:900913"
            "tinyows_schema"        "admgeo1"
            "tinyows_table"            "msp_si_v_casernes_modif_p"
            "tinyows_retrievable"     "1"
            "tinyows_writable"         "1"
            "gml_geometry_type"       "point"
            "gml_geometries"        "geometry"
            "gml_featureid"            "ogc_fid"
            #"ows_include_items"     "all"
        END
        PROCESSING "CLOSE_CONNECTION=DEFER"
        PROJECTION
            "init=epsg:900913"
        END

        CLASS
            NAME "Caserne modifiée"
            EXPRESSION ( ("[statut_maj]"="M") OR ("[statut_maj]"="A") )
            STYLE
                SYMBOL "caserne2"
                SIZE 20
                OUTLINECOLOR 10 10 10
                COLOR 0 250 0
            END
        END
        CLASS
            NAME "Caserne non-modifiée"
            EXPRESSION ( "[statut_maj]" = "O")
            STYLE
                SYMBOL "caserne2"
                SIZE 20
                OUTLINECOLOR 10 10 10
                COLOR 250 7 0
            END
        END
    END

    LAYER
            NAME "struct_mtq"
        TYPE RASTER
        CONNECTION "XXXXXXXXXX"
        CONNECTIONTYPE WMS
        MAXSCALE 60000
        MINSCALE 2000
        INCLUDE "../ec/ec_getfeature.map"
        METADATA
            "wms_srs"             "EPSG:32198 EPSG:900913"
            "wms_name"            "struct_mtq"
            "wms_title"           "struct_mtq"
            "wms_server_version"  "1.1.1"
            "wms_format"          "image/png"
            "msp_classe_meta"     "MTQ_WMS"
        END

    END

if i refer to the web page (http://tinyows.org/trac/wiki/MapFileConfigFile)
:
1- Only PostGIS *CONNECTIONTYPE* are handled
2- Each *CONNECTION* string value in layers must be the same.

is it the first or the second limitation that cause problem ?

Marc-André Trottier
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.maptools.org/pipermail/tinyows-users/attachments/20111103/dbd0b282/attachment.htm 


More information about the TinyOWS-users mailing list