MCPcopy Index your code
hub / github.com/MapServer/MapServer / writeLayer

Function writeLayer

mapfile.c:3980–4057  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3978}
3979
3980static void writeLayer(FILE *stream, int indent, layerObj *layer)
3981{
3982 int i;
3983 featureListNodeObjPtr current=NULL;
3984
3985 if(layer->status == MS_DELETE)
3986 return;
3987
3988 indent++;
3989 writeBlockBegin(stream, indent, "LAYER");
3990 // bindvals
3991 /* class - see below */
3992 writeString(stream, indent, "CLASSGROUP", NULL, layer->classgroup);
3993 writeString(stream, indent, "CLASSITEM", NULL, layer->classitem);
3994 writeCluster(stream, indent, &(layer->cluster));
3995 writeString(stream, indent, "CONNECTION", NULL, layer->connection);
3996 writeKeyword(stream, indent, "CONNECTIONTYPE", layer->connectiontype, 9, MS_SDE, "SDE", MS_OGR, "OGR", MS_POSTGIS, "POSTGIS", MS_WMS, "WMS", MS_ORACLESPATIAL, "ORACLESPATIAL", MS_WFS, "WFS", MS_GRATICULE, "GRATICULE", MS_PLUGIN, "PLUGIN", MS_UNION, "UNION");
3997 writeString(stream, indent, "DATA", NULL, layer->data);
3998 writeNumber(stream, indent, "DEBUG", 0, layer->debug); /* is this right? see loadLayer() */
3999 writeExtent(stream, indent, "EXTENT", layer->extent);
4000 writeExpression(stream, indent, "FILTER", &(layer->filter));
4001 writeString(stream, indent, "FILTERITEM", NULL, layer->filteritem);
4002 writeString(stream, indent, "FOOTER", NULL, layer->footer);
4003 writeString(stream, indent, "GROUP", NULL, layer->group);
4004 writeString(stream, indent, "HEADER", NULL, layer->header);
4005 /* join - see below */
4006 writeKeyword(stream, indent, "LABELCACHE", layer->labelcache, 1, MS_OFF, "OFF");
4007 writeString(stream, indent, "LABELITEM", NULL, layer->labelitem);
4008 writeNumber(stream, indent, "LABELMAXSCALEDENOM", -1, layer->labelmaxscaledenom);
4009 writeNumber(stream, indent, "LABELMINSCALEDENOM", -1, layer->labelminscaledenom);
4010 writeString(stream, indent, "LABELREQUIRES", NULL, layer->labelrequires);
4011 writeNumber(stream, indent, "MAXFEATURES", -1, layer->maxfeatures);
4012 writeNumber(stream, indent, "MAXGEOWIDTH", -1, layer->maxgeowidth);
4013 writeNumber(stream, indent, "MAXSCALEDENOM", -1, layer->maxscaledenom);
4014 writeHashTable(stream, indent, "METADATA", &(layer->metadata));
4015 writeNumber(stream, indent, "MINGEOWIDTH", -1, layer->mingeowidth);
4016 writeNumber(stream, indent, "MINSCALEDENOM", -1, layer->minscaledenom);
4017 writeNumber(stream, indent, "MINFEATURESIZE", -1, layer->minfeaturesize);
4018 writeString(stream, indent, "NAME", NULL, layer->name);
4019 writeColor(stream, indent, "OFFSITE", NULL, &(layer->offsite));
4020 writeString(stream, indent, "PLUGIN", NULL, layer->plugin_library_original);
4021 writeKeyword(stream, indent, "POSTLABELCACHE", layer->postlabelcache, 1, MS_TRUE, "TRUE");
4022 for(i=0; i<layer->numprocessing; i++)
4023 writeString(stream, indent, "PROCESSING", NULL, layer->processing[i]);
4024 writeProjection(stream, indent, &(layer->projection));
4025 writeString(stream, indent, "REQUIRES", NULL, layer->requires);
4026 writeKeyword(stream, indent, "SIZEUNITS", layer->sizeunits, 7, MS_INCHES, "INCHES", MS_FEET ,"FEET", MS_MILES, "MILES", MS_METERS, "METERS", MS_KILOMETERS, "KILOMETERS", MS_NAUTICALMILES, "NAUTICALMILES", MS_DD, "DD");
4027 writeKeyword(stream, indent, "STATUS", layer->status, 3, MS_ON, "ON", MS_OFF, "OFF", MS_DEFAULT, "DEFAULT");
4028 writeString(stream, indent, "STYLEITEM", NULL, layer->styleitem);
4029 writeNumber(stream, indent, "SYMBOLSCALEDENOM", -1, layer->symbolscaledenom);
4030 writeString(stream, indent, "TEMPLATE", NULL, layer->template);
4031 writeString(stream, indent, "TILEINDEX", NULL, layer->tileindex);
4032 writeString(stream, indent, "TILEITEM", NULL, layer->tileitem);
4033 writeNumber(stream, indent, "TOLERANCE", -1, layer->tolerance);
4034 writeKeyword(stream, indent, "TOLERANCEUNITS", layer->toleranceunits, 7, MS_INCHES, "INCHES", MS_FEET ,"FEET", MS_MILES, "MILES", MS_METERS, "METERS", MS_KILOMETERS, "KILOMETERS", MS_NAUTICALMILES, "NAUTICALMILES", MS_DD, "DD");
4035 writeKeyword(stream, indent, "TRANSFORM", layer->transform, 10, MS_FALSE, "FALSE", MS_UL, "UL", MS_UC, "UC", MS_UR, "UR", MS_CL, "CL", MS_CC, "CC", MS_CR, "CR", MS_LL, "LL", MS_LC, "LC", MS_LR, "LR");
4036 writeNumberOrKeyword(stream, indent, "OPACITY", 100, layer->opacity, (int)layer->opacity, 1, MS_GD_ALPHA, "ALPHA");
4037 writeKeyword(stream, indent, "TYPE", layer->type, 9, MS_LAYER_POINT, "POINT", MS_LAYER_LINE, "LINE", MS_LAYER_POLYGON, "POLYGON", MS_LAYER_RASTER, "RASTER", MS_LAYER_ANNOTATION, "ANNOTATION", MS_LAYER_QUERY, "QUERY", MS_LAYER_CIRCLE, "CIRCLE", MS_LAYER_TILEINDEX, "TILEINDEX", MS_LAYER_CHART, "CHART");

Callers 1

msSaveMapFunction · 0.85

Calls 15

writeBlockBeginFunction · 0.85
writeStringFunction · 0.85
writeClusterFunction · 0.85
writeKeywordFunction · 0.85
writeNumberFunction · 0.85
writeExtentFunction · 0.85
writeExpressionFunction · 0.85
writeHashTableFunction · 0.85
writeColorFunction · 0.85
writeProjectionFunction · 0.85
writeNumberOrKeywordFunction · 0.85
writeJoinFunction · 0.85

Tested by

no test coverage detected