Select to view content in your preferred language

Explorer SDK question

755
3
11-12-2010 08:43 AM
TerryGiles
Frequent Contributor
I'm new to AGX but have experience developing both Desktop tools and Server applications in .Net.  I have a client who is interested in drawing polygons in AGX, intersect them with an existing landownership layer (shapefile on disk) and then doing some basic area reporting.  They'd also like to be able to save the results as a shapefile so it can be passed off to other apps (which only seem to support shapefile input).

Looking at the SDK, blogs, and forums the 1st part of this seems possible, but it doesn't look like I can create a shapefile through the SDK.  Build 1500 has the ability to save graphics out as a layer package which in reality is a Zip file containing a file geodatabase. 

Is it possible to use other ESRI interfaces/libraries such as esri.arcgis.geodatabase.IFeatureWorkspace::CreateFeatureClass to make a shapefile and then iterate through the polygons/rings the user drew and create features in the shapefile (I'm assuming a polygon in the AGX sdk cannot be directly cast to a esri.geometry.polygon)? 

A couple of side notes - this will be done in the field with no internet access so I can't use ArcGIS Server GP services or online data;

ArcGIS Desktop is not installed on the field laptop.


Any suggestions, comments, thoughts would be greatly appreciated.

Thank You,

Terry
0 Kudos
3 Replies
TerryGiles
Frequent Contributor
Upon further experimentation and reviewing the SDK classes, it looks like AGX can really only support the part of the request to draw polygons.  I don't see any way to perform a clip or intersect other than using an Analysis tool and if I understand it correctly Analysis tools have to be GP services from ArcGIS server right?  This won't work for my needs as the application will need to be used in remote locations with no connectivity.

Has anyone else tried to create functions for AGX that basically mimic the standard methods if ITopologicalOperator (e.g. buffer, clip, intersect, union).  If so can you share some code or point me to links? 

Thanks again,  Terry
0 Kudos
MichaelBranscomb
Esri Frequent Contributor
Terry,

You can perform a spatial intersection using the Table.Search() method (http://help.arcgis.com/en/arcgisexplorer/1500/sdk/componenthelp/index.html#/Search_Method/0003000008...). "Tables" in ArcGIS Explorer represent both non-spatial data and spatial data. The Search method takes a Filter which has a SpatialSearchType property - which can be one of Contains, Intersects, etc (see http://help.arcgis.com/en/arcgisexplorer/1500/sdk/componenthelp/index.html#/FilterSearchOptions_Enum...).

There's no sharing/packaging support in the API though so you'd need to work out a way to do this. You're probably aware that there are a variety of 3rd party .NET Shapefile libraries available which would let you do this. I'm aware others have done things with the XML representation of a Note from ArcGIS Explorer to import to ArcGIS Desktop.

Regards

Mike
0 Kudos
TerryGiles
Frequent Contributor
Thanks for the link Mike.  I had looked at the Table::Search method but it looks to work more like a spatial filter than performing an intersect.  I think we've decided to move the project in question to an Engine application given we're looking at writing a lot of non AGX code any way.   Thanks again, TG
0 Kudos