|
POST
|
You can use a set to get unique values. I forget if you can sort a set, but if not you can put it in a list and sort that.
... View more
03-13-2014
03:12 PM
|
0
|
0
|
840
|
|
POST
|
Thanks Joshua. That fix, as well as the try/catch, stops the error but doesn't print the one feature class that is in the dataset. Hmmm...
... View more
03-13-2014
12:25 PM
|
0
|
0
|
3331
|
|
POST
|
I wrote the code below to list datasets and associated feature classes and shape types (point, polygon, etc.) in an sde. This works fine until I get to the last dataset, Zoning, which contains one feature class and one topology. There, it errors out with "RuntimeError: DescribeData: Method feature type does not exist". Also errors on shapeType if I don't check featureType first. Guessing this has something to do with desc not liking the topology, but is there a way around this other than catching the exception and then continue? Thanks. def getLists(): dsList = arcpy.ListDatasets("*") for ds in dsList: dsName = ds.split(".") print dsName[2].upper() print " - Feature Classes" fcList = arcpy.ListFeatureClasses("*", "", ds) if len(fcList) == 0: print "\t - " + "No feature class in this dataset. \n" continue for fc in fcList: desc = arcpy.Describe(fc) if desc.featureType == "Simple": fcName = fc.split(".") desc = arcpy.Describe(fc) print "\t - " + fcName[2] + ": " + desc.shapeType print "\n"
... View more
03-13-2014
06:48 AM
|
0
|
4
|
3604
|
|
POST
|
Thanks, that worked great. Yes, LineTyp10 is an int. Much appreciated.
... View more
01-16-2014
10:54 AM
|
0
|
0
|
3403
|
|
POST
|
There are two fields in a topo line feature class, Elev for elevation and LineType10. I want to set LineType10 to 1 if Elev % 10 == 0, and 2 otherwise. The purpose is to be able to symbolize at ten foot intervals. I've got the code below, which doesn't give errors but also doesn't set any values. I've also used the plain % mod symbol. Any ideas why this doesn't run? Thanks. Pre-Logic def SetTen(elv, line): if math.fmod(elv) == 0: line = 1 else: line = 2 return line Window SetTen( !Elev!, !LineType10!)
... View more
01-16-2014
09:42 AM
|
0
|
3
|
5504
|
|
POST
|
I map legal descriptions all the time. My guess is that you have either a mismatched coordinate system or less than accurate data. Many times section data is somewhat approximate as to actual location, especially if it was surveyed a long time ago. Alternately, the legal descriptions could be from a long time ago, and suffer similar problems. If your data is off by a consistent amount, that would point to a coordinate system difference. I had an issue the other day when a legal description from 1977 didn't line up with our data. The legal description used NAD 1927 State Plane, and we use 1983 State plane, which obviously wasn't available in 1979. While Arc can project on the fly, if you enter coordinates in 1983, and they're actually from 1927, you won't get accurate results. You could enter the legal in their correct system in a new feature class in a blank map, then add the new feature class to your data. Compounding this, if you have more than one legal description, some could be in one and some in the other. Just some ideas.
... View more
01-06-2014
09:46 AM
|
0
|
0
|
2616
|
|
POST
|
In the code below, I get a "TypeError: unsupported operand type(s) for +: 'NoneType and 'str'" on the f.write line. If I don't concatenate, it runs fine, but all the layer names run together. I understand what the error means, but not why I'm getting a NoneType. I've tried casting lyr.name to str, same result. All I'm trying to do is write out a text file of layer names. Any idea what's causing this and how to get around it? Thanks. for lyr in arcpy.mapping.ListLayers(mxd, "", df): f.write(lyr.name) + "\n" count += 1
... View more
12-13-2013
05:43 AM
|
0
|
2
|
1600
|
|
POST
|
I created a mosaic dataset from ~ 360 rasters of aerial photos in .jp2 format. 7 of them wouldn't come in, so per ESRI support, I created a separate mosaic out of those 7, and added them to the original. RGB format. Cool, looked good. I then ran Build Overviews, and everything went grayscale and now I have the image below. In the mosaic attribute table, there's about 1000 overview features. I've never worked with mosaics before, but don't the overviews go in a separate folder? More importantly, is there a way to fix this without having to add all the rasters in a whole new mosaic? Thanks.
... View more
12-09-2013
12:51 PM
|
0
|
0
|
713
|
|
POST
|
Could you use the streets as lines in the Create Polygons tool? This might result in some extra polygons, but less manual work than other approaches. This seems too easy though, I must be missing something.
... View more
12-03-2013
06:32 AM
|
0
|
0
|
2271
|
|
POST
|
ArcGIS 10.2 allows db time stamping - http://resources.arcgis.com/en/help/main/10.2/index.html#//00170000016p000000
... View more
11-27-2013
12:49 PM
|
0
|
0
|
1079
|
|
POST
|
I wish the nanny software allowed the layer to appear with only a warning that new features may not appear. I believe this is an option at 10.2, or at least under development if not already implemented. Or it may be that it doesn't display, but tells you what and why. Something like that.
... View more
11-06-2013
08:12 AM
|
0
|
0
|
1219
|
|
POST
|
Better idea than mine, Richard, I forgot you could do that in Arc, don't need ET to calculate that.
... View more
11-01-2013
08:26 AM
|
0
|
0
|
4429
|
|
POST
|
It's not the tool that's licensed, precisely, it's the version of ArcMap you're using. The tool Tim mentions requires an ArcInfo license, the most advanced of the three. You might try the free version of ET GeoWizards (or buy the full product). The free version has tools that allow you to calculate the x & y of centroids.
... View more
11-01-2013
06:36 AM
|
0
|
0
|
4429
|
|
POST
|
Thanks Kevin. That didn't work for me, though, possibly because I'm in 10.0, not 10.1 or 2.
... View more
09-25-2013
06:21 AM
|
0
|
0
|
986
|
| 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
|