|
POST
|
Indexing is supported in arcpy.da, not plain arcpy. Try
rows = arcpy.da.SearchCursor(tempSHP)
# or even better:
with arcpy.da.SearchCursor(tempSHP) as rows:
# do something
The second method will automatically clean up rows and row when you exit the with block, so you don't have to do so manually.
... View more
10-10-2014
05:22 AM
|
1
|
0
|
3385
|
|
POST
|
Maybe. I'd thought of that, but can't see why it would happen. You might try using Windows to set the file associations. You may have to do this for each file extension type. Since the files can be viewed in ArcCatalog it wouldn't seem they got corrupted, but who knows? Also maybe rebuild the normal.mxd file, maybe it's ArcMap that has the problem, not the shapefiles. Could also try re-installing Arc again.
... View more
10-09-2014
01:10 PM
|
0
|
0
|
1632
|
|
POST
|
Does this error pop up when you try to repair the data source? Usually those exclamation marks mean Arc can't find the data, typically because either the mxd or the data has been moved to a different location. If that's the case, you can right click a layer and select Data | Repair data source, navigate to where the file is and click on it. This will fix any bad pathed layers in the same path. Other things you could try - see if you can add the shapefiles to a new map; try opening the .dbf file in Excel or Access. This last might be useful, since the error states 'Database not found'. The dbf file is the only database related file in a shapefile (DBF = DataBase File). Apologize if you know all this, not sure how knowledgeable in Arc you are.
... View more
10-09-2014
12:30 PM
|
0
|
2
|
1632
|
|
POST
|
That's kind of vague. Anything else in the error message? Try viewing them in ArcCatalog. Do they have at least a .shx, .shp and .dbf extension files? Did you back them up in ArcCatalog or Windows Explorer? If Explorer, you have to get at least the three <shapefilename> files with the above extensions. There could be more, such as a .prj file, which contains the spatial reference, but they aren't required.
... View more
10-09-2014
10:11 AM
|
0
|
5
|
1632
|
|
POST
|
Update - I can create locators in ArcCatalog in ArcMap, but not in ArcCatalog alone.
... View more
10-09-2014
07:35 AM
|
0
|
0
|
810
|
|
POST
|
I'm trying to create a composite locator in ArcCatalog 10.2.2. It has 8 individual locators, 4 with an alternate name table, 4 without. We already have a working 10.1 version, but 10.2 is presumably faster and has a couple improvements we want to use, such as not confusing streets with states as their name as actual state namess (e.g., 'Montana' is the name of a street). We also have updated data to use. I built it fine, all properties set the same as the 10.1 version. But it won't run the 4 locators with the alternate name table. When I look at the properties of those individual locators, everything looks good. Then I try a rebuild on them, and it says they need to be repaired. Okay, go to repair... There I look at the Reference data tables section. In the field map (see attached): the primary table has FeatureID set to none, and OBJECTID isn't available in the drop down the alternate name tables JoinID is set to none, although it is available in the drop down the fields in the alternate name table appear twice If I set any of the missing values and click Ok, ArcCatalog shuts down immediately with no messages. On re-opening it, no repairs have been made. Other info: when running the composite, there are no error messages, it simply doesn't run the locators with the alternate name table. Doesn't matter whether the locators are in a separate folder or in the gdb, or on local machine or over the network the field used to join the tables is AltID. This is a long integer field added to the primary table that's a copy of OBJECTID, in case an operation such as copying changes the original OBJECTIDs. Have also tried using Double as the data type for this field, no difference. the alternate names table is then derived from the primary table, using different fields in the data for addresses (the original data has fields for primary, secondary and tertiary names, e.g. FEName, FEName2, FEName3, so FEName2 and FEName3 fields are loaded into either an alternate names gdb table or a stand-alone table) there are just under a million records to geocode. running Arc 10.2.2.3552 Advanced, Win 7 SP1 on a 32 bit machine with 4 gb ram And now, to top it off, ArcCatalog shuts down with a '...has stopped working' error message whenever I try to create a new locator. This happened after a co-worker and I made some new locators, trying to change some things such as indexing AltID in the primary table. Can still create other new things, such as tables, fgdbs, etc. Any help is much appreciated. Thanks.
... View more
10-09-2014
06:38 AM
|
0
|
1
|
3957
|
|
POST
|
You're not using 50%. You're using modulo 50; the modulo operator is the % sign in Python. It's like regular division, except it gives you the remainder. Primarily though, you need parentheses around the field name in the first line - def FindLabel([Contour]): You also need to see whether the expression if [Contour] % 50 == 0: You left the 0 out above.
... View more
10-07-2014
05:32 AM
|
0
|
1
|
1199
|
|
POST
|
Siran, To label numbers divisible by 100, use the modulo operator. In the label expression advanced box, set the parser to Python. Then use a function like below: def FindLabel(somefield): if somefield % 100 == 0: return somefield if you want to label with a different field based on somefield: def FindLabel(somefield, anotherfield): if somefield % 100 == 0: return anotherfield
... View more
10-06-2014
01:30 PM
|
0
|
3
|
1199
|
|
POST
|
Maybe your new script at 10.2 is running updated arcpy not available to earlier versions? Just a thought. Do your old scripts still exist, or have you deleted or moved them?
... View more
10-06-2014
08:50 AM
|
0
|
0
|
732
|
|
POST
|
Not sure what you're looking to do, but you need to indent the final line in your code above. This does nothing to delete empty shapefiles, though. Also would advise against using arcgisscripting; that's an older method. Not even sure if it would work to combine it with current arcpy. You might also look at 10.1. os.path — Common pathname manipulations — Python 2.7.8 documentation and 15.1. os — Miscellaneous operating system interfaces — Python 2.7.8 documentation or Python os.listdir() Method
... View more
10-06-2014
06:33 AM
|
0
|
0
|
1633
|
|
POST
|
I think the English translation would be along the lines of: Does anyone know if after using ArcGIS Online for free and not making any changes the data there is deleted? Apologies for any error in translation.
... View more
10-01-2014
11:41 AM
|
0
|
3
|
922
|
|
POST
|
Thanks Jake. That's what I was afraid of. I looked at credits, and they start at $2500, which is ok for an organization but way beyond my means/needs. I'll try the free trial. Appreciate it.
... View more
10-01-2014
06:26 AM
|
0
|
0
|
942
|
|
POST
|
This may be an obvious answer to some, but I don't know it. I'm using ArcGIS 10.2 for Home. I created a map with about 25 layers for a non-profit. To help them check the map for errors, changes, etc., I want to upload it to AGOL. Being as this is my home computer, I don't have access to save the map as a service (at least, that option is grayed out - no server). So I saved the map as a map package to AGOL. So far, so good. But I can't seem to make it available online; all it appears to do is download. It does that fine, but not what I want. Tried saving the mxd itself. Same thing. Is there a way to do this? Maybe saving layer packages would work, but I'd prefer not to have to then go about making the map all over again in AGOL. Thanks.
... View more
09-30-2014
03:07 PM
|
0
|
2
|
1366
|
|
POST
|
Not sure about TRIM, but you might try LEN as an alternative for LENGTH. edit: for TRIM, maybe this page would help.
... View more
09-30-2014
10:14 AM
|
0
|
7
|
3132
|
|
POST
|
Thanks Curtis! I saw the >> icon, but hovering over it said Insert, which is not quite as intuitive as something like Format.
... View more
09-26-2014
02:25 PM
|
0
|
0
|
2247
|
| Title | Kudos | Posted |
|---|---|---|
| 6 | 08-22-2019 07:41 AM | |
| 1 | 05-05-2014 04:30 AM | |
| 1 | 08-15-2018 06:23 AM | |
| 3 | 08-06-2018 07:31 AM | |
| 1 | 03-30-2012 08:38 AM |
| Online Status |
Offline
|
| Date Last Visited |
12-12-2021
01:00 PM
|