|
POST
|
Any reason for using IntesectEx on ITopologicalOperator6 rather than Intersect of ITopologicalOperator? Another thing, in your search cursor for the layer 2, if you create a spatial filter with intersect relationship with the layer 1 geometry (single polygon), are you getting all the features you expect?
... View more
01-26-2012
11:20 AM
|
0
|
0
|
3645
|
|
POST
|
Depends what you have to split, a geometry or a feature. If your polygon is already stored in a feature in the featureclass and you want as many features as there will be polygons split by the lines, then cast the Ifeature to an IFeatureEdit and split. That will create new features in the database according to the split rules you have set up in your featureclass. If you have a polygon geometry (shape not attached to a feature yet) or you don't want to store the result in the featureclass, then you would cast your polygon to an ITopologicalOperator4 and call cut2. Cut2 returns a collection of the polygons which will be created by splitting the polygon with the line (just one line so union the lines into one shape first) Then you have the polygons to do what ever you want with (create new features, draw on map, do other topological operations) If you get a polygon shape from a feature and you don't want to change the original, I suggest you user IFeature.ShapeCopy before doing any thing.
... View more
01-25-2012
04:34 AM
|
0
|
0
|
1004
|
|
POST
|
In my case I had two ArcMap sessions that need to edit the data in turn (arcmap1 check out, arcmap 2 edit, arcmap1 clean and check-in). I changed the workflow to have one session do all the edits (edit, clean and check-in.) Aside from that, I would suggest using SQL express if you can (in my case this is not practical for various reasons.)
... View more
01-25-2012
04:26 AM
|
0
|
0
|
4707
|
|
POST
|
The sketch is a transitory object. It only exists as a precursor to the edit operation. An edit sketch is a means for an user to manipulate a geometry (shape.) A geometry is a property of the feature (row in a featureclass.) So basically to create a new feature, you start with an empty sketch, you add vertices to the sketch to create the sketch geometry. When finish sketch is invoked, an edit operation is started, a feature is created and it's shape property is set to the sketch's geometry and the edit operation is completed. The sketch is then discarded. So if you want to click a button after a feature has been created, you need to run it off the selection (what if the user clicks on the button when no sketch has been done, what if the sketch was used to modify a feature, etc.) You could also listen to edit events after a feature was created or added. Regardless you need to get the geometry from the feature (selection or edit event) and use that to do your select by location. You can get the lines that intersect the polygon by doing a query with a Spatial Filter (do a search cursor on the line featureclass with a spatialfilter as a query filter argument.) The get all the geometries of the line features, merge them together (union) and split the polygon feature (Ifeatureedit)
... View more
01-24-2012
08:53 AM
|
0
|
0
|
1004
|
|
POST
|
I am using SP2. I am probably going to be stuck at SP2 for a long time because NIM074169 has been declined, the solution being: "Use SP2". I hope this is not the solution for 10.1 or we will be permanently stuck and 10.0 SP2. http://support.esri.com/en/bugs/nimbus/TklNMDc0MTY5
... View more
01-23-2012
07:06 AM
|
0
|
0
|
1353
|
|
POST
|
A clean way of doing it is taking all the return values and making them input variables by ref to the function and retuning a boolean that is success or fail. In some coding styles that is pretty standard. Another way of doing is raising your own exception in the catch block. You can use an application exception or create your own custom .net exception, you can put your own message, or pass in the first exception into the new exception. You can even re-throw the same exception you caught. Creating a custom exception allows you to catch it separately (if you define a catch block with a specific type of exception, you will only catch that type of exception.) You can have more than one catch block for different exception types. Personally, I try to only put try catch blocks at the highest possible level in the code, at the event handler level. For example in an OnClick event of an Icommand. Any exception that happens in a call to a procedure will automatically bubble up to the highest level to be caught. So you handler in procedure 1 will catch exceptions raised in procedure 2. Exception handling can be performance intensive and putting it in private functions or worse in non user interface classes is usually not an good idea (exception made when an edit operation needs to be terminated correctly on exception.) The reason for that is imagine if someone re-uses your code and calls it in a loop and it generates and catches/logs/deals with hundreds of exceptions. This also allows you to deal with exceptions differently with the same code base for example, on a form (errorProvider), an ArcGIS command or tool (message box), an edit session (abort operation), an exe (write to console), a service (write to event log or database.) Also, if you know an exception condition is likely to occur, it is not an exception any more, you are better off checking for the condition than using the exception handling.
... View more
01-23-2012
04:11 AM
|
0
|
0
|
878
|
|
POST
|
I am running SP2, SP3 had some bugs with the label rotation so I held it back.
... View more
01-23-2012
03:51 AM
|
0
|
0
|
767
|
|
POST
|
Well assuming you have the relationship class object, the IRelationshipClass.OriginClass property is an IFeatureclass that you cast to IDataset. The syntax depends on your language of choice. VB.NET dim originDataset as IDataset = DirectCast(relClass.OriginClass, IDataset) dim name as string = originDataset.Name C# IDataset originDataset = (IDataset)relClass.OriginClass string name = originDataset.Name
... View more
01-20-2012
11:01 AM
|
0
|
0
|
826
|
|
POST
|
Ok, I decided to activate my license before something broke and the manure hit the fan because I was scrambling to find the license codes and authorize them. Right click on the activeX control on the map (you need the license to do this) select properties and you get this [ATTACH=CONFIG]11341[/ATTACH]
... View more
01-20-2012
10:55 AM
|
0
|
0
|
767
|
|
POST
|
I forget exactly how to do it and my license expired and I haven't bothered installing the new one since I really don't do engine development (we have it but don't use it.) To the best of my memory, If you right click on the mapcontrol in the form, you can get to properties and there is a setting to turn the preview the map control in the development environment. As I recall it is a check box in the properties form that allows you to select the start up mxd.
... View more
01-20-2012
04:09 AM
|
0
|
0
|
2118
|
|
POST
|
the origin and destination featureclass are returned of type IFeatureclass interface but they are a FeatureClass class. You need to cast the IFeatureClass to an IDataset which has the name property.
... View more
01-19-2012
09:52 AM
|
0
|
0
|
826
|
|
POST
|
Thanks again Neil, I am doing it on the featureclass level to delete unwanted points in the featureclass and I have some attribute criteria along with the spatial constraints. The code is called inside of arcmap but also in an exe. Reversing the selection would mean also reversing my attribute query. There shouldn't be more than a few hundred points meeting the attribute constraint, so I think I will just use the Irelationaloperator.disjoint on each point. Not the most efficient but probably easier to support in the long term. I just find it annoying that the spatialfilter spatial relationship enum is very limited and the shape comparison language is poorly implemented.
... View more
01-19-2012
06:01 AM
|
0
|
0
|
1353
|
|
POST
|
Thanks Neil, The polygon and featureclass both have the same spatial reference which is a custom polar stereographic. I have had a bad experience going to esri support about the spatialreldescription in the past. I was told that their topologist had just left and they were waiting to get a new one to fix the problem, later the issue was closed because they refused to acknowledge that the behaviour of the method was incorrect. 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
... View more
01-19-2012
05:41 AM
|
0
|
0
|
1353
|
|
POST
|
Hi there, I have a point featureclass (not M or Z aware) and a polygon. I want to use a spatial query to find all the points not in the polygon. As far as I can tell only the spatialRelDescription will do this. The problem is I get inconsistent results. Some points are found as expected other are not. I used the following string: "F********" "******T**" It finds some of the points but never all of the points. I am somewhat perplexed. The alternative is to loop through all the point and use a relational operator but that seems like it would be slower. The SpatialRelDescription should work.
... View more
01-19-2012
04:57 AM
|
0
|
6
|
1743
|
|
POST
|
Does reversing the parent-child order of the versions make any difference? I would doubt it. Looks like you are doing everything ok. I am not enough of an Oracle with SDE expert to point to the right place but I suspect Oracle to be the problem. I assume that a difference cursor between two versions done in oracle would involve some particularly convoluted SQL (all versioning does) and it might be caching things for performance sake. I would look there first.
... View more
01-17-2012
11:31 AM
|
0
|
0
|
1372
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 12-02-2024 10:26 AM | |
| 1 | 07-05-2024 08:45 AM | |
| 1 | 10-05-2022 02:19 PM | |
| 6 | 03-27-2017 01:16 PM | |
| 1 | 05-05-2016 05:46 AM |
| Online Status |
Offline
|
| Date Last Visited |
03-28-2025
07:37 AM
|