POST
|
You can bring your Modelbuilder work into python, and then add some python code to write out a text file. For example you could have the python code comb through the cache files to report how many files have been written or when the last tile / compact cache file was created / updated. Also Python can output text to the geoprocessing window just like modelbuilder. You can also create log files with Python which make it easier to create a single summary text file. -George
... View more
01-26-2012
10:12 AM
|
0
|
0
|
1003
|
POST
|
Also be sure to check your casing: the methods for Getting and Setting Values are: getValue(field_name) setValue(field_name, object) --Took this straight for ArcGIS help Some of the posts in this thread had the wrong casing (e.g. 'SetValue') -George
... View more
01-25-2012
07:20 AM
|
1
|
1
|
2355
|
POST
|
The 'Select Layer By Location' tool takes in a layer, not a feature class. So remember if you run it as a tool outside of ArcMap you'll need to make a feature layer of the Roads. You could also add a selection for rows with no 'STFID' value before the select layer by location. So something like: 1. Select Rows from 'Analysis Roads' where STFID is null/empty 2. Subset Selection 1 using Select Layer by Location. That way you're not having to do as much geometry calculations toward the end of the script. I often troubleshoot things like this by running the tools from the toolbox, manually. Then copy them as python snippets in and hook them together.
... View more
11-21-2011
04:26 AM
|
0
|
0
|
455
|
POST
|
- Can you plug in all six cameras at once or is it one at a time? - Do the cameras generate unique file names for the images? For example Could IMG_0001.jpg be generated from two different cameras? And if so could you change the naming convention on the camera? - Are the images 'in' the geodatabase or is it a table/fc in the gdb with a link to the images on the disk? - Do you want the images to be 'in' your access database or is it ok for them to be files in a folder? You could write a script that updates the MDB with data from the photo database, and you could have that run on a schedule, so for example you set everything up and then every night when you leave it runs automatically. I think the database connection would be updated when ArcGIS starts, but that's the database connection in ArcCatalog. Best way to figure that out is to try it.
... View more
11-21-2011
03:58 AM
|
0
|
0
|
177
|
POST
|
Thought I'd share my experience with topic. I'm reading a CSV file, making a feature layer from it, and performing transformations on the geometry. In the end I'm updating the feature class's fields with the geometry, e.g. Point.X, .Y, and .Z going into 'Easting', 'Northing', and 'Altitude' fields. At first I used the 'Calculate Field' tool for each field. Of course to do this I had to use the tool three times, one for each field. Next I tried using one update cursor and thus doing all three updates in one loop through the feature class. I found it shaved off 3-4 seconds. If you need to go through and calculate multiple fields then you may want to consider using the Update Cursor instead of the 'Calculate Field' tool. It could save you a lot of time.
... View more
11-16-2011
09:23 AM
|
2
|
2
|
4739
|
POST
|
Thanks for posting that. I modified it to find duplicate points based on same exact X,Y: Pre-Logic Script Code:
d = {} # creates an empty dictionary the first time
def find_duplicates(valX,valY):
d[(valX,valY)] = d.setdefault((valX,valY), -1) + 1
return d[(valX,valY)]
Expression: dup =
find_duplicates( !SHAPE.firstpoint.x!, !SHAPE.firstpoint.y! ) I used the 'Feature Vertices to Points' tool, but it produced duplicate points at the common vertices. I couldn't find an out of the box tool to filter them.
... View more
10-26-2011
04:54 AM
|
0
|
0
|
653
|
POST
|
If you are looking to calculate the geometry of a shape and then put that value in a field, then you can do with python. Look at the ArcGIS Desktop Help under 'Calculate Field Examples', towards to the bottom it shows how to calculate geometry. For example Area: !Shape.Area! Length: !Shape.Length! X/Y/Z/M for first point in a line !Shape.firstPoint.X! If you are looking to convert units (e.g. KM to Miles) you can even do that within the expression. So drag in the 'Calculate Field' tool to Modelbuilder, and then build the expression to calculate the geometry you need. (Note I'm assuming your using 10.0+, I don't think this Python capability was in pre 10)
... View more
10-21-2011
04:33 AM
|
0
|
0
|
5313
|
POST
|
Depending on your data model you could make 'streets' out of your polylines, create an address locator service, and then do a reverse geocode.
... View more
05-31-2011
04:35 AM
|
0
|
0
|
856
|
POST
|
For the identify parameters layerOption, you can choose from: 'LAYER_OPTION_ALL', 'LAYER_OPTION_TOP', 'LAYER_OPTION_VISIBLE' These options query against the default service visibilities and layer orders, correct? I was putting together the the identify sample with the toggle layer example, and even though I turned a layer off, I would still get an identify result if I clicked on a feature. For example, turn off lakes, click where a lake is, and I'd get the lake even though it wasn't visible. Thanks, George
... View more
05-25-2011
05:35 AM
|
0
|
1
|
566
|
POST
|
I found that for visualization purposes it is alot faster to 1. Not Generate Polygons 2. Generate Lines 3. Symbolize the Lines Based on the Total Accumulated Costs You end up with the same result, but it is a little more realistic because you aren't generating a drive time for an area inside a polygon. Also, you can play around with the symbology more because instead of generating polygons at a limited set of intervals (e.g. 10 min, 20 min, etc) you generate the lines which have the exact time to get to that line. So you could have the same underlying data and make several visualizations off of it.
... View more
04-08-2011
09:48 AM
|
0
|
0
|
807
|
POST
|
I am playing around with Line Barrier - Scaled Costs based on an external set of geometry. I have the base road data with costs in minutes and the barrier I am adding is scenic byways (road that are fun to drive on). I loaded byway data via 'Load Locations' and use the Geometry as the 'Location Position'. I expected that it would snap to the street data but it doesn't. Therefore because the byway data isn't coincident with the street data the route analysis essentially ignores it. I am able to select roads from the street data (ones that are on scenic byways) and the load those into the line barriers and get expected results. I can also add a buffer of the byway data and use that as a polygon barrier and get expected results. Any ideas on the simplest way to do this? I think buffer is straight forward, and probably most accurately reflects the physical phenomena. It would tag some side roads, but I would expect those roads to be somewhat scenic also. Does the polygon come at a much higher computational cost? Thanks, George
... View more
04-08-2011
09:17 AM
|
0
|
0
|
3247
|
POST
|
I have worked with linear referencing problems before, but am just getting into network analyst. One simple thing you could do to start troubleshooting the problem is select a really small number of roads (maybe 5) from your original data and then run them through your process. The whole time keeping an eye on topology, node m-values, lengths, etc. It sounds like you want to: 1. Planarize your original roads 2. Make a Gravel Road Event Layer (based on an external table you have?) 3. Buffer the Gravel Road Event layer and use the buffered layers as a polygon cost barrier for the Network analysis Linear Referencing and Network Analyst are related, and it is confusing because both freely use the term 'Route'. But 'Route' in Linear Referencing parlance is more for 'Route IDs', Node M-Values, and transforming event data between them. Where as 'Route' in Network Analyst is more of a least cost and direction based analysis. From what you wrote it seems that you have gravel road data that will be used as a route event layer (Linear Referencing) and that route event layers will be used as an input for your Find Route Analysis (Network Analyst).
... View more
04-08-2011
07:22 AM
|
0
|
0
|
241
|
POST
|
I created a table, and then started editing it, however when I select a record, the record doesn't show up in the Attribute Window (from the Editor Toolbar). I discovered this because I'm trying to populate an attributed relationship class between tables. I made a feature class out of the table (geocoded addresses) and the attributes window is populated correctly and I can create attributed relationships. Am I missing something here? I'm running ArcGIS 10, with Service Pack, and the tables are in a File Geodatabase. Thanks, George ---Update I found that if I had as Origin-Destination: Feature Class A - Table A (Fa - Ta) Table A - Table B (Ta-Tb) That I could add relationships in Ta-Tb if I got to the origin key in Ta via Fa-Ta. But that I couldn't add relationships in Ta-Tb directly.
... View more
03-31-2011
01:47 PM
|
0
|
0
|
290
|