POST
|
Hi, I keep getting an error message with the following code. The error message is just generic but I suspect the problem is with the output feature class but I can't figure out exacltly what it is wanting for input (blank FClass, FClass with all the fields prepared?) Any ideas / example code much appreciated :
Dim TargetLayer As IFeatureLayer = New FeatureLayer
TargetLayer.FeatureClass = pFClass
Dim JoinLayer As IFeatureLayer = New FeatureLayer
JoinLayer.FeatureClass = hchange_dFClass
'SpatialJoin
Dim JoinFeat As IFeatureClass = ws.CreateFeatureClass("JoinFeat", _fields, _uid, Nothing, esriFeatureType.esriFTSimple, "SHAPE", "")
'Dim JoinFeatObj As Object = New Object
Dim ISJ As New SpatialJoin
ISJ.join_features = JoinLayer
ISJ.target_features = TargetLayer
ISJ.out_feature_class = JoinFeat
gptool.Execute(ISJ, Nothing)
... View more
07-20-2012
02:28 AM
|
0
|
0
|
368
|
POST
|
Problem was resolved with SP5 . However, it is worth noting that the ArcObject .Net version requires that the path does not contain any spaces. Perhaps add this to the user guide ESRI?
... View more
07-20-2012
02:19 AM
|
0
|
0
|
1450
|
POST
|
Hi, I am not sure if I am facing similar problem. I am trying to reclass a FGDBR raster (statistics calculated) with the followig Ascii table : 0 0.5 : 0 0.5 5 : 1 5 10 : 2 10 15 : 3 15 20 : 4 20 100 : 5 I was originally using ArcObject but when I couln't figure out why it wouldn't work tried it directly via ArcToolbox an got the same error. I have tried integer only version , and a version with 1 to one mappings rather than ranges, just incase, but same error message : Syntax error 010328 Syntax error 010267 I have managed to reclass the rater using Reclassify in Toolbox but I want to implement in ArcObjects and am not sure how to do this without ASCII/INFO table. I am using Arc 10 with SP 3. Regards Neil
... View more
07-12-2012
04:21 AM
|
0
|
0
|
1450
|
POST
|
Hi, I am trying to simply add a layer in programatically. The layer appears in ArcMap, but there is no data there in. If I try to look at layer properties, ArcMap crashes. I've tried both shape and Access workspacefactory , and various shape files in various paths (no spaces etc..) but the same problem. Refreshing the data doesn't make any difference. I can see from the featurelayer properties that the correct data has been found, with the correct number of fields. What am I doing wrong? Thanks Neil Private Sub AddShapefile(ByRef m_Application) Dim mapDoc As IMapDocument = m_Application.Document ' Create a ShapefileWorkspaceFactory object and ' open a shapefile folder. The path works with a standard 9.3 installation. Dim AccworkspaceFactory As IWorkspaceFactory = New AccessWorkspaceFactoryClass() Dim featureWorkspace As IFeatureWorkspace = TryCast(AccworkspaceFactory.OpenFromFile("C:\WindaWorkSpace\Data\WindaPGdb.mdb", 0), IFeatureWorkspace) ' Create a FeatureLayer and assign a shapefile to it. Dim featureLayer As IFeatureLayer = New FeatureLayerClass featureLayer.FeatureClass = featureWorkspace.OpenFeatureClass("winda") Dim layer As ILayer = featureLayer layer.Name = featureLayer.FeatureClass.AliasName ' Add the layer to the focus map. Dim pMap As ESRI.ArcGIS.Carto.IMap = mapDoc.ActiveView.FocusMap pMap.AddLayer(featureLayer) mapDoc.ActiveView.Refresh() Dim t As Integer t = 1 End Sub EDIT : Once again Neil Clemmens saves the day.. When automating from an external application you need to use the IObjectsFactory : http://help.arcgis.com/en/sdk/10.0/arcobjects_net/conceptualhelp/index.html#//0001000001nn000000 Given that most people must now be using VS 2010 or similar to develop, this should be written in big red letters the first page of the esri user help pages!
... View more
03-29-2012
06:30 AM
|
0
|
0
|
2199
|
POST
|
Hi, I have a GWR model with good r2 and AICC. I've tried as far as possible to remove co-linearity from the model, the explanatories for which were selected first by longitudinal MLR of the aggregated data (to avoid spatial auto-correllation), and afew more weeded out through OLS. I know there is still some spatial co-linearity there but as the explanatories vary in significance over space none of the remaining parameters may be considered redundant to the global model. I would like now to predict the dependent variable's map for new scenarious by plugging in different parameter values to one or more of the co-efficients, just as one might in MLR (I appreciate that for GWR this relies on the substantial assumption that the co-efficients will be stable over time accross space). But I'm concerned that local co-linearity may be inflating the effect in some locations for some parameters. Any suggests as to how to model this? Is it legitmate in GWR to attempt to look at the effect of idividual variables in this way? Thanks, Neil p.s. The data is already normalised to a percentage change from each variables mean (i.e. the regression is built on the variance not the absolute values).
... View more
03-29-2012
01:58 AM
|
1
|
0
|
404
|
POST
|
The line is currently being created as a polyline, but is not a second data set. I am tracing many transects accross a dataset and finding what polygon boundaries they intercept, then picking up the attributes either side of that point. The transects start from a subset of the segments of each of those same polygons, hence the opperations multiply up pretty fast. So, I don't necessarily want to maintain the geometry of the intersection points, but equally don't want have to find each location individually as is presently implemented. The InMemoryWorkspaceFactory is a new one to me and combined with a geoprocessing function (e.g. all the transects in once go) could be what I am looking for. Thanks for your help, Neil
... View more
01-11-2012
02:48 AM
|
0
|
0
|
485
|
POST
|
Thanks for your replies. I had thought of using an iGeoprocessing intersect method, but I wonder how it actually works. Does it do any pre-tests to focus the selection of polygons? e.g. minimum bounding rectangles or similar? The help for iTopology_intersect method suggests testing for disjoint first to save time, which suggests that is what the geoprocessor should do, but does it? If it tests against each polygon in the shp file then while the code would be neater it might not be much quicker and could be slower as I would be generating allot of unwanted temporary shape files (the intersect points need to ultimately all end up in the same file). Can one find out about the algorithms behind the ArcObjects classes? Is it commercially confidential or is there a resource detailing them. I haven't found much in this respect in the Resource Centre pages. Thanks again, Neil
... View more
01-11-2012
12:34 AM
|
0
|
0
|
485
|
POST
|
Hello, I have a script which identifies the locations of intersects between n-polygon boundaries and a line (a vector) using shape files without any spatial index. At present it generates a polyline and uses a spatial filter to identify the relevant polygons, then loops through the vertices of each to find the intersection points. It is rather slow as it has to be repeated thousands of times. Implementing a spatial index will be lengthy as it will mean recoding all the references to shp files to access a gdb throughout the software and as I didn't write it I'd rather restrict my tinkering to the one, easily restored, class. My question is what alterative functions users might suggest that could be quicker. I am considering afew : iRay to identify the interesect points Or LocateFeaturesAlongRoutes_lr? Or convert everything to lines and clip to a buffer of the vector first before doing intersect testing.. I am sure there are otherways to skin the cat, but which is likely to see a time saving? Any suggestions or references to a good source of explainations about the algorithms behind the classes would be welcome also, for example I assume spatial filter deploys some sort of prior minimum bounding geometry test but I'd like to know for sure. Thanks for your time, Neil
... View more
01-10-2012
03:07 AM
|
0
|
6
|
1407
|
Title | Kudos | Posted |
---|---|---|
1 | 03-29-2012 01:58 AM |
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:24 AM
|