POST
|
Pretty sure this is a current limitation of the Viewer for Silverlight. Either use the entire Map Service or no labels. My work-around was to publish several different services, so at least there isn't one huge group. So for instance, Stormwater Pipe labels are visible when they're viewed as part of their Stormwater Reference Data map service, but the labels aren't visible if using the Feature Service layer dropped in the map above them. Other types of data (Sanitary, Water) are their own groups. This plus the lack of true layer 'groups' (besides the map service work around) are my biggest issues with Viewer at the moment. Good luck, Eric
... View more
03-08-2013
09:02 AM
|
1
|
0
|
294
|
POST
|
Have you tried the Minimum Bounding Geometry tool? It's under Data Management and should do almost exactly what you're asking, or at least get close enough that a few hand edits would finish it out.
... View more
07-19-2012
01:50 PM
|
0
|
0
|
331
|
POST
|
Hello, This would be a real pain, but here's how my Friday brain sees it, perhaps someone else has a more efficient way, since I'm sure there is one. Depending on the size of your area and the number of sinks, and because of the iterative stuff (10cm slices) is going to be pretty rough manually, although you can batch some of it. I'm not familiar enough with Python to know how to code it off the bat... so here are at the processes you could go through. I'm sure a pro Python person could automate this, or at least the back half. A lot of the work at the end could be accomplished with batch runs of the tools. Remember that Excel can (theoretically... sometimes there are issues) interact with the batch processing pane, so you can create the really big batch processes where you're changing slice depths and output file names by regular amounts in Excel. You might check out the page in the ArcGIS help titled "How Sink works". It has a sample workflow that shows how you would create a raster that has the sinks and their depths, which could then be used to determine volumes as you describe. If you work through that list of steps, and verify that it is selecting the areas you want, you could use the sink_depth grid with the Zonal Statistics tool:
Input raster or feature zone data : sink_areas
Zone field : Value
Input value raster : sink_depth
Output raster : sink_depthmx
Statistics type : MAXIMUM
This should leave you with a raster file that represents the sink areas, with each area assigned that area's maximum depth. You could use raster calculator to convert this to an integer grid from which you could convert to a polygon feature class. Each polygon would be attributed with the value from the raster, the maximum depth. Throw out all of them less than your threshold of 30cm, or whatever. From there, you could export each polygon to its own layer (for instance, using Split by Attribute in XTools Pro or something like this. ) Now, start setting up your batches. You'll want to clip your original raster to each of your polygons, so do a batch Data Management->Raster->Raster Processing->Clip using the polygons as the clip features, while keeping straight (via naming) which raster corresponds to which polygon. If your maximum depths are all unique, you're in the clear, if not, assign the polygons a unique value before splitting by attribute, and split on that new unique value. You might want to keep a table that relates the unique ID with the maximum depth. Next you'd want to start doing the volume calculations. You'll have to do one run of the Surface Volume tool per volume slice you want. You'll be using the maximum depth for each grid to slice down by your slice interval. So if a given depth grid has a max depth of 100cm, and you want volumes at every 10cm, this will require 10 different surface volume runs, then reading each of the text files it outputs and probably compiling those values into Excel or something so that they're usable. The rest of it is just repeating that process for all of your sinks. If you didn't have to do the slices, this would be really easy. I welcome anyone's criticism of the above method, as I've never actually done this, but assuming it identified sinks correctly, it seems like it would work. TLDR; Convince the person asking you to do this that you don't need to.
... View more
04-27-2012
10:52 AM
|
0
|
0
|
288
|
POST
|
What event are you calling this Sub from? It may not let you alter the value if it's during the OnUnload event of the form. If that's where it is being called, you might try the OnOK event. Also, when I looked up the Layer object in the "Customizing ArcPad" help, and then clicked on the Records Property, it indicates that it's read only, so it may not be possible to use the Records object to do this. It is possible to programmatically update attributes outside of the edit form, but I haven't done this for shapefiles (have done it with SQL for AXF files) so I'm not sure of the exact methods used. You might try doing this while the Edit Form is displayed and just having a text box whose value you update with the code. Then the value will get saved along with the rest of the form's values. If it were me I'd go this route. Hope this helps, Eric
... View more
03-21-2012
11:23 AM
|
0
|
0
|
137
|
POST
|
I've had bad luck with using the envelope and tolerance parameters, I don't really know why, but they always seems to cause weirdness. You might try removing those parameters, and checking for them after the record is returned, then spitting out a message box. The DistanceTo() and BearingTo() functions can be used for this pretty easily, although checking in an actual rectangular area might be a bit of a pain unless you're a math person. Pretty cool puzzle though... Good luck
... View more
09-12-2011
03:26 PM
|
1
|
0
|
172
|
POST
|
A relative easy way to go about this is to just use a global variable. Declare it outside any subroutines you have in your attached script file, and give it the value of whatever field you want to save during the "unload" event of your form. global_variable = ThisEvent.Object.Pages("PAGENAME").Controls("TEXT OR COMBOBOX NAME").value 'ThisEvent.Object assumes youre in the unload event of the form Next, reassign the value to the form whenever the page with the control on it gets "focus". (ie - when that page is displayed, for whatever reason you can only set the value of controls currently being shown to the user) So for instance, the Onsetactive event of the page with the control on it is a good place to put it. ThisEvent.Object.Controls("TEXT OR COMBOBOX NAME").value = global_variable 'ThisEvent.Object assumes youre in the onsetactive event of a page If you have a bunch of values like this that you want to set, then you could create a subroutine to run during the unload event which saves them all to a global variable array, and then another subroutine to reload the values when their page is displayed. You could use a select case statement on the current page name, so that you just have a simple command that is called on each page's onsetactive event: Call ReloadValues(ThisEvent.Object.Name) 'If called in a page event sends the page name to your subroutine, which could then indicate which values to push out to the form. Sub ReloadValues( pagename ) Select Case pagename Case "Page1" ThisEvent.Object.Controls("TEXT OR COMBOBOX NAME").value = global_variable(1) 'etc etc End Sub Hope this helps! Eric
... View more
07-11-2011
12:51 PM
|
1
|
0
|
414
|
POST
|
If the values for textboxes / comboboxes aren't being automatically populated and the textboxes / comboboxes are tied to a field, then that's sort of weird, but in any case they could be accessed and assigned like this: pLayer.Records.Fields("fieldname").value 'Accesses the value of a field after a bookmark has been set You'll need to access the editform/page/control itself, which you can do a bunch of ways, but since you have pLayer already specified: pLayer.Forms("EDITFORM").Pages("pagename").Controls("controlname").value Combining these two statements we get: pLayer.Forms("EDITFORM").Pages("pagename").Controls("controlname").value = pLayer.Records.Fields("fieldname").value You might put these statements in the onload event of the form rather then the level (applet?) you're calling the other code from. From inside events, it's easy to get references to things by using ThisEvent.Object, which returns the object associated with the event being fired. For onload of an editform, ThisEvent.Object gets you a reference to the form, and could alter the above statement like this: ThisEvent.Object.Pages("pagename").Controls("controlname").value Pages and controls have events as well, so you can hook into stuff at ant level. Hope this helps! If you have any other more specific questions I'll do my best to answer.
... View more
06-16-2011
02:02 PM
|
0
|
0
|
200
|
POST
|
Quick update for anyone else who has a similar issue in the future: I did some exporting on a variety of machines, some on XP / win7, some on more or less powerful machines, and the conclusion I came to was that on my usual work machine, the compression aspect of the export process takes more time than the exporting itself. Taking the image compression off of Adaptive and just putting it on None more than halves the amount of time exporting takes. From there, I just "Reduce file size" from within the Adobe PDF program, and it seems to work just as well / takes much less time. I think I'm just below some RAM threshold or something, because the more powerful machines can export in half the time without their page files getting thrashed as pieces of the final export file are saved. (Shocking, I know, that the more powerful computers get it done faster.) My file sizes went from 30mb to 60mb, but that's still small enough that it's not such a big deal for them to be uncompressed. Good luck, Eric
... View more
05-26-2011
09:58 AM
|
0
|
0
|
319
|
POST
|
Hi Jeff, Yes, it takes around the same amount of time. Sorry, should have specified that originally. If there are any other details you think may be helpful let me know and I'll do my best to fill them in. One random thing I noticed while exporting from ArcMap, is that I don't get many updates on what it is doing in the status bar along the bottom. It seems like normally it will keep updating the user on what it is currently exporting (layer-wise), but that hasn't been the case with this mapbook. I've tried starting with really low settings (50 dpi, "Fastest"), and then walking them up while turning layers on and off, such as my annotation groups / floodplains, but there doesn't seem to be a big difference with any one thing. I thought it would be the annotation or the semi-transparent polygons, but no such luck. Thanks, Eric
... View more
05-19-2011
07:32 AM
|
0
|
0
|
319
|
POST
|
Hello all, I'm creating a DDP mapbook of around 90 24x36 maps. I've been using some of the new (at least, to me) tools such as Tiled Labels to Annotation and a python script to export the maps. I keep all the data stored in a single File GDB on my local drive, with the exception of the aerial. My issue is, when exporting at 300 dpi with "Better" Resample ratio, it's taking around 2 hours for each panel to export. Based on previous experience this seems like way too long. Is this what other people are experiencing? Random information that hopefully is helpful: All of my annotation is done using the Tiled Labels to Annotation tool, so for instance I have 20k road labels, but using the DDP Definition Query it's only showing my current panel's road labels. So, there are at least 6 of these definition queries going on for each panel, but there are no more than 400 labels total on even the busiest map, none are feature-linked, and the entire GDB itself is around 125mb, with the majority of that being the county-wide floodplain and roads. The roads are symbologized in two different ways (different data frames) using representations inside the GDB. There are 3 data frames, but two of them are small, aerial-less locator maps. Here is the python script I've been using to export, it's basically a sample from the help I've modified: import arcpy
from time import strftime, localtime
mxd = arcpy.mapping.MapDocument(r"C:\Documents and Settings\MXD.mxd")
print strftime("%d %b %Y %H:%M:%S",localtime()), mxd.filePath, " Loaded Successfully"
pageNameList = ["I4", "I5", "I6", "J5", "H2", "H3", "H4", "F3", "G2", "G3"]
for pageName in pageNameList:
pageID = mxd.dataDrivenPages.getPageIDFromName(pageName)
mxd.dataDrivenPages.currentPageID = pageID
print strftime("%d %b %Y %H:%M:%S",localtime()), "Printing ", pageName
mxd.dataDrivenPages.exportToPDF(r"C:\Documents and Settings\Mapbook", "CURRENT", "", "PDF_MULTIPLE_FILES_PAGE_NAME", "300", "BETTER", "RGB", True, "ADAPTIVE", "RASTERIZE_BITMAP", False, True, "NONE", True, 80 )
print strftime("%d %b %Y %H:%M:%S",localtime()), pageName, "Printed."
del mxd
Has anyone run into an issue with anything similar? I'm hoping that one particular thing is slowing it down a lot, but any advice about speeding it up in general would be helpful as well. Thanks, Eric
... View more
05-18-2011
07:14 AM
|
0
|
3
|
2195
|
POST
|
I don't believe it's possible to only use VBScript to add events for onaveragestop (or any event). The APL or XML structure of for your feature layer within an AXF file typically gives the user access to the events' code areas where code can be inserted. If you wanted to avoid customizing forms or having whatever you want to do tied to a specific layer you could still access these events using an Applet APL with SystemObjects/GPS added, as opposed to an APL that included forms. Is this what you're asking?
... View more
01-28-2011
07:47 AM
|
0
|
0
|
113
|
POST
|
Outside of using an extension, there currently isn't any way to selectively load tabs like you're saying. You could however disable the controls on those tabs, but then you're still stuck with having to go through all 8 tabs. You might try something weird like altering the .Caption for each page after the checkboxes are clicked so that some page tabs appear small and blank, while the ones you want the users to fill out (ie-thier checkbox was checked) have names such as "SW Page", etc that would indicate that they are "active" pages. The other thing you could do is disable page tabs altogether, and have some buttons that switch to/from pages become enabled as they check the checkboxes. This is probably the only way to have the functionality you describe, and wouldn't be all that difficult since the appropriate methods are available. (page object -> Activate)
... View more
01-18-2011
08:19 AM
|
0
|
0
|
427
|
POST
|
What I think you want to do is the following: Open the AXF and then the feature layer whose editform you want to collect RF measurements in. Add a "System Object" by clicking the icon that looks like a couple of gears. You might have to focus the feature layer's window within ArcPad Studio for it to become active. It'll bring up a menu with various system events in it, so the one we want is Rangefinder -> OnMeasurement. Each time it receives a measurement sentence from the Rangefinder while the editform (perhaps other forms as well?) is active, the script you put into the onmeasurement box will be run. If you need to enter values into different editboxes at different times, you could create some global variables, and set them to the names of those editboxes when they fire thier onsetfocus events, and then clear the variables on the onkillfocus events. Your onmeasurement could look something like this: If Not LRFPage = "" and Not LRFControl = "" Then currForm.Pages(LRFPage).Controls(LRFControl).value = Round((Rangefinder.Distance * 3.2808399),2) End If (In this case, currForm is a global variable referring to the editform that is open. LRFPage and LRFControl are assigned and unassigned (set to "") based on what editbox is currently focused using thier onsetfocus / onkillfocus events as mentioned above. So if no controls are focused, onmeasurement does nothing. ) Let me know if you have any questions, but I'm sort of new to using rangefinders as well, so if anyone has a more elegant solution I'd love to hear about it.
... View more
01-03-2011
01:02 PM
|
0
|
0
|
142
|
POST
|
Would using the .AddItem method on the combobox at the same time you're saving the new DBF entries work? Maybe this is already what you're doing, but it would create the illusion that it's refreshing the DBF-based combobox, but really it's the DBF plus the few new entries. The next time ArcPad gets started up, it will load entirely from the DBF and forget the items you added manually, so it would be pretty seamless to the end user.
... View more
12-20-2010
08:55 AM
|
0
|
0
|
459
|
POST
|
The scripting functions exposed to ArcPad don't make this very easy, but I guess it would be possible. (Worth it? I don't know) You're able to access the Extent of the screen, which is a Rectangle object. You're able to break all features down into thier composite parts. (Polygon / Polyline / Points / Parts / Point objects) You're able to check if a point is in the Rectangle using the Rectangle object's IsPointIn method. So, theoretically, you could break every point in every layer down into thier composite parts, run those points against the Extent of the map (perhaps + some buffer amount), and from there, traverse the object's structure back up to the point where you could access its attributes. This is really clunky and brute-force, probably not feasible if youre on a handheld GPS device as opposed to a tablet / laptop. Another way would be to look at the Extent, create a bunch of random Point objects within that Extent (ie- "the search area") and then loop through them all using the RecordSet::FindNearestXY while recording thier objectIDs to then populate an array that you then use to fill your comboboxes. Having typed out all that other crap above, I'd say that this would probably be the easiest way. This is also pretty brute force and will run slow on a handheld device. (Would it be slower than the field workers having to sort through a combo box with 1000 items in it? maybe not) The problem is that ArcPad doesn't give you access to the types of spatial queries we're used to in ArcMap, and it doesn't let you select multiple features (in the same layer) at one time. As far as I can tell, there's no easy way to ask it to return all (for example) parcels within 1000ft of your GPS location. Good luck!
... View more
12-20-2010
08:50 AM
|
0
|
0
|
129
|
Title | Kudos | Posted |
---|---|---|
1 | 09-12-2011 03:26 PM | |
1 | 08-16-2010 09:10 AM | |
1 | 03-08-2013 09:02 AM | |
1 | 07-11-2011 12:51 PM |
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:23 AM
|