POST
|
Hi everyone, I've been working with the GeoEvent processor for the past few days and am trying to establish a historical record of data that's coming in through one of our inputs. Currently for one of our GeoEvent Services we have two update outputs and a text output that are working flawlessly. I've been running into major issues with respect to the date field in the Add Feature output. At first, the date field in the Add Features output wouldn't populate at all, despite the field's name matching the service object. I updated the expected date property on the input, and it started working. It was in the wrong time zone, so I applied a processor to field calculate the date field -25200000 milliseconds to adjust for the time zone we're in, and that was also working. At 4AM this morning, everything stopped working. The feature class had hit ~85,000 rows and nothing else had been written. I had the "delete old features" option enabled, set to twelve hours, (checking every hour) and the features stopped updating when that should have kicked in. I reconfigured the environment with a fresh copy of the feature class I was writing to, and made it delete everything an hour old. It worked for an hour, and then I started getting these messages: Failed to parse the time value '2015-10-08T19:30:00Z' using the custom format. Using the default date format. java.text.ParseException: Unparseable date: "2015-10-08T19:30:00Z" at java.text.DateFormat.parse(DateFormat.java:357)[:1.7.0_65] at com.esri.ges.adapter.json.FeatureJsonInboundAdapter.parseFeature(FeatureJsonInboundAdapter.java:317)[258:com.esri.ges.framework.adapter.feature-json-adapter:10.3.0] at com.esri.ges.adapter.json.FeatureJsonInboundAdapter.receive(FeatureJsonInboundAdapter.java:164)[258:com.esri.ges.framework.adapter.feature-json-adapter:10.3.0] at com.esri.ges.manager.stream.internal.InboundAdapterProxy.receive(InboundAdapterProxy.java:39)[325:com.esri.ges.manager.internal-streammanager:10.3.0] at com.esri.ges.manager.stream.internal.InboundStreamImpl$DataProcessor.run(InboundStreamImpl.java:79)[325:com.esri.ges.manager.internal-streammanager:10.3.0] After which, not only will the old features no longer be deleted, but no new features will be added to the feature class. My expected date format is: dd/MM/yyyy hh:mm:ss Environment is Windows Server 2008R2, ArcGIS Server 10.3, and SDE database is Oracle 11g. Any advice of things to try would be greatly appreciated, and I'd be happy to provide any further info. Thank you! Jon
... View more
10-08-2015
12:51 PM
|
0
|
1
|
3248
|
POST
|
Hi everyone, Is there a good way to temporarily disable my other map.on("click") events when one of the functions of the dijit measure widget is active? The default behavior of my application is to do an identify on click, and I've got some marquee select tools working in conjunction with the draw toolbar, but for some reason when the measure area tool is active, for example, it tries to fire my identify at the same time, which cancels out of the measure tool. Is it possible to assign a map.on event to a variable and set it to false? I also noticed there's no measure-start event on the widget. Any help would be greatly appreciated, thank you! Jon
... View more
02-11-2014
07:39 AM
|
0
|
2
|
669
|
POST
|
I can't help you with the images, but in the sample for the InfoWindow the C# code behind handles that coordinate window like this: InfoWindow window = new InfoWindow() { Anchor = e.MapPoint, Map = MyMap, IsOpen = true, ContentTemplate = LayoutRoot.Resources["LocationInfoWindowTemplate"] as System.Windows.DataTemplate, //Since a ContentTemplate is defined, Content will define the DataContext for the ContentTemplate Content = e.MapPoint }; The code for the original InfoWindow (for the feature layer) has a return when it's invoked, so this code only fires when you click outside the feature layer. It would probably be as simple as just removing this code as far as I can tell, or you could hook up an if (selection != null) to the original InfoWindow and leave the else unhandled.
... View more
07-20-2012
08:13 AM
|
0
|
0
|
285
|
POST
|
I'm doing this in one of my apps right now, I've got a big dynamicmapservicelayer and I'm removing several layers and group layers so I only display pertinent data. Here's how I did it, but I'm sure someone more savvy could have a better way: private void Legend_Refreshed(object sender, Legend.RefreshedEventArgs e)
{
List<LayerItemViewModel> removeLayerItemVM = new List<LayerItemViewModel>();
List<LayerItemViewModel> removeLayerItemVM2 = new List<LayerItemViewModel>();
List<string> removeLayers = new List<string>();
removeLayers.Add("Service Agreement Areas");
removeLayers.Add("HTE Routes");
removeLayers.Add("Water 3-way");
removeLayers.Add("Water 4-way");
removeLayers.Add("Water 5-way");
removeLayers.Add("Water 6-way");
if (e.LayerItem.LayerItems != null)
{
foreach (LayerItemViewModel layerItemVM in e.LayerItem.LayerItems)
{
//removes the feature layers in the water group layer from the legend:
foreach (LayerItemViewModel livm in layerItemVM.LayerItems)
{
foreach (string rlayer in removeLayers)
{
if (livm.Label == rlayer)
removeLayerItemVM2.Add(livm);
}
}
foreach (LayerItemViewModel rlivm in removeLayerItemVM2)
{
layerItemVM.LayerItems.Remove(rlivm);
}
//collapses all the legend items:
if (layerItemVM.IsExpanded == true)
{
layerItemVM.IsExpanded = false;
for (int i = 0; i < layerItemVM.LayerItems.Count; i++)
{
layerItemVM.LayerItems.IsExpanded = false;
}
}
//removes all the other group layers from the legend:
if (layerItemVM.Label == "General Layers")
removeLayerItemVM.Add(layerItemVM);
else if (layerItemVM.Label == "Storm Layers")
removeLayerItemVM.Add(layerItemVM);
else if (layerItemVM.Label == "Sewer Layers")
removeLayerItemVM.Add(layerItemVM);
}
foreach (LayerItemViewModel remLayerItemVM in removeLayerItemVM)
{
e.LayerItem.LayerItems.Remove(remLayerItemVM);
}
}
else
{
e.LayerItem.IsExpanded = false;
}
} Basically I create a few different lists of layers I want removed, append layers to the lists, and then remove the lists. It got a little tricky with the first nested foreach because I had to break into the layer item view model's layeritems and only remove the layers I defined in the list above. Just for context, the above code removes my general, sewer, and storm items from the legend, and leaves all the water layers except those I added to the removeLayers list.
... View more
07-20-2012
07:52 AM
|
0
|
0
|
477
|
POST
|
Resolved! The problem I was having is, I was creating the schema differences file from the database opposite where I was importing to. If you're going to import the file from one side, you need to create the schema log from that side as well. (Example: make schema changes on the parent, use the compare schema tool on the child with the parent as an input parameter, then import the XML file to the child.)
... View more
12-01-2011
06:25 AM
|
1
|
0
|
667
|
POST
|
Hello everyone, I've got a two-way replica and I'm trying to make some basic schema changes to the parent, and then transfer them to the child. The schema changes I'm trying to make are: adding three fields to a feature class that participates in a feature data set that has a geometric network. I'm not sure if this is supported or not, the chart of allowed schema changes was a little ambiguous to me in this regard. What I'm doing: I right click on the parent database in the catalog window, go to Distributed Geodatabase, and Compare Replica Schema. In the wizard window, I select the child database, the replica name, and output the file to one of our network drives. Then, in the catalog window, I right click on the child database and select Import Replica Schema, and in that window, I navigate to the XML file. After it locates the file, it lags for almost a minute, and eventually populates the input box with the XML file. This is where the problem occurs, the Replica Name and Replica Type sections never get populated, and the "Next >" button stays grayed out. Am I missing an important step, or doing something wrong? Is there some kind of consideration I need to be making? Any help would be greatly appreciated. NOTE: I'm using ArcSDE 10.0, and running Microsoft SQL Server 2008 R2
... View more
11-30-2011
07:50 AM
|
0
|
4
|
1059
|
POST
|
Hi everyone, Here's what I'm trying to do: I have table of building inspectors from one of our Oracle databases. This table changes frequently, based on the work the inspectors will be doing on any given day. What I'm trying to accomplish is establishing a join to the table (doesn't have to be in Oracle, I can create a data dump) from our parcels and keep only matching records. End result will be creating a high resolution PDF map of the city with each inspector's routes mapped, which that department can print at their convenience. I want the matching records to change daily as the table is updated. I've established a join to the data when it's been exported to a geodatabase table format, but it won't let me update the table without stopping the service, because it gets locked. Any advice about how to accomplish what I'm trying, or alternate routes to the same result without creating a lot of sloppy extraneous data? Thanks for your help! Jon
... View more
11-16-2011
07:08 AM
|
0
|
1
|
2131
|
POST
|
Hello everyone, I'm running ArcSDE 10 SP1 with Microsoft SQL Server 2008 R2. I've got some strange behavior in one of our utility feature classes. It's participating in a feature dataset, and when my editors create new features, the ObjectID they're getting assigned is out of sequence. For example, the first thirteen features all had objectID's of 1-13, but the fourteenth had an objectID of 413, and the fifteenth had an objectID of 813. It goes up by 400 each new feature. We had a similar problem with another feature class, except it would be two successive numbers before the big jump in ObjectID (412, 413, 812, 813, etc). This was fixed by exporting the feature class and bringing it back in so the ObjectID's were reassigned in the new feature class. Since this seems to be recurring at this point, I really want to know what's going on. This hasn't caused any immediate problems but I'm curious if anyone knows what could be causing this behavior? I find it unsettling at the very least, and want to make sure it's not a symptom of a greater problem. Thank you!
... View more
10-31-2011
11:50 AM
|
1
|
8
|
4441
|
POST
|
Hello, I've got a web editing application utilizing the feature data form that allows my users to update attributes of water valves (specifically, when and how many times they've been turned). There is a domain ("YES" and "NO") on a field, called TurnFlag, which indicates whether or not the valve has been turned. For values where the domain is NO, they are unable to edit, and tabbing through the fields in the feature data form causes the apply edits button to gray out, as well as being unable to save their edits at all. When the TurnFlag is YES, they can edit normally and are not restricted. I edited this post based on some of my findings. Any help would be greatly appreciated, my water crews use this app all the time and it's stopped working. We did recently make schema changes to the data, but not to any of the outfields. The REST url has not changed, and I've republished the REST service (making sure feature access was enabled). Thanks!
... View more
10-11-2011
08:22 AM
|
0
|
1
|
600
|
POST
|
Seems good so far. I believe we went into Published Toolbox > Script Properties > Parameters and configured the data types and other parameter properties. I'm a little hazy on that part, it was awhile ago and we did it once and never revisited it. I'm looking at the published script now, though, and it does have all the parameters set to match what's in the python and code behind.
... View more
10-05-2011
01:28 PM
|
0
|
0
|
360
|
POST
|
Well you'll notice in the script, it will have this for example: xMin = arcpy.GetParameterAsText(0)
if xMin == '#' or not xMin:
xMin = "4357197" # provide a default value if unspecified
yMin = arcpy.GetParameterAsText(1)
if yMin == '#' or not yMin:
yMin = "1414133" # provide a default value if unspecified
xMax = arcpy.GetParameterAsText(2)
if xMax == '#' or not xMax:
xMax = "4357210" # provide a default value if unspecified
yMax = arcpy.GetParameterAsText(3)
if yMax == '#' or not yMax:
yMax = "1414160" # provide a default value if unspecified So you're setting these variables that the script will use equal to the arcpy.GetParameterAsText, and that GetParameterAsText method is what's reading the jobParameters that you're passing into the script. It goes to work once it receives them all.
... View more
10-05-2011
12:35 PM
|
0
|
0
|
360
|
POST
|
As long as you get the job parameters set correctly I don't think I'm missing anything. Keep in mind the samples I posted are in C#, I haven't used VB.net which I believe you initially inquired about.
... View more
10-05-2011
12:13 PM
|
0
|
0
|
406
|
POST
|
To publish the geoprocessing service you just set the script up in an ArcGIS toolbox like you would any other python script (don't forget to set the parameters). Then you right click on the toolbox and publish to ArcGIS Server. You'll see it in the list with all your map services, except it will have a toolbox icon.
... View more
10-05-2011
11:18 AM
|
0
|
0
|
406
|
POST
|
I'll try my best to explain this correctly... I apologize in advance, I'm a geographer that's learned to write some code, not a CS guy. From the link Patrick posted above, we got the Python script that ESRI staff developed for doing a print with Arcpy.mapping. The python script gets published in ArcServer as a geoprocessing service. I'm sure you know all this already, but I'm starting from the beginning. This geoprocessing service accepts a series of parameters that are passed to it, and then passes these parameters into a template (or multiple templates) that you have created, and are waiting for it to consume. In fact, which template the GP service will use is one of the parameters. We edited the python script a bit for our needs, but it works right out of the box. The way our application works step by step is as follows: User opens the application and selects what they want to print. They use combo boxes or text input boxes (depending which layer they're focusing on) to run a query task that zooms to the feature they want on their map. Once the query is complete and the feature they want to print is on their screen, they select which template they want to use from a separate combo box (for example, we have a map with map elements such as scale bar, locator map, etc, and a plain map without them.) After they have everything selected, they press a button called "Export PDF" which is tied to an event handler that does the following: Sets the PDFTitle variable based on the feature that the query returned (in our app, they do not create their own title, but this is an easy change). Sets the Mapscale variable based on a map scale equation we use to make the features fit perfectly into the data frame. Sets theTemplate variable based on which template they have selected from the combobox. Passes these variables, and all the other arguments they require, to the parameters. Creates the Geoprocessor ExportTask. Executes the ExportTask.SubmitJobAsync Then under the ExportTask.JobCompleted event handler, we: Set our image.visibility = Visibility.Visible (the little PDF image they click to get their map) Set our pdfURL = the url of the PDF that was created (you can change the output location in the python script) Then we have a PDF image mouseleftbuttondown event handler, and when clicked we: HtmlPage.Window.Invoke("PDFs", pdfURL); And the map that was created is opened in a browser window and can be saved, printed, etc. Phew. I hope that helped in some way, like I said if you need more code samples I'll look into getting those available.
... View more
10-05-2011
10:05 AM
|
0
|
0
|
406
|
POST
|
The map title is passed into the GP service in one of the parameters as a string variable. So you could set the variable equal to a textbox.Text that you provide for the user to enter the title, then execute the ExportTask on a button click event handler (or whatever you want). I'll look into hosting a project with as much of the code as I can, but in the meantime I'd be happy to answer any other questions you have about how the whole thing works.
... View more
10-05-2011
09:23 AM
|
0
|
0
|
406
|
Title | Kudos | Posted |
---|---|---|
1 | 12-01-2011 06:25 AM | |
1 | 10-31-2011 11:50 AM |
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:23 AM
|