|
POST
|
Personally I would convert the text files to dBase or better still a GeoDatabase Table as then your data is in a Table which will make joining easier.
... View more
06-20-2012
06:31 AM
|
0
|
0
|
1503
|
|
POST
|
Another way to release cursors is using the USING statement and ComReleaser. See the VB code below
' For ArcGIS 10 using VS 2010 you need to import the following
Imports ESRI.ArcGIS.ADF.Connection.Local
Imports ESRI.ArcGIS.ADF
Dim pQueryFilter As IQueryFilter
pQueryFilter= New QueryFilterClass
pQueryFilter.WhereClause = "ID = 1"
Using releaser As New ComReleaser
Dim pFeatureCursor As IFeatureCursor
pFeatureCursor = pFeatureclass.Update(pQueryFilter, True)
releaser.ManageLifetime(pFeatureCursor)
Dim pFeature As IFeature
pFeature = pFeatureCursor.NextFeature
While pFeature IsNot Nothing
' Do something with pFeature
pFeatureCursor.UpdateFeature(pFeature)
pFeature = pFeatureCursor.NextFeature
End While
End Using
Duncan
... View more
06-15-2012
01:27 AM
|
0
|
0
|
1073
|
|
POST
|
Szymon, It's been a long time time I've programmed a geometric network so I may be wrong here but I don't think you can mix M values with a geometric network, thats a linear referencing thing? If your trace is returning a valid solution you can then enumerate the results using the Interface IEnumNetEID and build a polyline. You could then use the IMSegmentation3 Interface (once you made the polyline MAware) to calibrate M values to it. Then using the QueryPointAndDistance on the IPolyline interface you could "snap" your points to your measured trace polyline. Duncan
... View more
06-15-2012
01:22 AM
|
0
|
0
|
826
|
|
POST
|
Unless I'm wrong I've always understood that a FeatureLayer can only have 1 selection, therefore what you are asking is not possible. An off the top of my head idea is: You could try creating a field and update that to indicate the first selection. Create a second field and update that with your second selection. Combine the values into these 2 fields into a third field and symbolize based upon the third field? Duncan
... View more
06-15-2012
01:06 AM
|
0
|
0
|
1591
|
|
POST
|
You would do something like: Dim pPolygon as IPolygon pPolygon = new polygon Dim pPointcoll as IPointCollection pPointcoll =pPolygon Creat your points: dim pPoint as IPoint pPoint = new Point pPoint.x = 1 pPoint.Y=1 Then you add your points to build the polygon: pPointcoll.Add(pPoint) Duncan
... View more
06-14-2012
04:00 PM
|
0
|
0
|
529
|
|
POST
|
Samantha, The short answer is no. But you can vote for changes in ArcMap on their ideas website. This is the place to suggest tweaks, improvements or in this case just go back to the old school way of doing it. As you have discovered new is not always better... This is indicated by nearly 2000 people voting on getting the old easy to understand tool back, so go here and vote on it! Duncan
... View more
05-29-2012
02:34 AM
|
0
|
0
|
982
|
|
POST
|
Bruce, Don't know if I am giving you a red herring here but the IGPUtilities Interface has some methods like ReleaseInternalTable and ReleaseInternals try calling these after you have deleted the in_memory workspace. Below is some code I just knocked together in VBA. Duncan
Public Sub DeleteTable()
' Create Utils object
Dim pGPUtils As IGPUtilities
Set pGPUtils = New GPUtilities
' Create GPValue object and set path
Dim pGPValue As IGPValue
Set pGPValue = New DETable
pGPValue.SetAsText ("in_memory\abc")
' Delete table
pGPUtils.Delete pGPValue
pGPUtils.ReleaseInternals
End Sub
... View more
05-28-2012
06:15 AM
|
0
|
0
|
2093
|
|
POST
|
Sui, You should mark this thread as ANSWERED, this helps others. Duncan
... View more
05-28-2012
05:43 AM
|
0
|
0
|
1587
|
|
POST
|
If you have a field that has the same name as the shapefile then you could alter the query to this: desc = gp.describe(fc)
query = "\"%s\" = 'S'" % desc.baseName So if your Shapefile is called C1234.shp then the query string will end up being query = "C1234" = 'S' Duncan
... View more
05-18-2012
02:07 AM
|
0
|
0
|
3536
|
|
POST
|
Abby, Interesting that link has stopped working, I always double check those sort of things, as there is nothing more annoying than a broken link! It looks like ESRI are removing ideas off the website, may be when they are a bit unpalatable for them? You might need to go into your forum profile settings and tick some box on to get the emails, can't remember or its your spam filter blocking them? I did test the behaviour of SelectByLocation and SelectLayerByLocation on a small dataset (if you consider 38,000 polylines small) and experienced no difference in selection count. It looks like there is something fundamentally different between the two tools as alluded to by curtvprice. You should bring this up with their support and they will probably want some of the data to try and replicate it. One last idea (which won't fix the problem but may indicate which one you have more faith in) is to create a buffer layer from your points and use those instead of doing a within distance selection. You'll have a defined geometry which you can see rather than some black box processing done by the tool... Good luck! Duncan
... View more
05-18-2012
01:18 AM
|
0
|
0
|
2011
|
|
POST
|
This line is: query = "\"%s\" = 'S'" % field.Name is failing as you do not declare what field is. But in your reponse you say the field names are C5738 and C9875. If you know them then your query could be simplified to: query = "\"C5738\" = 'S'" But there is a question about your logic as you give TWO field names, which one do you want to process or do you want to select all records where both of those fields equal S? If so the query statement should be: query = "\"C5738\" = 'S' OR \"C9875\" = 'S'" Duncan
... View more
05-17-2012
08:01 AM
|
0
|
0
|
3536
|
|
POST
|
Jenna, A quick google search threw up this thread... Duncan
... View more
05-17-2012
07:38 AM
|
0
|
0
|
14781
|
|
POST
|
Yiman, Next time you upload your code please place it in the code (#) tags as it makes it easier to read. You've lost all your indentation... This is particularly important if the code is Python.
... View more
05-16-2012
08:34 AM
|
0
|
0
|
830
|
|
POST
|
Sui, If your underlying polyline layer was a PolylineM featureclass then you could have used the IMSegmentation3 interface and the GetMsAtDistance method. So you have 2 options: Do it the way you said, nothing wrong with that. When you identify the polyline that the point intersects take a copy of that polyline and turn it into a polylineM feature using your start and end values by using the CalibrateByMs method of the IMSegmentation3 interface. Duncan
... View more
05-16-2012
08:31 AM
|
0
|
0
|
2141
|
|
POST
|
Usman, I don't program in c# so may be what you have done in standard but this line looks odd to me: pOutputFC = pBGP.Intersect(pFeatureClass1 as ITable, false, pFeatureClass2 as ITable, false, tol, pFeatClassName); I would not have done the query interface in the method call. In VB I would have done this: dim pT1 as ITable dim pT2 as ITable pT1 = pFeatureClass1 pT2 = pFeatureClass2 pOutputFC = pBGP.Intersect(pT1, false, pT2, false, tol, pFeatClassName) Also its worth noting that in the Help it says: "The functionality of the BasicGeoprocessor object had been superseded by the new Geoprocessing framework of ArcGIS starting at version 9.0. Developers should utilize the new tools whenever possible." So they are saying don't use it. Duncan
... View more
05-16-2012
08:23 AM
|
0
|
0
|
792
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 07-03-2026 07:31 AM | |
| 3 | 06-29-2026 05:17 AM | |
| 1 | 02-15-2023 05:45 AM | |
| 1 | 06-16-2026 02:37 AM | |
| 1 | 06-15-2026 08:29 AM |
| Online Status |
Offline
|
| Date Last Visited |
yesterday
|