Select to view content in your preferred language

Spatial Extension in Arcgis

3186
6
06-26-2013 06:06 AM
Labels (1)
AnkitaBhatia
Occasional Contributor
Hi,
We have an EDN license but are not sure if we have the Spatial Extension or not.
Also there is no help we could find on how to use the same.
The team is very new to ESRI products and would greatly appreciate a prompt reply for following:
1. How do I know if my EDN has Spatial Extension? Is there a piece of code I can use and run to make sure it is there?
2. Is there a way other than using a GPK to use Spatial Extension to generate Contour lines? This is really important and we are struggling to find any help on this topic.
When I create a License for the test deployment and check the Spatial Extension -> license strings are added to my test license.
What does that denote?

A few important decisions rely on the availability of Spatial Extension, kindly reply ASAP.
0 Kudos
6 Replies
AnkitaBhatia
Occasional Contributor
Hi,
We have an EDN license and wanted to use spatial extension for generating contour lines.
Before that we wanted to check if we have necessary licenses to get this done.
We got a piece of code as shown below :
public static bool CheckOutSpatialAnalystLicense()
        {

            ESRI.ArcGIS.RuntimeManager.Bind(ESRI.ArcGIS.ProductCode.EngineOrDesktop);

            Type t = Type.GetTypeFromProgID("esriSystem.ExtensionManager");
            System.Object obj1 = Activator.CreateInstance(t);
            IExtensionManagerAdmin extManagerAdmin = obj1 as ESRI.ArcGIS.esriSystem.ExtensionManagerClass;         
            //IExtensionManagerAdmin extManagerAdmin = new ExtensionManagerClass();
            UID uid = new UIDClass();
            uid.Value = "esriGeoAnalyst.SAExtension.1";
            //uid.Value = "esriCore.SAExtension.1";
            object obj = new object();
            extManagerAdmin.AddExtension(uid, ref obj);
            IExtensionManager extManager = extManagerAdmin as IExtensionManager;
            IExtensionConfig extConfig = null;
            extConfig = extManager.FindExtension(uid)as IExtensionConfig;
            extConfig.State = esriExtensionState.esriESEnabled;
            return (extConfig.State == esriExtensionState.esriESEnabled);
        }
and were trying to run the same in a console Application, but we are getting an error
{"Value does not fall within the expected range."} for either any of the below
uid.Value = "esriGeoAnalyst.SAExtension.1";
//uid.Value = "esriCore.SAExtension.1";

We have ben trying to make this run for a very long time now.

Please help us resolve this error.
0 Kudos
MatthewBrown1
Deactivated User
Hi Ankita,

Not all EDN subscriptions include ArcGIS Desktop licenses:

http://www.esri.com/software/arcgis/edn/what-you-get

EDN Basic doesn't include licenses for ArcGIS Desktop (and extensions). But I think this can be upgraded to EDN Advanced. (Talk to your local ESRI rep if this is the case.)

You should be able to go to https://customers.esri.com/ and see the licenses available. (You may need to contact your local ESRI rep to set this up.)

My experience with GPKs is that you need ArcGIS Desktop to author and publish them. The Geometry Service (local or ArcGIS Server) can perform some of these tasks, but sadly not anything from the Spatial Analyst extension. (It would be really great if you were able to write a Python script and call it directly from the Runtime SDK, but I haven't seen examples of that.)

http://resources.arcgis.com/en/help/main/10.1/index.html#//0154000004n5000000

One thing to note, your EDN should include ArcGIS Engine (and extensions) and you may find that this is a good fit for your application, although very different to the Runtime SDK.
0 Kudos
AnkitaBhatia
Occasional Contributor
Hi matthewb,
Greatly appreaciate your help . 🙂
Using Engine is out of question for us and the only software we are looking at for development is "ArcGIS Runtime SDK for WPF".

I would like to try the idea of using a Python script in runtime, but do not know where to start. 😞 (Any help I can get to start the same?)

We do not have a desktop license in our EDN so we will not be able to create GPKs either.

The part that confuses me most is -> I can not see Spatial Extension mentioned any where in my EDN subscription, but when I generate a Test license using license Viewer, it actually creates a key for spatial license part too.

So to test the same I want to use a piece of code that runs only when the system has Spatial Extension for ArcGIS runtime SDK for wpf. Can you please guide me to one?
0 Kudos
MichaelBranscomb
Esri Frequent Contributor
Hi,

To determine what dev/test and deployment licenses you have registered you can use the License Viewer tool that's included with the ArcGIS Runtime SDK for WPF. It's accessed from the start menu.

Licensing in the ArcGIS Runtime is different from ArcGIS Engine, in that licenses are now per-application. For more information please see the licensing and deployment topics in the help: http://resources.arcgis.com/en/help/runtime-wpf/concepts/index.html#/Licensing_applications/01700000....

Regarding the Spatial Analyst Extension - this functionality is accessed in the ArcGIS Runtime via Geoprocessing Packages (.GPK). These packages can include models and scripts and are published from ArcMap. The packaging process does a lot of work behind the scenes to ensure that your geoprocessing tool will still work when you use it within an ArcGIS Runtime application (e.g. validating inputs/outputs, rewiring output paths).

For an example of some functionality that is available with Spatial Analyst please take a look at the Sample Application - under "Geoprocessing" > "Spatial Analyst" there is a Contour sample which uses the Spatial Analyst Contour Tool to convert a DEM to contours.

To create your Geoprocessing Package for use with the runtime please follow the help topic: http://resources.arcgis.com/en/help/runtime-wpf/concepts/index.html#/How_to_author_and_publish_a_geo....

Beyond that, you can read the geoprocessing documentation in the ArcGIS for Desktop help: http://resources.arcgis.com/en/help/main/10.1/#/What_is_geoprocessing/002s00000001000000/.

Only a subset of the desktop GP tools are supported in the ArcGIS Runtime - listed here: http://resources.arcgis.com/en/help/runtime-wpf/concepts/index.html#/Supported_geoprocessing_tools/0....
Cheers

Mike
0 Kudos
MatthewBrown1
Deactivated User
Hi Ankita,

The Spatial extension for Runtime won't appear as an individual item on your EDN page. There's just one rusxxxxxxxxx code (on mine, at least). The extensions are included as part of the development license (see image), but you need to purchase deployment packs separately. (Mike posted the relevant link.)

You should see something similar to this when you use: Start > Programs > ArcGIS > Runtime SDK for WPF > ArcGIS Runtime Tools > Runtime Tools > License Viewer

[ATTACH=CONFIG]25564[/ATTACH]
0 Kudos
MatthewBrown1
Deactivated User
Regarding creating GPKs (or extending geoprocessing functionality) without ArcGIS Desktop, ArcGIS Ideas might be a good place to start, similar to this entry:
http://ideas.arcgis.com/ideaView?id=087E00000004EgJ&returnUrl=%2Fapex%2FideaList%3Fc%3D09a300000004x...

Also, depending on what you are trying to achieve, there might be some native .NET libraries that could manipulate existing rasters.
0 Kudos