|
POST
|
The issue is in your doQuery() function. When you set the query geometry you are using the entire extent of the buffer graphic. This is basically a box that contains the graphic (see blue box on image). function doQuery() {
var query = new Query();
query.geometry = graphic.geometry.getExtent(); Update your code to just use the buffer geometry: function doQuery() {
var query = new Query();
query.geometry = graphic.geometry;
... View more
02-04-2015
01:26 PM
|
0
|
13
|
4670
|
|
POST
|
For graphics layers you have the right approach using the the extent.contains() method, or the extent.intersects() method. This sample shows using the draw toolbar to capture the selection extent and then uses the extent.contains() method to return points in the extent. You should be able to use the same approach with a CSVLayer by looping through the CSVLayer.graphics array and using the extent.contains() method.
... View more
02-02-2015
01:24 PM
|
0
|
0
|
2165
|
|
POST
|
Definitely sounds like a permissions issue but you don't want to be handing out the dba role to all your users . It has been a while since I have been involved in doing any SDE administration. Hopefully, someone with some more recent experience sees this and can make a suggestion. I did find this old help file that explains what is created during the selection process - not sure if any of this has changed in version 10. There is also this new help file that may provide some pointers. It also points to a potential issue with the user not having permissions for the Oracle tables used to store selection sets: Tables created for shared log files The log file tables used for this option are SDE_LOGFILES and SDE_LOGFILE_DATA. They are created in the schema of the connecting user the first time the user makes a selection that exceeds the selection threshold. For ArcGIS for Desktop, this threshold is 100 records. SDE_LOGFILES stores information about each selection set (log file) that is created. The logfile_name and logfile_id columns in this table uniquely identify the name of the log file, and the logfile_id column links the log file record to the SDE_LOGFILE_DATA table. The SDE_LOGFILE_DATA table contains the logfile_data_id and the feature identifier for the selected records. All records are deleted as soon as the selection set is cleared to prevent the SDE_LOGFILE_DATA table from growing too large. The SDE_LOGFILES table is truncated when the user's session ends. Both SDE_LOGFILE_DATA and SDE_LOGFILES remain in the user's schema.
... View more
02-02-2015
12:47 PM
|
0
|
1
|
3572
|
|
POST
|
Just a quick note - your updateRow will not be called for 'Validated' rows unless you drop the indentation back one level: # Import system modules
import arcpy
from arcpy import env
# Set environment settings
env.workspace = "F:\Geog390\Lab 3\Lab3.gdb"
env.overwriteOutput = True
cur = arcpy.UpdateCursor("TP_SJ2")
for row in cur:
if row.JOIN_COUNT == 1:
row.VALIDATE = "Validated"
else:
row.VALIDATE = "Not Validated"
cur.updateRow(row) # < this will not be called for 'Validated' rows
del row
del cur Final version should be: # Import system modules
import arcpy
from arcpy import env
# Set environment settings
env.workspace = "F:\Geog390\Lab 3\Lab3.gdb"
env.overwriteOutput = True
cur = arcpy.UpdateCursor("TP_SJ2")
for row in cur:
if row.JOIN_COUNT == 1:
row.VALIDATE = "Validated"
else:
row.VALIDATE = "Not Validated"
cur.updateRow(row)
del row
del cur
... View more
02-02-2015
12:25 PM
|
1
|
1
|
2685
|
|
POST
|
You have a couple of issues to resolve to get this to work: 1. Creating the selection geometry: This is the easy bit - just use the draw toolbar. 2. Query visible map layers: This is where things start to get tricky. There is no way you can query them all at once. Your function will need to use a DeferedList to track when all queryTasks are completed. This post has some great information: How to use dojo.Deferred, dojo.DeferredList, and .then. When all results are returned then you can add them to your central graphics array. Note that you will also need to develop slightly different query tasks depending on the layer type and selection geometry.
... View more
02-02-2015
12:14 PM
|
0
|
2
|
2165
|
|
POST
|
Its hard to tell from the pasted code but you may have a code indentation issue on the updateRow() line. import arcpy
fc = "c:/data/base.gdb/roads"
field1 = "field1"
field2 = "field2"
cursor = arcpy.UpdateCursor(fc)
for row in cursor:
# field2 will be equal to field1 multiplied by 3.0
row.setValue(field2, row.getValue(field1) * 3.0)
cursor.updateRow(row) Note in this sample how the cursor.updateRow(row) line is nested within the for row in cursor loop.
... View more
02-02-2015
11:57 AM
|
2
|
0
|
2685
|
|
POST
|
As your graphics are already within a GraphicsLayer you have access to the click event to handle mouse click events. This will allow you to handle the simple left mouse click scenario. The region selection would require a different approach. Firstly, you would need to capture your region shape using something like the map mouse-down and mouse-drag-end events or alternatively use the draw toolbar to create a graphic. When you have a selection extent you can then loop through all of the graphics in your graphics layer and test which ones intersect your selection graphic using the extent.contains() method. This sample shows using the draw toolbar to capture the selection extent.
... View more
02-02-2015
11:52 AM
|
0
|
0
|
924
|
|
POST
|
The ArcGIS API for JavaScript has lots of information and samples to get your started. Check out the following resources: Build your first application guide Create a map (sample) Dynamic map services (sample) Feature layers (sample) The last two dot points get into using your own ArcGIS server data on a standard basemap.
... View more
02-02-2015
12:56 AM
|
1
|
0
|
695
|
|
POST
|
The OnCreateFeatureEventHandler is only for ArcObjects - this question relates to the JavaScript API Rene has the right approach hooking in to the draw-end event of the Draw toolbar. Also, since the update on editor is done automatically, I am wondering if there could be an event handler for editor complete or update complete!? Are you referring to when the locator has returned a result or something else here? Rene's example logs the address result to the console window but you could also store it.
... View more
02-01-2015
08:23 PM
|
1
|
1
|
2383
|
|
POST
|
I would also recommend Coursera as a useful resource.
... View more
02-01-2015
08:02 PM
|
3
|
0
|
3939
|
|
POST
|
From the tool help - you will need to project your input data to an appropriate coordinate system that uses meters: The distances calculated by this tool are in the unit of the coordinate system of the input features. If your input is in a geographic coordinate system and you want output distances to be measured in a linear unit (as opposed to decimal degrees), you must first project your input to a projected coordinate system using the Project tool. For best results, use an equidistant projection or a projection intended for your study area (UTM, for example).
... View more
02-01-2015
03:24 PM
|
1
|
0
|
971
|
|
POST
|
From memory SDE stores feature classes selection sets within the database. You may want to look at this StackOverflow post about quotas. This is probably a long-shot but it is worth ruling out as a potential cause.
... View more
02-01-2015
01:55 PM
|
0
|
3
|
3572
|
|
POST
|
The error message (000714) indicates a problem with the script. By the elapsed time of 0.00 seconds it looks like your script did not get to any processing steps - this indicates the problem is most likely in the parameter values. Are there any drive mapping differences between the two machines (including file permissions)? It may be helpful to post the core parts of the script.
... View more
02-01-2015
01:35 PM
|
1
|
0
|
1574
|
|
POST
|
The best book that I have come across for learning python is by Mark Lutz: Learning Python, 5th Edition - O'Reilly Media I have the fourth edition and it covers everything you are likely to use except for specific third-party modules such as arcpy or numpy that you may also need to learn. The ESRI blog has a post that may also be useful: Seven easy ways to start learning Python and ArcPy | Support Services Blog
... View more
02-01-2015
12:59 PM
|
4
|
4
|
3939
|
|
POST
|
In ArcMap the GPS functionality is contained within the GPS toolbar. This toolbar would have been implemented using ArcObjects. Arcpy allows you to access geoprocessing tools or manipulate map documents but it has a courser object model than the full ArcObjects – not everything in ArcObjects is available via arcpy. There do not appear to be any arcpy classes or functions that refer to the GPS toolbar functionality so you may be out of luck.
... View more
01-26-2015
06:11 PM
|
1
|
0
|
1386
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 10-07-2014 06:13 PM | |
| 1 | 08-25-2015 02:04 AM | |
| 1 | 10-07-2014 03:54 PM | |
| 1 | 08-07-2014 09:19 PM | |
| 1 | 03-04-2015 02:02 PM |
| Online Status |
Offline
|
| Date Last Visited |
07-21-2021
06:32 PM
|