Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Installation
Downloaded the SDK
fromhttp://boundlessgeo.com/solutions/
solutions-software/software/
Extract the archive to a suitable location
on the file system
Ensure the SDK bin is on the PATH
To verify the SDK is installed properly
execute the command suite-sdk from a
command prompt
Creating a viewer
The central object in the architecture of
Creating a viewer
The main configuration options for a
gxp.Viewer are:
Application details
In the example application, the main component (gxp.Viewer) is created with a single configuration
Application details
The viewer configuration defines two layer sources, a
Proxying GeoServer
suite-sdk debug -g
http://localhost:8080/geoserver
/path/to/myviewer
suite-sdk debug -g
http://demo.opengeo.org/geoserver
/path/to/myviewer
Proxying GeoServer
ptype: "gxp_zoomtolayerextent",
actionTarget: ["tree.tbar", "tree.contextMenu"]
}
The actionTarget property tells the plugin where to
place its buttons. In this case we want it in the top
toolbar of the layertree (tree.tbar), and in the trees
context menu (tree.contextMenu)
gxp.plugins.WMSGetFeatureInfo is
gxp_wmsgetfeatureinfo, so we will add
an entry in the tools configuration of
app.js:
{
ptype: "gxp_wmsgetfeatureinfo
}
* @require
plugins/WMSGetFeatureInfo.js
Editing tools
Setting up a feature manager
Setting up a feature editor
Snapping features
Adding a feature grid
Setting up a feature
manager
* @require plugins/FeatureManager.js
Then search for the tools section and add the
following:
{
ptype: "gxp_featuremanager",
id: "states_manager",
paging: false,
layer: {
source: "local",
name: "usa:states"
}
}
Setting up a feature
manager
In the above case the feature manager is
Setting up a feature
manager
Reloading the application will not show any
section:
{
ptype: "gxp_featureeditor",
featureManager: "states_manager",
autoLoadFeature: true
}
Snapping features
Snapping is the act of making features automatically touch when they
Snapping features
Now we hook up our feature editor with the snapping agent. Replace
the existing feature editor tool code block from the previous section:
{
ptype: "gxp_featureeditor",
featureManager: "states_manager",
autoLoadFeature: true
}
with the following:
{
ptype: "gxp_featureeditor",
featureManager: "states_manager",
autoLoadFeature: true,
snappingAgent: "snapping-agent
}
* @require plugins/SnappingAgent.js
feature grid:
{
ptype: "gxp_featuregrid",
featureManager: "states_manager",
outputConfig: {
loadMask: true
},
outputTarget: "south
}
* @require GeoExt/widgets/Action.js
* @require OpenLayers/Control/DrawFeature.js
* @require
OpenLayers/Handler/RegularPolygon.js
* @require OpenLayers/Layer/Vector.js
* @require OpenLayers/Renderer/SVG.js
* @require OpenLayers/Renderer/VML.js
* @require plugins/BoxInfo.js
Add a container for the output to the items section
of the portalConfig definition in src/app/app.js:
}, {
id: "southpanel",
xtype: "container",
layout: "fit",
region: "south",
height: 100
}],
In the tools section, add an entry for the boxinfo tool and direct its output to the
south panel:
}, {
ptype: "myapp_boxinfo",
outputTarget: "southpanel"
}],
One powerful method of performing spatial processing is through the Web Processing
Service, or WPS. This OGC-based protocol, analogous to other protocols such as Web
Map Service (WMS) and Web Feature Service (WFS), allows for client-server
interaction with server-hosted processes. A server can provide WPS processes,
which can then be executed by clients on data they supply or applied to existing
server-side datasets.
Processes fall into three categories: vector, raster, and geometry, referring to the
type of geospatial content used as the processs input. These categories are broad,
as processes can take multiple types of input.
WPS is a service published by GeoServer and so is an integral part of the OpenGeo
Suite. It provides a collection of many standard processes along with the ability to
add additional ones. These processes can be employed inside custom applications,
built with the OpenGeo Client SDK, for a full web-based spatial processing solution.
For example, one can run the JTS:union process on a collection of geometries to
output a single geometry that is the union of them. Processes can be chained, so one
can run the gs:Reproject process to reproject a raster image to a different SRS, then
take the output of that and run gs:CropCoverage to crop the raster down to a certain
bounds. The result can be fed into the gs:Import process to save the resulting
coverage as a new layer in GeoServer, for use by other clients.