ArcGIS Server GotDotNet Project…

After I uploaded the project yesterday, I realized that it had a dependancy on the “ClientSide” class library. So, since it was already a mess regarding the namespaces, and all of my source control “shadow” files, I deleted everything off of GotDotNet, made new “clean” copies of the projects on my system (outside of my source control), and uploaded them.

So here’s what’s up there:
OpenESRI.Utilities.ArcGIS.Server.ClientSide

Two classes – MapUtil & ServerUtil, all methods are public shared, so they can be called without instantiating an instance of the class. Both can be used from “client” applications, as they do not make many fine grained ArcObjects calls. ServerUtil basically creates a server context for you. MapUtil has functions for getting an IFeatureLayer or IRasterLayer from the Map, given a the BrowseName.

OpenESRI.Utilities.ArcGIS.Server.SOC

This has 2 COM classes which can be created on the SOC using ServerContext.CreateObject(“OpenESRI.Utilities.ArcGIS.Server.SOC.RasterUtil”) – RasterUtil and SelectionUtil. A third class – GeodatabaseUtil is a COM object which is used by RasterUtil, but is not currently setup so it can be directly created. These classes expose functions which have a lot of fine grained ArcObjects calls, thus it makes sense to run them in the SOC. As for functions, here’s the COM interface list for both classes: RasterUtil

Public Interface IRasterUtil
Function ExtractRaster(ByVal CutterGeometry As IGeometry, ByVal RasterLayer As IRasterLayer, ByVal ScratchFolder As String, ByVal RasterType As String) As IRaster
Function ExtractRasterToDataSetWithLookup(ByVal CutterGeometry As IGeometry, ByVal RasterLayer As IRasterLayer, ByVal ScratchFolder As String, ByVal LookUp As String, ByVal RasterType As String) As System.Data.DataSet
Function ExtractRasterToDataSet(ByVal CutterGeometry As IGeometry, ByVal RasterLayer As IRasterLayer, ByVal ScratchFolder As String, ByVal RasterType As String) As System.Data.DataSet
End Interface SelectionUtil

Public Interface ISelectionUtil
Function SelectFeaturesByAttributes(ByVal Map As IMap, ByVal DataSetName As String, ByVal Query As String) As IFeatureCursor
Function SelectFeaturesByEnvelope(ByVal Map As IMap, ByVal DataSetName As String, ByVal Envelope As IEnvelope) As IFeatureCursor
Function SelectFeaturesByGeometry(ByVal Map As IMap, ByVal DataSetName As String, ByVal Geometry As IGeometry) As IFeatureCursor
Function GetSelectionSetByGeometry(ByVal Map As IMap, ByVal DataSetName As String, ByVal Geometry As IGeometry) As ISelectionSet
Function GetSelectionCountByGeometry(ByVal Map As IMap, ByVal DataSetName As String, ByVal Geometry As IGeometry) As Integer        
Function GetSelectionAsInClausByGeometry(ByVal Map As IMap, ByVal DataSetName As String, ByVal Geometry As IGeometry) As String    &
nbsp;   
Function SelectByAttributeAsSingleFeature(ByVal Map As IMap, ByVal DataSetName As String, ByVal Query As String) As IGeometry
Function SelectByGeometryAsSingleFeature(ByVal Map As IMap, ByVal DataSetName As String, ByVal Geometry As IGeometry) As IGeometry
Function SelectByEnvelopeAsSingleFeature(ByVal Map As IMap, ByVal DataSetName As String, ByVal Envelope As IEnvelope) As IGeometry
Function CombineFeaturesFromCursor(ByVal FeatureCursor As IFeatureCursor) As IGeometry
End Interface

There are also projects which have associated unit tests for all functions (Nunit). You’ll need to make changes to the test initializers so that it will hit your server, and use your data.

Advertisement
This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

Gravatar
WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s