Using GET_EXTRACT and EXTRACT |
Figure 1: An example map configuration file. |
<?xml version="1.0" encoding="UTF-8"?> <ARCXML version="1.1"> <CONFIG> <ENVIRONMENT> <LOCALE country="US" language="en" variant="" /> <UIFONT color="0,0,0" name="Arial" size="12" style="regular" /> </ENVIRONMENT> <MAP dynamic="true"> <PROPERTIES> <ENVELOPE minx="-180.0" miny="-90.0" maxx="180.0" maxy="90.0" name="Initial_Extent" /> <MAPUNITS units="decimal_degrees" /> </PROPERTIES> <WORKSPACES> <SHAPEWORKSPACE name="shp_ws-0" directory="C:\ESRIDATA\WORLD" /> <SHAPEWORKSPACE name="shp_ws-2" directory="C:\ESRIDATA\USA" /> <SHAPEWORKSPACE name="shp_ws-3" directory="C:\ESRIDATA\CANADA" /> </WORKSPACES> <LAYER type="featureclass" name="WORLD30" visible="true" id="Ocean"> <DATASET name="WORLD30" type="polygon" workspace="shp_ws-0" /> <EXTENSION type="extract" > <EXTRACTPARAMS clip="true" /> </EXTENSION> <SIMPLERENDERER> <SIMPLEPOLYGONSYMBOL filltype="solid" fillcolor="0,153,255" /> </SIMPLERENDERER> </LAYER> <LAYER type="featureclass" name="CNTRY94" visible="true" id="Countries"> <DATASET name="CNTRY94" type="polygon" workspace="shp_ws-0" /> <EXTENSION type="extract" > <EXTRACTPARAMS clip="true" /> </EXTENSION> <SIMPLERENDERER> <SIMPLEPOLYGONSYMBOL filltype="solid" fillcolor="255,255,153"/> </SIMPLERENDERER> </LAYER> <LAYER type="featureclass" name="STATES" visible="true" id="States"> <DATASET name="STATES" type="polygon" workspace="shp_ws-2" /> <SIMPLERENDERER> <SIMPLEPOLYGONSYMBOL filltype="solid" fillcolor="255,0,0" /> </SIMPLERENDERER> </LAYER> <LAYER type="featureclass" name="province" visible="true" id="Provinces"> <DATASET name="province" type="polygon" workspace="shp_ws-3" /> <SIMPLERENDERER> <SIMPLEPOLYGONSYMBOL filltype="solid" fillcolor="0,153,0" /> </SIMPLERENDERER> </LAYER> <LAYER type="featureclass" name="World Cities" visible="true" id="Cities"> <DATASET name="CITIES" type="point" workspace="shp_ws-0" /> <SPATIALQUERY where="POPULATION > 300000" subfields="NAME POPULATION" /> <SIMPLERENDERER> <SIMPLEMARKERSYMBOL color="102,0,102" width="8.0" /> </SIMPLERENDERER> </LAYER> <LAYER type="featureclass" name="US Cities" visible="true" id="35"> <DATASET name="CITIES" type="point" workspace="shp_ws-2" /> <SPATIALQUERY where="POP1990 > 100000" subfields="CITY_NAME STATE_NAME POP1990 MALES FEMALES" /> <SIMPLERENDERER> <SIMPLEMARKERSYMBOL color="0,255,0" type="star" width="8.0" /> </SIMPLERENDERER> <EXTENSION type="extract" > <EXTRACTPARAMS clip="true" > <OUTPUTFILE file="us_cities" > <OUTPUTFIELD name="CITY_NAME" alias="City" /> <OUTPUTFIELD name="STATE_NAME" alias="State" /> <OUTPUTFIELD name="POP1990" alias="Population" /> <OUTPUTFIELD name="MALES" alias="Male_pop" /> <OUTPUTFIELD name="FEMALES" alias="Female_pop" /> </OUTPUTFILE> </EXTRACTPARAMS> </EXTENSION> </LAYER> </MAP> </CONFIG> </ARCXML> |
<SPATIALQUERY where="POP1990 > 100000" subfields="CITY_NAME STATE_NAME POP1990 MALES FEMALES" /> |
<EXTENSION type="extract" > <EXTRACTPARAMS clip="true" /> </EXTENSION> |
A typical GET_EXTRACT request: |
<?xml version="1.0" encoding="UTF-8"?> <ARCXML version="1.1"> <REQUEST> <GET_EXTRACT> <PROPERTIES> <ENVELOPE minx="-130" miny="30" maxx="-90" maxy="60" /> </PROPERTIES> </GET_EXTRACT> </REQUEST> </ARCXML> |
An EXTRACT response: |
<?xml version="1.0" encoding="UTF8"?> <ARCXML version="1.1"> <RESPONSE> <EXTRACT> <ENVELOPE minx="-130.000000" miny="30.000000" maxx="-90.000000" maxy="60.000000" /> <OUTPUT file="c:\arcims\output\myservice_mymachine33934311.zip" url="http://mymachine.domain.com/output/myservice_mymachine33934311.zip" /> </EXTRACT> </RESPONSE> </ARCXML> |
Using IMAGESIZE in a GET_EXTRACT request: |
<?xml version="1.0" encoding="UTF-8"?> <ARCXML version="1.1"> <REQUEST> <GET_EXTRACT> <PROPERTIES> <ENVELOPE minx="-130" miny="30" maxx="-90" maxy="60" /> <IMAGESIZE height="600" width="800" /> </PROPERTIES> </GET_EXTRACT> </REQUEST> </ARCXML> |
Using LAYERDEF in a GET_EXTRACT request: |
<?xml version="1.0" encoding="UTF-8"?> <ARCXML version="1.1"> <REQUEST> <GET_EXTRACT> <PROPERTIES> <ENVELOPE minx="-130" miny="30" maxx="-90" maxy="60" /> <LAYERLIST> <LAYERDEF id="Ocean" visible="true" /> <LAYERDEF id="Countries" visible="true" /> <LAYERDEF id="States" visible="false" /> <LAYERDEF id="Provinces" visible="false" /> <LAYERDEF id="Cities" visible="true" /> <LAYERDEF id="35" visible="true" /> </LAYERLIST> </PROPERTIES> </GET_EXTRACT> </REQUEST> </ARCXML> |
Using LAYERLIST nodefault in a GET_EXTRACT request: |
<?xml version="1.0" encoding="UTF-8"?> <ARCXML version="1.1"> <REQUEST> <GET_EXTRACT> <PROPERTIES> <ENVELOPE minx="-130" miny="30" maxx="-90" maxy="60" /> <LAYERLIST nodefault="true"> <LAYERDEF id="Ocean" visible="true" /> <LAYERDEF id="Countries" visible="true" /> <LAYERDEF id="Cities" visible="true" /> <LAYERDEF id="35" visible="true" /> </LAYERLIST> </PROPERTIES> </GET_EXTRACT> </REQUEST> </ARCXML> |
Using SPATIALQUERY with an envelope in a GET_EXTRACT request: |
<?xml version="1.0" encoding="UTF-8"?> <ARCXML version="1.1"> <REQUEST> <GET_EXTRACT> <PROPERTIES> <ENVELOPE minx="-130" miny="30" maxx="-90" maxy="60" /> <LAYERLIST> <LAYERDEF id="Ocean" visible="true" /> <LAYERDEF id="Countries" visible="true" /> <LAYERDEF id="States" visible="false" /> <LAYERDEF id="Provinces" visible="false" /> <LAYERDEF id="Cities" visible="true" > <SPATIALQUERY> <SPATIALFILTER relation="area_intersection"> <ENVELOPE minx="-120" miny="40" maxx="-100" maxy="60" /> </SPATIALFILTER> </SPATIALQUERY> </LAYERDEF> <LAYERDEF id="35" visible="true" /> </LAYERLIST> </PROPERTIES> </GET_EXTRACT> </REQUEST> </ARCXML> |
Using SPATIALQUERY on attribute data in a GET_EXTRACT request: |
<?xml version="1.0" encoding="UTF-8"?> <ARCXML version="1.1"> <REQUEST> <GET_EXTRACT> <PROPERTIES> <ENVELOPE minx="-130" miny="30" maxx="-90" maxy="60" /> <LAYERLIST> <LAYERDEF id="Ocean" visible="true" /> <LAYERDEF id="Countries" visible="true" > <SPATIALQUERY where="NAME LIKE 'C%'" /> </LAYERDEF> <LAYERDEF id="States" visible="true" > <SPATIALQUERY subfields="STATE_NAME POP1990" /> </LAYERDEF> <LAYERDEF id="Provinces" visible="false" /> <LAYERDEF id="Cities" visible="true" /> <LAYERDEF id="35" visible="true" /> </LAYERLIST> </PROPERTIES> </GET_EXTRACT> </REQUEST> </ARCXML> |
Including a dynamic LAYER for extraction: |
<?xml version="1.0" encoding="UTF-8"?> <ARCXML version="1.1"> <REQUEST> <GET_EXTRACT> <PROPERTIES> <ENVELOPE minx="-147" miny="-46" maxx="-43" maxy="70" /> <LAYERLIST> <LAYERDEF id="Ocean" visible="true" /> <LAYERDEF id="Countries" visible="true" /> <LAYERDEF id="States" visible="false" /> <LAYERDEF id="Provinces" visible="false" /> <LAYERDEF id="Cities" visible="true" /> <LAYERDEF id="35" visible="false" /> </LAYERLIST> </PROPERTIES> <LAYER type="featureclass" name="Rivers" visible="true" id="Rivers"> <DATASET name="RIVERS" type="line" workspace="shp_ws-0" /> </LAYER> <LAYER type="featureclass" name="Selected Countries" visible="true" id="Selected"> <DATASET fromlayer="countries" /> <SPATIALQUERY where="NAME='Brazil'" /> </LAYER> </GET_EXTRACT> </REQUEST> </ARCXML> |
Specifying layers for extraction: |
<?xml version="1.0" encoding="UTF-8"?> <ARCXML version="1.1"> <REQUEST> <GET_EXTRACT> <PROPERTIES> <ENVELOPE minx="-147" miny="-46" maxx="-43" maxy="70" /> <LAYERLIST nodefault="true"> <LAYERDEF id="Ocean" visible="true" /> <LAYERDEF id="Countries" visible="true" /> <LAYERDEF id="Cities" visible="true" /> <LAYERDEF id="Rivers" visible="true" /> </LAYERLIST> </PROPERTIES> <LAYER type="featureclass" name="Rivers" visible="true" id="Rivers"> <DATASET name="RIVERS" type="line" workspace="shp_ws-0" /> </LAYER> <LAYER type="featureclass" name="Selected Countries" visible="true" id="Selected"> <DATASET fromlayer="countries" /> <SPATIALQUERY where="NAME='Brazil'" /> </LAYER> </GET_EXTRACT> </REQUEST> </ARCXML> |
Attribute | Paired Attribute | Filename Assignment |
path | baseurl | ArcIMS assigns random filename. |
name | url | User assigns a filename. |
Using OUTPUT path and baseurl in a GET_EXTRACT request: |
<?xml version="1.0" encoding="UTF-8"?> <ARCXML version="1.1"> <REQUEST> <GET_EXTRACT> <PROPERTIES> <ENVELOPE minx="-130" miny="30" maxx="-90" maxy="60" /> <OUTPUT path="c:\arcims\newdirectory" baseurl="http://mycomputer.domain.com/newdirectory" /> </PROPERTIES> </GET_EXTRACT> </REQUEST> </ARCXML> |
EXTRACT response when OUTPUT path and baseurl are used: |
<?xml version="1.0" encoding="UTF8"?> <ARCXML version="1.1"> <RESPONSE> <EXTRACT> <ENVELOPE minx="-130.000000" miny="30.000000" maxx="-90.000000" maxy="60.000000" /> <OUTPUT file="c:\arcims\newdirectory\myservice_mymachine2286774.zip" url="http://mymachine.domain.com/newdirectory/myservice_mymachine2286774.zip" /> </EXTRACT> </RESPONSE> </ARCXML> |
Using OUTPUT name and url in a GET_EXTRACT request: |
<?xml version="1.0" encoding="UTF-8"?> <ARCXML version="1.1"> <REQUEST> <GET_EXTRACT> <PROPERTIES> <ENVELOPE minx="-130" miny="30" maxx="-90" maxy="60" /> <OUTPUT name="c:\arcims\newdirecotory\myzipfile.zip" url="http://mycomputer.domain.com/newdirectory/myzipfile.zip" /> </PROPERTIES> </GET_EXTRACT> </REQUEST> </ARCXML> |
EXTRACT response when OUTPUT name and url are used: |
Figure 3: An EXTRACT Response.
<?xml version="1.0" encoding="UTF8"?> <ARCXML version="1.1"> <RESPONSE> <EXTRACT> <ENVELOPE minx="-130.000000" miny="30.000000" maxx="-90.000000" maxy="60.000000" /> <OUTPUT file="c:\arcims\newdirectory\myzipfile.zip" url="http://mymachine.domain.com/newdirectory/myzipfile.zip" /> </EXTRACT> </RESPONSE> </ARCXML> |
GET_EXTRACT request when OUTPUT is restricted: |
<?xml version="1.0" encoding="UTF-8"?> <ARCXML version="1.1"> <REQUEST> <GET_EXTRACT> <PROPERTIES> <ENVELOPE minx="-130" miny="30" maxx="-90" maxy="60" /> <OUTPUT name="c:\arcims\newdirecotory\myzipfile.zip" url="http://mycomputer.domain.com/newdirectory/myzipfile.zip" /> </PROPERTIES> </GET_EXTRACT> </REQUEST> </ARCXML> |
EXTRACT response: |
<?xml version="1.0" encoding="UTF8"?> <ARCXML version="1.1"> <RESPONSE> <EXTRACT> <ENVELOPE minx="-130.000000" miny="30.000000" maxx="-90.000000" maxy="60.000000" /> <OUTPUT url="http://mymachine.domain.com/output/myservice_mymachine33934311.zip" /> </EXTRACT> </RESPONSE> </ARCXML> |
Using FILTERCOORDSYS and FEATURECOORDSYS in a GET_EXTRACT request: |
<?xml version="1.0" encoding="UTF-8"?> <ARCXML version="1.1"> <REQUEST> <GET_EXTRACT> <PROPERTIES> <ENVELOPE minx="-130" miny="30" maxx="-90" maxy="60" /> <FILTERCOORDSYS id="4326" /> <FEATURECOORDSYS id="54030" /> </PROPERTIES> </GET_EXTRACT> </REQUEST> </ARCXML> |
EXTRACT response: |
<?xml version="1.0" encoding="UTF8"?> <ARCXML version="1.1"> <RESPONSE> <EXTRACT> <ENVELOPE minx="-11777530.8282994" miny="3205046.64322241" maxx="-6782838.54770184" maxy="6329105.54868597" /> <OUTPUT url="http://mymachine.domain.com/output/myservice_mymachine33934311.zip" /> </EXTRACT> </RESPONSE> </ARCXML> |