POST
|
It sounds like there's a syntax problem somewhere. Seeing your code would be helpful for us to find the issue.
... View more
05-06-2010
09:44 AM
|
0
|
0
|
465
|
POST
|
If the suggestion above doesn't work for you, you might want to take a look at this help page from esri: http://webhelp.esri.com/arcgisdesktop/9.3/index.cfm?TopicName=Writing_geometries It is fairly straightforwards using the script examples to write the X and Y coords of the points into a polygon.
... View more
04-22-2010
11:27 AM
|
0
|
0
|
699
|
POST
|
You could try a spatial join on the different polygon classes, then make a new field calculated from the joined attributes, e.g if field a = yes, then new field = new field + "A"
... View more
04-22-2010
07:24 AM
|
0
|
0
|
173
|
POST
|
not sure if this would help, but you can write output to memory using "in_memory\featureclassname". It's not possible to edit this feature class but you can read from it.
... View more
04-21-2010
09:59 AM
|
0
|
0
|
150
|
POST
|
Has anyone ever tried to write a threaded geoprocessing script? I'm currently working with a script that will take about 40 hours to finish calculating. I'd love to make this a bit more efficient by using both my cores. The thing that I'm pretty sure is going to stop me from doing it is data locks from cursors...can you run two simultaneously on the same dataset?
... View more
04-20-2010
11:41 AM
|
0
|
0
|
487
|
POST
|
I just tried your code myself on a test dbf and got the right output. I would take a look at your test file. Maybe the points are identical?
... View more
04-20-2010
09:37 AM
|
0
|
0
|
250
|
POST
|
Thanks, this is just what I was looking for. I can do the majority of what I need with the native geoprocessor, it's just I want to use a couple specific objects. But this is excellent, now I can use them in python.
... View more
04-14-2010
10:01 AM
|
0
|
0
|
1396
|
POST
|
Anyone know if there's an efficient way to use ArcObjects in a Python script? If not, does anyone know if there's a way to convert a VBA macro to a tool/script? I need to use ArcObjects to perform some calculations, but doing this through a macro saved in an mxd (like I do now) is definitely not the most efficient method...I guess I could take the time to learn C# but if there's a simpler way, that would be ideal. Anyone got suggestions?
... View more
04-14-2010
06:56 AM
|
0
|
6
|
6129
|
POST
|
A (relatively) simple way to do this is to make a macro and run this function:
Private Function GetArea(FeatureA As IFeature, FeatureB As IFeature) As Double
Dim SourceArea As IArea
Dim TargetArea As IArea
Dim TopoOp As ITopologicalOperator3
Dim IntersectArea As IArea
Set SourceArea = FeatureA.Shape 'FeatureA and FeatureB are the polygons to be checked for overlap
Set TargetArea = FeatureB.Shape
Set TopoOp = TargetArea
Set IntersectArea = TopoOp.Intersect(pSourceArea, esriGeometry2Dimension)
GetArea = (IntersectArea.Area / SourceArea.Area) * 100 'returns the percentage of first polygon which overlaps second polygon
Set SourceArea = Nothing
Set TargetArea = Nothing
Set TopoOp = Nothing
Set IntersectArea = Nothing
End Function
You could then check GetArea against certain preset values, etc, to determine whether or not it would need to be rotated. I've found this particular percentage of intersect code to be invaluable, it'd be nice if ESRI had included a tool to do this.
... View more
04-14-2010
06:41 AM
|
0
|
0
|
1673
|
POST
|
A (relatively) simple way to do this is to make a macro and run this function:
Private Function GetArea(FeatureA As IFeature, FeatureB As IFeature) As Double
Dim SourceArea As IArea
Dim TargetArea As IArea
Dim TopoOp As ITopologicalOperator3
Dim IntersectArea As IArea
Set SourceArea = FeatureA.Shape 'FeatureA and FeatureB are the polygons to be checked for overlap
Set TargetArea = FeatureB.Shape
Set TopoOp = TargetArea
Set IntersectArea = TopoOp.Intersect(pSourceArea, esriGeometry2Dimension)
GetArea = (IntersectArea.Area / SourceArea.Area) * 100 'returns the percentage of first polygon which overlaps second polygon
Set SourceArea = Nothing
Set TargetArea = Nothing
Set TopoOp = Nothing
Set IntersectArea = Nothing
You could then check GetArea against certain preset values, etc, to determine whether or not it would need to be rotated. I've found this particular percentage of intersect code to be invaluable, it'd be nice if ESRI had included a tool to do this.
... View more
04-14-2010
06:40 AM
|
0
|
0
|
1673
|
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:23 AM
|