|
POST
|
Hi Amy, I wonder whether the Summary Statistics tool can help in your case. Probably not but it sounds like something there should be a tool for. Anyhow, in Python, I would approach this with a search cursor (or other cursor depending on how you want to store the result). The key hint is that you can sort rows before you start searching them using the sql_clause parameter of arcpy.da.SearchCursor. In principle, I would first initialize variables to remember the last_line_id, last_code. Then, call a search cursor on the initial table, order records by Line ID Ascending, Year Ascending, and Code Ascending. Loop through each row and check whether your current_line_id is the same as last_line_id and if current_code is different from last_code. If the above condition it true, you know the code has changed so you have to remember that year for current_line_id. Don't forget to set last_line_id = current_line_id and last_code = current_code by the end of each iteration. If current_line_id is different from last_line_id, you will want to re-initialize the last_code variable and make sure you don't count it as a fake change of code for the previous line. We used this approach to solve a similar problem some time ago. Maybe you can adapt the code from there: Python to select younger of two polygons with similar attributes If you want some code sample specifically for your situation, please explain exactly how you want the result to be structured.
... View more
09-16-2014
01:17 PM
|
0
|
3
|
1789
|
|
POST
|
Aha, that's a good point about the locks, Curtics. So it's best to delete the layer as soon as you are done doing what you needed the layer (or table view) for.
... View more
09-15-2014
12:25 PM
|
0
|
0
|
985
|
|
POST
|
Ohhhhh, thank you so much! It works now. I did read the help over and over but my brain apparently was not paying attention.
... View more
09-12-2014
09:02 AM
|
0
|
0
|
724
|
|
POST
|
Hi, I am having difficulties getting just a single feature from time-enabled Dynamic Layer with JS API 3.10 and ArcGIS for Server 10.2.2. When I query a MapServer service over the HTML REST API interface with the proper time parameter, I get just one feature as expected. When I execute query task in JavaScript with query parameter set to 'query.time = map.timeExtent', the response contains features from all times. I checked the request that the browser actually sends (in Chrome's Network tools) and the time parameter is missing. So it looks like the JavaScript library does not append the time parameter to the request. I tried several ways of specifying query.time and I tried JS API 3.8 and 3.9 too, but nothing worked. Can anyone confirm that the time parameter works? Regards, Filip.
... View more
09-11-2014
10:55 AM
|
0
|
2
|
1271
|
|
POST
|
Yes, the way Alice Pence described is one of the easiest. It sounds complicated but once you have done it couple of times it will become pretty natural. Jim Cousins has a great suggestion too, just remember that you can easily locate any tool if you use the search window.
... View more
09-08-2014
02:02 PM
|
0
|
0
|
959
|
|
POST
|
Hi all, here is another text about dojo I really liked. It took me a while to get to the end where it gets a bit dense, but overall very well put and in my opinion well worth reading. It points out some of the advantages of dojo over other frameworks and illustrates building widgets in a clear example. Dojo Monk: Dojo for jQuery Developers Filip.
... View more
09-08-2014
01:50 PM
|
0
|
0
|
453
|
|
POST
|
Phew... to my best knowledge, that is not possible. As long as you grant read access (SELECT oeration), the user can read everything. The only way to do something similar to what you describe would be to publish the layer as a service. Depending on what type of service you publish and what type of capabilities you enable, users will not be able to work with it as with a standard feature class. At the same time though, this may be a problem for how you do want your users to use the layer in ArcMap. Any other idea? F.
... View more
09-04-2014
12:13 PM
|
0
|
0
|
993
|
|
POST
|
Thank you for this crystal clear explanation and the reference to docs. I'm sure I went over that at some point but over time it got all mixed up in my head. Much appreciated. F.
... View more
09-03-2014
01:08 AM
|
0
|
0
|
1716
|
|
POST
|
Hi, I am glad to see somebody brought this up. I was so pleased when Esri announced that ArcSDE will be part of both Desktop and Server products since 9.2 but to this day I haven't been able to use it the way I expected on Desktop. Vince Angelo, could you please explain how or to what extent is ArcSDE technology available in ArcGIS for Desktop? I thought I would be able to, for example, turn my PostGIS database on localhost into an "enterprise geodatabase" and use it fully in ArcGIS while I could still benefit from full SQL (SELECT) flexibility in pgAdmin or through ArcSDESQLExecute tool. However, whenever I try to set up a geodatabase on a proper RDBMS, it turns out that actually I cannot do it with ArcGIS for Desktop alone and that I need ArcGIS for Server to do that. For example Enable Enterprise Geodatabase tool requires some kind of authorization file from ArcGIS for Server Enterprise. So is it possible to create a geodatabase in a proper RDBMS with ArcGIS for Desktop only or not? Regards, Filip.
... View more
09-02-2014
04:33 PM
|
0
|
3
|
1716
|
|
POST
|
Strange..., try setting some more environments settings: in_raster = r'c:\path\to\the\raster' arcpy.env.snapRaster = in_raster arcpy.env.extent = arcpy.Describe(in_raster).extent Consider also arcpy.env.cellSize and other environment settings listed towards the end of the Tool's help. Also, I think the tool may fail if the polygon you are trying to clip the raster with is too small (relative to the raster cell size). Does your polygon cover more than just a few cells?
... View more
09-02-2014
03:37 AM
|
2
|
2
|
843
|
|
POST
|
Hi, if Add Surface Tool works for you that's fine, there are usually more ways to do similar things. I am not sure I understand your question whether it can be used as a model. I haven't used the Ordinary Least Squares tool in ArcGIS so I am not sure what the exclamation mark means. Check the documentation. Can the tool be used in Model Builder? Yes. Is the model 'good enough and informative'? You should be able to tell based on the report file or the console output as described in Interpreting OLS results . Are you saying you don't get this kind of report but just an exclamation mark? How do the other outputs look like? Especially the coefficients table. F.
... View more
09-02-2014
03:16 AM
|
1
|
0
|
1027
|
|
POST
|
Hi Dimitris, I remember I struggled with this too, but I cannot recall if there is any tool for that. The code below is roughly what I would try. I don't have ArcGIS at hand at the moment to test it, but hopefully any glitches are only minor. The key is that you can refer to individual bands within a raster dataset by their correct path, just like you can drill down to them in the Catalog directory tree. Usually, bands are called Band_1, Band_2, and so on. The problem is that sometimes they have different names (Layer_1, etc.) The code below deals with this by looping through whatever children the raster has and getting the correct name. Results (individual raster bands) are stored as individual rasters in the output directory.
import arcpy, os
in_raster = r'c:\path\to\raster.tif' # input multiband raster
out_folder = r'c:\path\to\output\folder' # preferably an empty folder
desc = arcpy.Describe(in_raster)
for band in desc.children:
bandName = band.name
band_path = os.path.join(in_raster, bandName)
dest_path = os.path.join(out_folder, bandName + '.tif')
arcpy.CopyRaster_management(band_path, dest_path, "", "", "", "NONE", "NONE", "") # change parameters here
I have a feeling there might be a more elegant solution, but if you cannot find it, give this a go. Make sure you change the parameters at row 2,3, and 11, then just paste it into Python window and hit enter. And then enter again. The code is inspired by 41145 - Add individual raster bands from a multiband raster... and Extract one band from 3 band raster Let us know if this works for you, I'd really want to know. Filip.
... View more
09-01-2014
02:24 PM
|
2
|
0
|
5899
|
|
POST
|
Hi Ben, As far as I know, it is not possible to perform overlay operations on features with different number of dimensions (2D vs 3D). If you need to preserve your 3D values, you'll need to convert your 'grid' to 3D features. I haven't got ArcGIS at hand now to give you an example, sorry. Hopefully somebody else can. Filip.
... View more
09-01-2014
01:32 PM
|
0
|
0
|
422
|
|
POST
|
Hi JK, Anthony Giles and Richard Fairhurst both have excellent ideas, I just want to add that this kind of question is often addressed by using Euclidean Distance (Spatial Analyst) tool to generate a raster surface where value of each cell indicates distance of that cell to the nearest river. Then you can use Extract Values To Points in order to get the distance values for each of your stoat visiting place. This is just another one of many options. You should be able to decide what will work for you considering your spatial resolution, number of points, area of interest, etc. Regards, Filip.
... View more
09-01-2014
01:26 PM
|
2
|
2
|
1027
|
|
POST
|
Hi, I have never done this before but I am guessing you could use the applyEdits end point of a Feature Service. Apply Edits (Operation) May I bring this python module to your attention: arcapi/arrest.py at feature-arrest · NERC-CEH/arcapi · GitHub It is part of arcapi package. although editing has not been implemented, the module makes it easier to interact with the REST end points. Look at some example at the bottom. Do you have any live feature service we could try this update on? Cheers, Filip.
... View more
08-29-2014
08:32 AM
|
0
|
2
|
1383
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 02-05-2014 04:40 AM | |
| 1 | 02-08-2015 12:49 PM | |
| 1 | 07-20-2014 12:41 PM | |
| 1 | 03-23-2017 01:48 PM | |
| 1 | 08-18-2014 04:14 PM |
| Online Status |
Offline
|
| Date Last Visited |
11-11-2020
02:23 AM
|