POST
|
I've figured out the problem. Somehow a typo was introduced into the CheckExists.py script that checks for the existence of the feature dataset. There was a space in the path of the workspace variable. I don't think I ever edited that script, but I must have, because the typo doesn't exist in the Sample Models.
... View more
02-12-2013
06:35 AM
|
0
|
0
|
335
|
POST
|
Thanks for your response, Dale. Based on what you've said, the model and script in question should work. So if the model always evaluates to false, then there must be some other part of the script that is misbehaving. Ponder this further I must.
... View more
02-11-2013
09:49 PM
|
0
|
0
|
335
|
POST
|
Hello, I'm not sure if this is the best place to ask about this, but... Recently I have been working through the exercises in the ESRI Press book Getting to Know ArcGIS ModelBuilder by David W. Allen, and I have found what I believe may be a mistake in exercise 3D (exercise D, chapter 3). It would be pointless and possibly a breach of copyright to reproduce all the steps and processes of the exercise here, so I will assume you have a copy of this book available. In this exercise, the user creates a Python script to check a geodatabase workspace for the existence of a feature class, and creates one if none exists. However, I believe this script only checks for feature classes in the root of the geodatabase, without checking for feature classes inside a feature dataset. Since this exercise creates its feature classes within a feature dataset, the check will never resolve to True. If a feature class with the same name already exists in the workspace, the model itself won't run - ArcGIS will flag the feature class name as inappropriate during the parameter input stage. The model asks for a feature dataset as a parameter where the feature class will be stored, and checks for the pre-existence of the feature dataset, but it doesn't check for feature classes that already exist within the feature dataset. And the "Empty FC to Store Schema" template appears to remove any feature classes that exist within the feature dataset, so the model never even notices whether a feature class of that name already exists. Am I missing something here? I'm just getting started with this stuff, so it's possible that I am not understanding this correctly. If anyone has access to this book, and experience with Python and modeling, I'd appreciate some insight. Thank you.
... View more
02-11-2013
06:47 PM
|
0
|
8
|
1276
|
POST
|
You may want to try the Copy Raster (data management) tool. Thanks Pavan Sorry to take so long replying: Using Copy Raster with the processing extent set had no effect whatsoever - the bounds are still a half pixel extra on each side. This problem isn't crucial or time-sensitive - I have been able to project this dataset and display it as imagery with no troubles, other than dismissing the extent error in ArcMap.
... View more
08-15-2012
09:11 AM
|
0
|
0
|
4278
|
POST
|
That... almost worked. New Extent: top: 90.000000000036 left: -180 right: 180.000000000072 bottom: -90 However, the resulting raster only has one band, which definitely doesn't work for me. Is there anyway to preserve the number of bands?
... View more
08-09-2012
08:40 AM
|
0
|
0
|
4278
|
POST
|
I have a tiff raster image which is giving me "inconsistent extent" errors in ArcMap. Here is some info about my raster: Columns and Rows: 21600, 10800 Bands: 3 Cellsize: 0.016666667, 0.016666667 Type: 8-bit unsigned integer Extent: Top: 90.0083333333 Left: -180.008333333 Right: 179.991666667 Bottom: -89.9916666667 Spatial Reference: GCS_WGS_1984 Clearly, the extent is in fact inconsistent. The image seems to have an extra pixel. I think this is caused by using grid registration instead of cell registration in the original data. I tried to clip using the raster Clip tool, setting the boundaries to 90,-180, 180, -90, but there was no effect - the output had the same extent as the original. Is there any other way to fix this raster's extent?
... View more
08-08-2012
11:04 AM
|
0
|
6
|
5685
|
POST
|
I have a very large XYZ file of bathymetric soundings. X is longitude in decimal degrees, Y is latitude in decimal degrees, and Z is negative meters. Coordinates are in WGS84. Sample record: -86.23 21.45 -125.67 I want to eventually turn these points into a TIN. I am able to create a 3D feature class with a Z factor of 1 (default), but after turning the FC into a TIN, I get a vertical exaggeration error when opening the TIN in ArcScene. Calculating the exaggeration from extent yields a number like 0.00000009. Do I need use a Z factor to convert the meter depths into some miniscule portion of a degree? Isn't the number of meters in a degree dependent on latitude? What is an appropriate Z factor here? Thanks
... View more
03-27-2012
07:30 PM
|
0
|
4
|
1814
|
POST
|
One thing you could try is duplicating your layer with the ten red roads, and then removing nine of them. Then you've got a single item which you can customize and add to the legend. This isn't the most correct way to do it, but it works in a pinch.
... View more
09-07-2011
06:08 PM
|
0
|
0
|
193
|
POST
|
I think this is what you're looking for. This is a simple find and replace routine that will loop through every field of every row in your shapefile/feature class and make the necessary changes. x = the value you want to find y = the value you want to replace it with filename = the file you're working on rows = arcpy.UpdateCursor(filename)
fields = arcpy.ListFields(filename)
for row in rows:
for field in fields:
value = row.getValue(field)
if value == x:
row.setValue(field,y)
rows.updateRow(row) Hopefully, that at least gets you pointed in the right direction.
... View more
09-07-2011
10:14 AM
|
0
|
0
|
269
|
POST
|
When your suggested code didn't work, I prayed something else was wrong. Sure enough, instead of using NULLs or empty strings, my working database used a whitespace character. The following code produced the intended results: if (suffval != ' ') and (suffval not in allowed) (that's a space between the single quotes) Thanks for your guidance, problem solved.
... View more
09-05-2011
07:13 PM
|
0
|
0
|
987
|
POST
|
By "records without values" do you mean records with NULL or records with just an empty string? If a string is empty it will have length zero. I assume the fields in question are NULL. I'm working with a street database, and this particular field is the directional suffix, which not every street requires.
... View more
09-05-2011
03:13 PM
|
0
|
0
|
987
|
POST
|
Hello, I have a Python script which flags records with inappropriate values. Unfortunately, it is also flagging records without values. I would like to know how I can check for the existence of a value in a field. Normally, if there is a value in this field, it would be a string. Here's what I have currently: if (suffval != '') and (suffval not in allowed): the first condition is the one I'm having trouble with - the second condition seems to work fine. I have also tried: if (suffval is not None) and: if (not len(suffval)) Thanks so much for any guidance you can provide.
... View more
09-05-2011
02:48 PM
|
0
|
5
|
2051
|
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:23 AM
|