Dynamic Segmentation Utility SOE Rest
nicogis.blogspot.it

This solution (developed in c#) creates a SOE Rest in arcgis server 10.0 with msd for these operations:

- Identify Route M
- Set M point location
- Set M line location

Installation:

a) register and unregister dll and soe

install:
- register dll in SOC machine
1) %WINDIR%\Microsoft.NET\Framework\v2.0.50727\regasm Studioat.ArcGis.Soe.Rest.DSUtility.dll /codebase

- register soe in ArcGIS server (SOM)
1) Studioat.ArcGis.Soe.Register -c Studioat.ArcGis.Soe.Rest.DSUtility -n DSUtility -l "Your title"

uninstall:
- unregister soe in ArcGIS server (SOM)
1) Studioat.ArcGis.Soe.Register -n DSUtility -u
- unregister dll in SOC machine
2) %WINDIR%\Microsoft.NET\Framework\v2.0.50727\regasm Studioat.ArcGis.Soe.Rest.DSUtility.dll /codebase /u


Note: when you register with option codebase, you have a warning because I haven't signed the dll. So, if the component is not to be
deployed to the global assembly cache (GAC), then this option will be required for ArcGIS to find your component successfully;
if the component is installed to the GAC (you sign the dll), the option is not required.


b) create a service map and enable the extension in capabilities. In this msd you must have at least a polylineM.

c) from service directory you can see all your polylineM layers
http://hostname/instanceags/rest/services/PolylineM/MapServer/exts/DSUtility

d) IdentifyRoute operation (for instance) layerID = 0
http://hostname/instanceags/rest/services/yourservice/MapServer/exts/DSUtility/RouteLayers/0/IdentifyRoute

Parameters:

1) location: Geometry Point (see rest api esri)
example:
{"x":-8582617.03619766,"y":4896408.449978509,"spatialReference":{"wkid":102113}}
2) tolerance: number (optional but if you don't set, soe set 0 so you could no have results)
3) routeMeasureUnit: (optional (default is esriUnknownUnits))
example: routeMeasureUnit: esriMeters (see http://help.arcgis.com/en/sdk/10.0/arcobjects_net/componenthelp/index.html#//004200000030000000)
4) routeIDFieldName: string

e) PointLocation operation (for instance) layerID = 0
http://hostname/instanceags/rest/services/yourservice/MapServer/exts/DSUtility/RouteLayers/0/PointLocation

Parameters:

1) routeIDFieldName: string
2) routeID: string, int or double (depends fieldtype routeIDFieldName)
3) measure: double
4) lateralOffset (optional default: 0)
3) routeMeasureUnit: (optional (default is esriUnknownUnits))
example: routeMeasureUnit: esriMeters (see http://help.arcgis.com/en/sdk/10.0/arcobjects_net/componenthelp/index.html#//004200000030000000)

f) LineLocation operation (for instance) layerID = 0
http://hostname/instanceags/rest/services/yourservice/MapServer/exts/DSUtility/RouteLayers/0/LineLocation

Parameters:

1) routeIDFieldName: string
2) routeID: string, int or double (depends fieldtype routeIDFieldName)
3) fromMeasure: double (optional if you set toMeasure)
4) toMeasure: double (optional if you set fromMeasure)
5) lateralOffset (optional default: 0)
6) routeMeasureUnit: (optional (default is esriUnknownUnits))
example: routeMeasureUnit: esriMeters (see http://help.arcgis.com/en/sdk/10.0/arcobjects_net/componenthelp/index.html#//004200000030000000)

In ArcCatalog in capabilities (operations allowed) you can allow these operations (IdentifyRoute,PointLocation and LineLocation).

I have added in file zip an example in api esri javascript to see how to use it.
I have added data used for demo

The solutions are checked 100% with stylecop and fxcop.


Live demo: www.studioat.eu/js/samples/dsutility

Last edited May 20, 2012 at 10:52 AM by nicogis, version 3

Comments

No comments yet.