|
POST
|
Hi dkwiens, this is a piece of the code not the whole script. I delete the cursors at the end.
... View more
08-05-2016
04:57 AM
|
0
|
0
|
3932
|
|
POST
|
Hello everyone, The goal is to find all the records that were deleted comparing yesterday and today versions of the same feature class. I am running a python script that uses cursors. With the curosr I am able to identigy the record that was deleted because it was in the featuer class yesterday but not today. When I insert a new record using "arcpy.da.InsertCursor", "curAppend.insertRow( rowYesterday)", two fields SHAPE_length and SHAPE_Area are equal to 0. ArcCatalog does not show any shape information in the preview, but shows only attributes in the Table view. It looks like features were created witout spatial data, only attributes. dsc = arcpy.Describe(Layer_DEFAULT)
fields = dsc.fields
#
# List all field names except the OID field
#
fieldnames = [field.name for field in fields if field.name != dsc.OIDFieldName]
curYesterday = arcpy.da.SearchCursor(Layer_DEFAULT, fieldnames)
curToday = arcpy.da.SearchCursor(Layer_PREPROD, fieldnames)
curAppend = arcpy.da.InsertCursor(Layer_D,fieldnames)
for rowYesterday in curYesterday:
#
# layerID = layerID
# datetimeVal = CRTDATE
#
layerID = rowYesterday[0]
datetimeVal = rowYesterday[4]
#print rowYesterday[1]
#print rowYesterday[2]
#print rowYesterday[3]
#print rowYesterday[4]
#print rowYesterday[5]
#print rowYesterday[0]
if datetimeVal is not None:
whereClause = '"AGMID" = %s' % (layerID)
srcToday = arcpy.da.SearchCursor(Layer_PREPROD, fieldnames, whereClause)
count = 0
for rowToday in srcToday:
if rowToday[4] == rowYesterday[4]:
count = count + 1
if count == 0:
print "Record for Delete :", layerID
logging.info('Delete ' + whereClause)
curAppend.insertRow( rowYesterday)
... View more
08-04-2016
01:47 PM
|
0
|
11
|
6345
|
|
POST
|
How to execute spatial queries Get the feature and its geometry given an ObjectID. Dim stateFeature As IFeature = stateFeatureClass.GetFeature(14) Dim queryGeometry As IGeometry = stateFeature.Shape ' Create the spatial filter; "highwayFeatureClass" is the feature class containing ' the highway data. Set the SubFields property to "FULL_NAME" as only that field ' is shown. Dim spatialFilter As ISpatialFilter = New SpatialFilterClass() spatialFilter.Geometry = queryGeometry spatialFilter.GeometryField = highwayFeatureClass.ShapeFieldName spatialFilter.SpatialRel = esriSpatialRelEnum.esriSpatialRelIntersects spatialFilter.SubFields = "FULL_NAME"
... View more
07-01-2016
11:20 AM
|
0
|
0
|
1478
|
|
POST
|
How do I populate or initialize the envelope with the shape of the current polygon I am selecting. The goal is to select a polygon and list all points and lines. // Create the envelope and define its position. IEnvelope envelope = new EnvelopeClass(); envelope.PutCoords(-84.4078, 33.7787, -84.3856, 33.7997);
... View more
07-01-2016
11:08 AM
|
0
|
0
|
1478
|
|
POST
|
Hello everyone, How can I find all points and lines that intersect or are included in a polygon? I am writing a console application to list pipes and points with a specific criteria inside a polygon. Thanks
... View more
07-01-2016
08:04 AM
|
0
|
3
|
3557
|
|
POST
|
Hello everyone, How do you recommend to create a field for Comments or Notes in a feature class? as a text field? What will be the maximum size? Thanks.
... View more
06-30-2016
08:19 AM
|
0
|
2
|
3373
|
|
POST
|
Hello everyone, where can I find additional information about error code -532459699. thanks
... View more
06-13-2016
11:15 AM
|
0
|
1
|
1575
|
|
POST
|
Hello everyone, I am looking for samples in C# or VB.net that explain how to create a polygon using a X,Y coordinate and creating a buffer around it. Thanks
... View more
05-23-2016
07:54 AM
|
0
|
1
|
2684
|
|
POST
|
Hello everyone, How can I find differences between 2 SDE child versions using C# or VB.net. Both versions (version 1 and version 2) that have the same parent, Default. How can I identify the features that changed from a specific feature class from version 2 and copy these changes to version 1? Can I change the parent for version 2 from Default to version 1 and then apply a reconcile and post? Please advise
... View more
05-16-2016
01:41 PM
|
0
|
3
|
4308
|
|
POST
|
Hello everyone, When copying or appending a feature class with attachments into another feature that has also attachments does it copy the attachments? Can it be done with Model Builder?. Thanks
... View more
05-05-2016
12:29 PM
|
0
|
4
|
3616
|
|
POST
|
Hello everyone, I exported several layers metadata to .xml files in 9.3 and now when I try to import the xml file into the layer in 10.2 it fails. Anyone with the same problem? Thanks
... View more
04-27-2016
11:33 AM
|
0
|
1
|
2631
|
|
POST
|
I took a look to this link. I do not see any event that will trigger when the editor creates or modifies a new feature. This is what I would like to implement that works already in an Add-In: 'Invoked when a feature is created or modified Private Sub Events_OnCreateFeature(ByVal obj As ESRI.ArcGIS.Geodatabase.IObject) Dim inFeature As IFeature = CType(obj, IFeature) Dim featureClass As IFeatureClass Dim intNextMyEditableLayerId As Integer featureClass = CType(obj.Class, IFeatureClass) DisplayFieldNamesAndAliasNames(featureClass) ' MsgBox(featureClass.AliasName) If featureClass.AliasName <> "MyEditableLayer" And featureClass.AliasName <> "APP.MyEditableLayer" Then Exit Sub End If ' GetConnectionStrings() intNextMyEditableLayerId = NextMyEditableLayerNumber() ' Populate the next MyEditableLayerID available ' Dim fieldIndex As Integer = featureClass.FindField("MyEditableLayerID") If fieldIndex = -1 Then Exit Sub End If inFeature.Value(fieldIndex) = intNextMyEditableLayerId
... View more
04-18-2016
10:20 AM
|
0
|
1
|
1516
|
|
POST
|
Hello everyone, This question is about how to add logic in ArcGIS Online to fields that are populated by application, not by data entry. I was able to create in ArcGIS Online a Web Mapping Application that has only one layer. The layer is a feature service pointing to SDE in a versioned environment. The layer is a polygon. The ArcGIS Online web mapping application works fine. It allows to digitize a new feature polygon and populate its attributes. My question is about how pre-populate some attributes with default values such as: Date Created, Date when record was created CreatedBy, Editors User ID DateModified, Date when record was modified for the last time ModifiedBy, Editors User ID PrimaryKeyID, populated with a sequential number, obtained from a sequencer in Oracle Other fields like municipality or commission district that are populated with the value of the Municipality or Commission district where this polygon intersects For desktop applications I solved this issue creating an ArcMap Add-In. In the old Web ADF I solved this issue using the event: Protected Sub EditorTask1_PostToolExecute(ByVal sender As Object, ByVal editorToolEventArgs As EditorToolEventArgs) Handles EditorTask1.PostToolExecute I would like to know how to do that with Web AppBuilder
... View more
04-15-2016
11:21 AM
|
1
|
4
|
4108
|
|
POST
|
Ho Alaor, I am currently looking to develop a solution similar to your in ArcGIS 10.3.1 Will you create a class extension and a ArcGIS Server Service or a ArcGISServer extension with ArcGIS Server? Thanks
... View more
04-14-2016
06:12 AM
|
0
|
0
|
613
|
|
POST
|
Hello everyone, I created a Feature Server in ArcGIS Server 10.3 http://localhost:6080/arcgis/rest/services/.../EditableFeature/FeatureServer/0 and now I am looking for any source code sample in .Net that explains how to call Supported Operations: Query Apply Edits Add Features Update Features Delete Features Generate Renderer Return Updates
... View more
04-14-2016
06:05 AM
|
0
|
0
|
2353
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 3 weeks ago | |
| 1 | 05-01-2026 12:34 PM | |
| 1 | 12-02-2022 08:17 AM | |
| 1 | 12-26-2025 05:02 AM | |
| 1 | 08-05-2025 04:28 AM |
| Online Status |
Offline
|
| Date Last Visited |
a week ago
|