NAME mapserv - map database server SYNOPSIS mapserv [-p port] [scriptfile(s)] DESCRIPTION mapserv is a spatial database server that can read in feature sets (feature classes) from map databases, select and manipulate them with an attribute expression mechanism, processes them with a polygon intersection mechanism, and export them to remote viewers. A user (or client program) can interact with mapserv via stdin and stdout or telnet. The command syntax is a semi-colon separated list of commands with arbitrary number of parameters enclosed in parenthesis, with support for optional parameters and keyword arguments, i.e: command1(arg1 arg2 :key1 val1 :key2 val2);command2(arg1 :key1 val1) The literals and operators of C are all supported except for the syntax of the conditional operator "?:". See the comterp documentation for more details. In the command documentation below, str's are character strings, int's are integers, and fclass points to a MapFeatureClass object. "[]" indicates an optional argument: MAP FEATURE CONSTRUCTION COMMANDS feature=pointfeature(x0 y0 :id idnum) -- create point feature feature=linefeature(x0 y0 x1 y1 [...] :id idnum) -- create line feature feature=areafeature(x0 y0 x1 y1 [...] :id idnum) -- create area feature feature=nodefeature(x0 y0 :id idnum) -- create node feature MAP FEATURE COMPUTATION COMMANDS fltnum=polygonarea(areafeature) -- compute area of areafeature fltnum=pointdistance(pointfeature1 pointfeature2) -- compute distance between point features MAP FEATURE CLASS COMMANDS numint=numfeatures(fclass) -- return number of features in feature class feature=getfeature(fclass i) -- return copy of ith feature from feature class MAP FEATURE CLASS EXPRESSION COMMANDS fclass=attrsel(fclass expr_str) -- copy features where exprstr is true fclass=shapesel(fclass shapefeature) -- copy features that spatially intersect a feature's shape exprfc(fclass attribute exprstr) -- assign exprstr result to feature's attribute MAP FEATURE CLASS EXTENT AND CLIPPING COMMANDS extentfc(fclass) -- return extents of feature class fclass=cliprect(fclass x0_int y0_int x1_int y1_int) -- clip with rectangle fclass=clippolyaminb(fclass areafeature_A) -- clip with polygon feature A minus B fclass=clippolybmina(fclass areafeature_B) -- clip with polygon feature B minus A fclass=clippolyaandb(fclass areafeature_A) -- clip with polygon feature A and B MAP FEATURE CLASS EXPORT/IMPORT COMMANDS fclass=importfc(path_str) -- import a mapserv format feature class exportfc(fclass [host_str port_int] :file path :paint :socket :bitmap) -- remote export in mapserv (or other) format printfc(fclass :paint :file path) -- print in native mapserv format, with optional painting and/or saving to a file paintfc(fclass) -- paint features based on gs expressions in painting table painttbl(exprstr gsstr) -- add expression/gs pair to painting table painttbl() -- dump painting table to stdout painttbl(:reset) -- reset painting table exportgr(fclass host_str port_int) -- remote export in drawtool format exportgrgs(gs_str) -- default graphic state string for features exportgrtr(tr_str) -- default transformer string for feature classes printgr(fclass) -- print drawtool format to stdout OTHER COMMANDS run(filename) -- run commands from file quit() -- quit this interpreter exit() -- exit entire application SEE ALSO comterp, comdraw, vhclserv, utmviewer