[TinyOWS-users] MapFile: include nested too deeply

Marc-André Trottier marcandre_trottier at hotmail.com
Tue Jul 12 10:22:18 EST 2011


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://localhost/cgi-bin/mapserv?map=tinyows"
            #---------
            # TINYOWS
            #---------
            "tinyows_schema_dir"
"/srv/www/msp/dev/geodev1/services/tinyows/schema/"
            "tinyows_onlineresource"     "
http://localhost/cgi-wms/tinyows_modif.fcgi"
            "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://localhost/"
            "wfs_title"                   "tinyows"
            "wfs_onlineresource"        "
http://localhost/cgi-wms/tinyows_modif.fcgi?"
            #"ows_enable_request"           "*"
        END
    END
    PROJECTION
        "init=epsg:900913"
    END

    INCLUDE "./include/layers_modif_caserne.map"

END

*LAYERS_MODIF_CASERNE.MAP :*

LAYER
        NAME "CASERNE_VIEW_MODIF"
        INCLUDE "./include/ec/ec_connec_db_pg.map" <---- the problem is here
! working only if in absolute path
        DATA "geom_p from msp_si_v_casernes_geo_modif_900913_p using unique
ogc_fid srid=900913"
        TYPE POINT
        DUMP TRUE
        HEADER "../templates/todo.html"
        TEMPLATE "../templates/todo.html"
        TOLERANCE 10
        TOLERANCEUNITS PIXELS
        #CLASSITEM "etat"
        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, etat"
            "ows_include_items"     "all"
            "ows_exclude_items"     "geom_p, ogc_fid, etat"
            "msp_classe_meta"       "MSP_SI_CASERNES_GEO"
               #--------------
            # TINYOWS
            #--------------
            "wfs_title"             "Caserne de pompier (MSP)"
            "wfs_srs"                "EPSG:900913"
            "tinyows_schema"        "admgeo1"
            "tinyows_table"
"msp_si_v_casernes_geo_modif_900913_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 ( ([etat]>0) and ([etat]<=2) )
            STYLE
                SYMBOL "caserne2"
                SIZE 20
                OUTLINECOLOR 10 10 10
                COLOR 0 0 250
            END
        END
    END



ec_connec_db_pg.map content only the connection's parameters to PG. no
include
and the error is coming from TinyOWS and MapServer display the layer in WMS
with the relative path to ec_connec_db_pg.map so the constant is respected,
no ?

like I wrote on my last post (mapfile INCLUDE with relative path), i put in
to comment the "IF" on OWS_MAP_MAX_INCLUDE_PATH in mapfile.c and everything
works
is that there may be problems without this check ?

--------------------------------------------------------
---------------------------------------------------------------------
-----------------------------------------------------------------------------

Hi Marc,

First of all, it's a Mapserver constant, not a variable. My bad
because the hurries.

This is what the Mapserver documentation says:

	* The name of the file to be included MUST be quoted (single or
double quotes).
	* Includes may be nested, up to 5 deep.
	* File location can be given as a full path to the file, or (in MapServer >=
4.10.1) as a path relative to the mapfile.
So you can nest up to 5 map files by default.

This is what you wrote:

"MapFile: include nested too deeply"

what's the meaning of this error ?

Marc-André Trottier

But I can't see your map definition and the includes. Can you post them ?


IC Carlos Ruiz
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.maptools.org/pipermail/tinyows-users/attachments/20110712/e9a85ca5/attachment.htm 


More information about the TinyOWS-users mailing list