|
POST
|
It is not possible for a feature to have an ObjectId of -1.
... View more
02-08-2012
08:53 AM
|
0
|
0
|
1145
|
|
POST
|
GetFeature() takes the ObjectId of the feature you want it to return.
... View more
02-08-2012
08:13 AM
|
0
|
0
|
1145
|
|
POST
|
I have Visual Studio 2010 Professional Edition installed and have just loaded the ArcGIS 9.3.1 SDK and do not see any ArcGIS templates. Do I need to be running Visual Studio 2008 to work with ArcGIS 9.3.1? You can use any version of Visual Studio to program against any version of ArcGIS as long as that version of Visual Studio supports the version of the .NET Framework required by the version of ArcGIS that you're using.. However, the ESRI SDKs are only supported for specific versions of Visual Studio (which versions of Visual Studio depends on which version of the SDK, refer to the developer help). This means if you are using an unsupported version of Visual Studio then you cannot install the ESRI SDK. All the SDK is is a collection of templates and addins for Visual Studio. For me personally, I don't ever use any of those so not having the SDK installed is no big deal. Also, you need to make sure that you're targeting the version of the .NET Framework that is supported by the version of ArcGIS you're programming against. For 9.3.1, that would be .NET Framework 3.5.
... View more
02-08-2012
04:06 AM
|
0
|
0
|
1174
|
|
POST
|
No, ArcGlobe does not have an Editor extension like ArcMap. Of course, you can use the IWorkspaceEdit interface to edit any data you have access to.
... View more
02-07-2012
06:11 AM
|
0
|
0
|
635
|
|
POST
|
Here's a VBA script that will set the background color to red. You can modify it as needed. Sub SetBackgroundColor()
Dim mxDoc As IMxDocument
Set mxDoc = ThisDocument
Dim map As IMap
Set map = mxDoc.FocusMap
Dim layout As IPageLayout
Set layout = mxDoc.PageLayout
Dim gc As IGraphicsContainer
Set gc = layout
gc.Reset
Dim element As IElement
Set element = gc.Next
Do While Not element Is Nothing
If TypeOf element Is IMapFrame Then
Dim mapFrame As IMapFrame
Set mapFrame = element
If mapFrame.map Is map Then
Dim background As IBackground
Set background = mapFrame.background
Dim symbolBackground As ISymbolBackground
Set symbolBackground = background
Dim fillSymbol As IFillSymbol
Set fillSymbol = symbolBackground.fillSymbol
Dim color As IRgbColor
Set color = New RgbColor
color.Red = 255
color.Green = 0
color.Blue = 0
fillSymbol.color = color
symbolBackground.fillSymbol = fillSymbol
mapFrame.background = background
mxDoc.UpdateContents
mxDoc.ActiveView.Refresh
End If
End If
Set element = gc.Next
Loop
End Sub
... View more
02-01-2012
06:57 AM
|
0
|
0
|
1144
|
|
POST
|
I have two feature layers. The first one is just a polygon and the other one consists of a series of polygons which are enclosed by the first one. Thus, some polygons of the second feature layer touch on the boundaries of the first feauture layer. So you're saying you have features in one layer that are inside of a feature on another layer? The definition of "touch" is that the geometries only share a boundary. If one geometry is inside another then they cannot touch because their interiors intersect.
... View more
01-30-2012
04:16 AM
|
0
|
0
|
889
|
|
POST
|
All of the polygons in your export_output_3 shapefile have a negative area. ArcGIS will consider these polygons "holes". The area is negative because the polygons were created in the wrong direction. You can fix the problem by looping through all of the features, getting the shape as IPolygon, calling IPolygon.ReverseOrientation, and setting the updated geometries back to the features. You could also put a check into your current code to look at the area prior to performing the Intersect and reverse the orientation of the polygon if the area is negative.
... View more
01-27-2012
12:07 PM
|
0
|
0
|
3703
|
|
POST
|
Do both geometries have the same spatial reference? If not, then you should project one geometry into the spatial reference of the other before calling Intersect.
... View more
01-26-2012
08:19 AM
|
0
|
0
|
3703
|
|
POST
|
Yes. You set the spatial filter's geometry to whatever geometry will select the features you want. If you want to select features on one layer using the geometries of multiple features from another layer then you need to create a geometry that is the union of those feature geometries. This can be done using ITopologicalOperator. The most efficient method would be to use the ConstructUnion method, which requires an IEnumGeometry object. You can get this from IEnumGeometryBind.
... View more
01-25-2012
08:36 AM
|
0
|
0
|
1144
|
|
POST
|
You set up the Spatial Filter object so that it will select the features that you want to remove. You pass this Spatial Filter into IFeatureSelection::SelectFeatures(). You also set the Combination Method parameter to Subtract.
... View more
01-25-2012
07:55 AM
|
0
|
0
|
1144
|
|
POST
|
You use the interface when checking types with TypeOf. Keep in mind that a symbol can be many different types. If you look at the help for ISymbol then you'll see a list of all the coclasses that implement that interface. In theory, it could be any of them but you can rule some of them out simply because it's a symbol being used by a line layer. That's why I suggested only testing for the ILineSymbol types. If you look at the help for ILineSymbol then you'll see the list of coclasses that you should be checking for.
... View more
01-25-2012
04:31 AM
|
0
|
0
|
1272
|
|
POST
|
You do it the same way you're checking for the renderer type in your code, by using TypeOf. The symbol for a polyline layer will be of type ILineSymbol. There are several coclasses that implement ILineSymbol - MarkerLineSymbol and SimpleLineSymbol are only two of them so you'll need to check for all of the others as well. Dim lineSymbol As ILineSymbol = simpleRenderer.Symbol
If TypeOf lineSymbol Is IMarkerLineSymbol Then
' marker line symbol
ElseIf TypeOf lineSymbol Is ISimpleLineSymbol Then
' simple line symbol
End If
... View more
01-24-2012
04:35 AM
|
0
|
0
|
1272
|
|
POST
|
Thanks Neil, To be honest I think the help on the subject is really poor, so I often have a hard time figuring out if my strings are correct in the first place. Cheers That's the problem I've had when trying to use it. One thing you might try is to use IFeatureSelection to select the points you want. Call SelectFeatures once to select all features then call it again to subtract the points inside the polygon. It will be slower than using a single query but it should work.
... View more
01-19-2012
05:51 AM
|
0
|
0
|
1399
|
|
POST
|
Do the search geometry and the featureclass have the same spatial reference? If not, you'll need to project the search geometry into the same spatial reference as the featureclass you're searching. Alternately, you can set the OutputSpatialReference property on the spatial filter object. Trying to set the description string can be confusing and there have been bugs found in the past, so you may ultimately have to log an incident with ESRI to get to the bottom of it.
... View more
01-19-2012
05:19 AM
|
0
|
0
|
1399
|
|
POST
|
Get a reference to the renderer from IGeoFeatureLayer::Renderer. QI to the correct renderer type (IUniqueValueRenderer, IClassBreaksRenderer). Then all you have to do is create the color objects you want and set the symbol properties on the renderer. The way you access the symbols depends on what type of renderer it is. That information is all in the developer help.
... View more
01-18-2012
05:04 AM
|
0
|
0
|
911
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 06-20-2014 05:29 AM | |
| 1 | 02-01-2011 04:18 AM | |
| 1 | 02-04-2011 04:15 AM | |
| 1 | 01-17-2014 03:57 AM | |
| 1 | 10-07-2010 07:37 AM |
| Online Status |
Offline
|
| Date Last Visited |
11-11-2020
02:23 AM
|