|
POST
|
I am new to python so I am working through a comparison script that will let me know if there are any differences between an mdb and a feature class (FC). Both tables with contain roughly 500,000 records. When comparing it takes probably 30 seconds for each record to find a match. I find this method to be extremely slow and I still need to add another match field. Is there a better way to compare the tables? Eventually my end result will: Remove records from the FC that are no longer in the mdb table. If the recor in the mdb is newer (based on comparing time stamp field) the FC record will be removed. Any records not found or that have newer data than FC will be added to a table in my SDE database that is dynamically geocoded back to the FC.
# Import system modules
import arcpy, os
desc = arcpy.Describe
# Local variables:
table = "D:/HOPOLICIES/Test.mdb/tblHOPolicies"
fc = "Database Connections\\ArcSDE.sde\\ArcSDE.A10713.HOPolicies_NW"
cField = "Policy_Number"
rows = arcpy.SearchCursor(table)
row = rows.next()
while row:
tableValue = row.getValue(cField)
rows2 = arcpy.SearchCursor(fc)
row2 = rows2.next()
while row2:
fcValue = row2.getValue(cField)
if tableValue == fcValue:
print tableValue + " Match Found to " + fcValue
break
row2 = rows2.next()
row = rows.next()
... View more
04-23-2012
12:03 PM
|
0
|
4
|
1843
|
|
POST
|
Well i decided to make my own symbol using the ControlTemplate and visual states. I would love to be able to recreate the same orange glow used for selected items. Would anyone at ESRI be able to provide the code used for the symbol animation?
... View more
04-13-2012
07:37 AM
|
0
|
0
|
2406
|
|
POST
|
Well after spending a day trying to get past this I am baffled. I did notice that if I use my add-in with custom symbology to add a graphics layer and then change the symbology using congiguration tool, the highlighted when selecting comes back. I can't figure out a way to reference the build in symbology from an add-in. I willing to try any ideas you may have.. Thanks.
... View more
04-12-2012
11:11 AM
|
0
|
0
|
2406
|
|
POST
|
I have a map service with multiple layers with each have different scales to turn on and off. They work fine in my Silverlight Viewer apps. Do the scales work when previewing th Java from the rest endpoint? One thing I noticed with SL Viewer is that when you make changes to a service, sometimes I have to re-add the service to the map if it is a pre-existing map. Clearing the REST Cache has also helped when republishing changes to a service. Hope that helps..
... View more
04-11-2012
08:29 AM
|
0
|
0
|
572
|
|
POST
|
Here is a screenshot so you can see where the template can be found. If you expand silverlight and do not see the ESRI Viewer option than I am not sure what is going on. I have the ESRI Silverlight API installed. The Silverlight Viewer Installation guide doesn't say it is needed but i never tried without. [ATTACH=CONFIG]13350[/ATTACH]
... View more
04-09-2012
12:13 PM
|
0
|
0
|
4395
|
|
POST
|
When using the Resource Dictionary to define symbols I find that the highlighting a point when selected no longer works. Is this something that needs to be defined when creating the symbol? If there is a better to use the build in symbols in the viewer to maintain the selected item highlighting I am open to that. Here is how I am defining my symbols currently. <UserControl.Resources>
<ResourceDictionary>
<esri:SimpleMarkerSymbol x:Key="BlueMarkerSymbol" Color="Blue" Size="12" Style="Circle" />
<esri:SimpleLineSymbol x:Key="RedLineSymbol" Color="Red" Width="4" Style="Solid" />
<esri:SimpleLineSymbol x:Key="BlueLineSymbol" Color="Blue" Width="4" Style="Solid" />
<esri:SimpleFillSymbol x:Key="RedFillSymbol" Fill="#66FF0000" BorderBrush="Red" BorderThickness="2" />
<esri:SimpleFillSymbol x:Key="BlueFillSymbol" Fill="#660000FF" BorderBrush="Blue" BorderThickness="2" />
<esri:SimpleFillSymbol x:Key="WhiteFillSymbol" Fill="#AAFFFFFF" BorderBrush="#DD000000" BorderThickness="2" />
<esri:PictureMarkerSymbol x:Key="RedStickpin" OffsetX="16" OffsetY="32" Source="/PolicyQuerySpatial.AddIns;component/Images/RedStickpin.png" Height="32" Width="32" />
<esri:PictureMarkerSymbol x:Key="BlueStickpin" OffsetX="16" OffsetY="32" Source="/PolicyQuerySpatial.AddIns;component/Images/BlueStickpin.png" Height="32" Width="32" />
</ResourceDictionary>
</UserControl.Resources>
... View more
04-09-2012
11:57 AM
|
0
|
0
|
2406
|
|
POST
|
Hi Brian, Unfortunately it is a bug. The Nimbus number is: NIM069739. At this point no workaround other than your suggestion to make sure every field has data. Katy Oh well. Thanks for the info. Do you know how I would reference the table if I wanted to create my own export function?
... View more
04-05-2012
12:29 PM
|
0
|
0
|
990
|
|
POST
|
I have a particular layer where there are fileds that may not have a value. Viewing the table for this layer works fine. However, when attempting to export as a CSV the data does not output correctly. If a record has any fields with no value the data for that record is pushed to the columns to the right. For example if I have a table with 2 columns names ObjectID and CustomerNumber and the CustomerNumber is blank in one record, on export the ObjectID for that record would now be placed in the CustomerNumber field and the ObjectID field would be blank. Is this a known issue and is there any resoulution besides making sure all fields have data? Thanks!
... View more
04-05-2012
05:07 AM
|
0
|
3
|
2992
|
|
POST
|
Thanks Mathew. I did end up using a join and it seems to be working properly. I appreciate your input.
... View more
04-02-2012
12:27 PM
|
0
|
0
|
777
|
|
POST
|
I am looking for a way to automate a process of updating a layer from a table. I have my CIS dept updating an SQL table (Claims) in my SDE database which does not have any spatial attributes. I have a feature class (Customers) which has an matching key to that table. Is there a way to create and update a Claims feature class from the joined tables? This would be something that would run every 30 minutes when the new claims data is added to the claims table. I have been experimenting with a workflow in Catlog but can't seem to come up with the right combination of tools. Any help is appreciated. Thanks!
... View more
03-30-2012
06:44 AM
|
0
|
2
|
1059
|
|
POST
|
I created a tool in which a user can draw a polygon and it will call out to our geometry server and return a buffered result that is added to a graphic collection. In most cases the results is correct but sometimes I receive a polygon back that has holes in it. There seems to be no rhyme or reason when this occurs. Has anyone run into a similar situation? Any resolution? In the attached sample the blue is the user drawn polygon and the white is the buffer returned. You can see to the northeast and southern portions of the user drawn polygon that the buffer underneath has large gaps.
... View more
03-27-2012
05:04 AM
|
0
|
0
|
1735
|
|
POST
|
FYI.. I solved my own problem by converting double to int32. int Sum = featureSet.Features.Select(g => Convert.ToInt32(g.Attributes["Cov_A"])).Sum();
... View more
03-23-2012
08:05 AM
|
0
|
0
|
663
|
|
POST
|
I have an add-in that queries a Feature Layer and displays results as a graphic layer. I would also like to summarize some of the returned data to display to the user. I am attempting to do sum a single field below and then display in a message box(for now). The field listed below does exist and is returned in the query and is type Double. I get the following error. Any ideas. int Sum = featureSet.Features.Select(g => (int)g.Attributes["Cov_A"]).Sum(); MessageBox.Show (Sum.ToString()); Error occured at PolicyQuerySpatial.AddIns.QueryDialog.<QueryTask_ExecuteCompleted>b__7(Graphic g) at System.Linq.Enumerable.WhereSelectListIterator`2.MoveNext() at System.Linq.Enumerable.Sum(IEnumerable`1 source) at PolicyQuerySpatial.AddIns.QueryDialog.QueryTask_ExecuteCompleted(Object sender, QueryEventArgs args) at ESRI.ArcGIS.Client.Tasks.QueryTask.OnExecuteCompleted(QueryEventArgs args) at ESRI.ArcGIS.Client.Tasks.QueryTask.<>c__DisplayClass6.<request_Completed>b__4(FeatureSet fs, Exception ex) at ESRI.ArcGIS.Client.Tasks.FeatureSet.<>c__DisplayClass2.<FromJsonAsync>b__0(Object s, RunWorkerCompletedEventArgs e) at System.ComponentModel.BackgroundWorker.OnRunWorkerCompleted(RunWorkerCompletedEventArgs e) at System.ComponentModel.BackgroundWorker.<OnRun>b__1(Object state)
... View more
03-22-2012
10:39 AM
|
0
|
1
|
886
|
|
POST
|
Thanks Katy. I was looking at that in the API Best Practices but I am having trouble referencing the resource dictionary i created. Based on my XAML above, how do i reference the resources? UserControl.Resources and QueryDialog.Resources does not work. *Update I figured it out. I just used Resources["SymbolKey"] and it worked. Thanks for pointing me in the right direction.
... View more
03-22-2012
06:36 AM
|
0
|
0
|
2406
|
|
POST
|
Hi- I am trying to symbolize a graphic that I am drawing. I can't seem to use the the resource I created. Am I missing something? <UserControl x:Class="PolicyQuerySpatial.AddIns.QueryDialog" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:esri="http://schemas.esri.com/arcgis/client/2009" mc:Ignorable="d" d:DesignHeight="160" d:DesignWidth="325" xmlns:toolkit="http://schemas.microsoft.com/winfx/2006/xaml/presentation/toolkit" Opacity="1"> <Grid x:Name="LayoutRoot" Background="Transparent" Height="160" Width="325" Opacity="1" HorizontalAlignment="Right"> <Button Height="32" HorizontalAlignment="Left" Margin="91,44,0,0" Name="btnLine" VerticalAlignment="Top" Width="32" Click="btnDrawLine_Click"> <Button.Content> <Image Source="/PolicyQuerySpatial.AddIns;component/Images/EditingEditLine32.png" /> </Button.Content> </Button> <Button Height="32" HorizontalAlignment="Left" Margin="143,44,0,0" Name="btnPolygon" VerticalAlignment="Top" Width="32" Click="btnDrawPolygon_Click" > <Button.Content> <Image Source ="/PolicyQuerySpatial.AddIns;component/Images/EditingEditShape32.png" /> </Button.Content> </Button> <CheckBox Content="Include Policies within a distance of:" Height="16" HorizontalAlignment="Left" Margin="12,95,0,0" Name="chkBuffer" VerticalAlignment="Top" /> <TextBlock Height="23" HorizontalAlignment="Left" Margin="116,122,0,0" Name="txtMiles" Text="Mile(s)" VerticalAlignment="Top" /> <toolkit:NumericUpDown Height="22" HorizontalAlignment="Left" Margin="38,120,0,0" Name="numBuffer" VerticalAlignment="Top" Width="56" Maximum="500" /> </Grid> <UserControl.Resources> <ResourceDictionary> <esri:SimpleMarkerSymbol x:Key="GreenMarkerSymbol" Color="Green" Size="12" Style="Circle" /> <esri:SimpleLineSymbol x:Key="RedLineSymbol" Color="Green" Width="4" Style="Solid" /> <esri:SimpleFillSymbol x:Key="RedFillSymbol" Fill="#66FF0000" BorderBrush="Red" BorderThickness="2" /> </ResourceDictionary> </UserControl.Resources> </UserControl> private void btnDrawPoint_Click(object sender, RoutedEventArgs e) { drawObject.DrawMode = DrawMode.Point; _activeSymbol = LayoutRoot.Resources["GreenMarkerSymbol"] as Symbol; drawObject.IsEnabled = (drawObject.DrawMode != DrawMode.None); }
... View more
03-22-2012
05:43 AM
|
0
|
9
|
2618
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 05-21-2026 06:15 AM | |
| 4 | 03-12-2025 11:01 AM | |
| 3 | 01-08-2025 09:26 AM | |
| 1 | 01-08-2025 07:19 AM | |
| 1 | 12-06-2024 04:52 AM |
| Online Status |
Offline
|
| Date Last Visited |
2 weeks ago
|