|
POST
|
Can't you multiply population by proportion of continuous service to get number of people per pixel with continuous service?
... View more
02-08-2016
11:06 AM
|
0
|
0
|
856
|
|
POST
|
As you have it now, you are only passing one field into the cursor - "COUNTY". This means that list of values in row only has one item - the county. row[0] would equal the county for that record. Change "COUNTY" to whatever the field you want to update is called. Then, it will be row[0].
... View more
02-05-2016
04:00 PM
|
1
|
0
|
3103
|
|
POST
|
I'll just say, "no", but I'm not really one to spend much time looking for standard ways to do things. I spend all day looking at maps, so if I don't know "the standard way to symbolize" something, how would a general map reader know? Do something that makes sense to you. Show it to someone else. Does it make sense to them? If so, it's probably just fine. With that said, there just may be a stickler out there that knows how you're "supposed" to do this.
... View more
02-05-2016
03:51 PM
|
1
|
1
|
2680
|
|
POST
|
Can you provide an example of how this might be ambiguous? I'm looking around my office at several maps that cut off some jurisdiction part way. For example, a map of Canada that cuts off the US about halfway. There is no label stating, "This straight line is the bottom of the map. The US actually continues farther south." I guess they are just hoping that the map reader has the sense to know that the world doesn't end at the bottom of the map.
... View more
02-05-2016
03:07 PM
|
0
|
5
|
2680
|
|
POST
|
Both logic and formatting are available for labels. Logic: Label Expressions Formatting: Formatting Tags
... View more
02-05-2016
02:45 PM
|
1
|
0
|
1924
|
|
POST
|
Not sure how this differs from the previous suggestions, except you're glazing over the non-trivial point of populating the attribute based on the value of another attribute. Are you suggesting to do 13 selection/calculate field operations?
... View more
02-05-2016
01:32 PM
|
0
|
0
|
2861
|
|
POST
|
You need to get your query into the format: "Datefield" = date 'yyyy-mm-dd hh:mm:ss' Use strftime() to format the datetime object. The following works for a shapefile, which doesn't support time, but you can generally use this pattern: >>> report_time = datetime.datetime.now()
... SQL = '"OBSDATE" <= date \'' + str(report_time.strftime('%Y-%M-%d')) + '\''
... print SQL
... arcpy.SelectLayerByAttribute_management("MY_LAYER","NEW_SELECTION", SQL)
...
"OBSDATE" <= date '2016-05-26'
... View more
02-05-2016
10:32 AM
|
1
|
1
|
6970
|
|
POST
|
Try: -97 if !PRCHSCH13! == -99 and !PRCHSCH04! <> -99 else -98 if !PRCHSCH13! <> -99 and !PRCHSCH04! == -99 else -99 if !PRCHSCH13! == -99 and !PRCHSCH04! == -99 else float( !PRCHSCH13! ) - !PRCHSCH04! I'll just say this type of thing is somewhat frowned upon as being difficult to read.
... View more
02-04-2016
04:10 PM
|
1
|
0
|
1814
|
|
POST
|
Yes, this results in exactly the same output table: >>> inTable = r"c:\junk\Book3.csv"
... outLocation = r"c:\junk"
... outTable = "test.dbf"
... arcpy.TableToTable_conversion(inTable, outLocation, outTable) If I change the csv to include a decimal (e.g. 750050.00001), then it gets read as Double, which will display decimal places. Using the field map, I can force it back to Long (no more decimal places). The code via Copy As Python Snippet changes to: arcpy.TableToTable_conversion(in_rows="c:/junk/Book3.csv",out_path="c:/junk",out_name="test.dbf",where_clause="#",field_mapping="""X "X" true true false 4 Long 0 0 ,First,#,c:/junk/Book3.csv,X,-1,-1;Y "Y" true true false 8 Long 0 0 ,First,#,c:/junk/Book3.csv,Y,-1,-1;START_DTTM "START_DTTM" true true false 8 Date 0 0 ,First,#,c:/junk/Book3.csv,START_DTTM,-1,-1;END_DTTM "END_DTTM" true true false 8 Date 0 0 ,First,#,c:/junk/Book3.csv,END_DTTM,-1,-1;Value "Value" true true false 8 Double 0 0 ,First,#,c:/junk/Book3.csv,Value,-1,-1""",config_keyword="#")
... View more
02-04-2016
03:25 PM
|
0
|
0
|
2728
|
|
POST
|
Hmmm. That works for me. Can you get it to work properly through the GUI dialog? Do both X and Y come in as Long?
... View more
02-04-2016
03:09 PM
|
1
|
9
|
2728
|
|
POST
|
Can you post an example of your data? This has got to be a simple fix.
... View more
02-04-2016
02:52 PM
|
0
|
11
|
2605
|
|
POST
|
I believe you'd have to use the Field Mapping parameter of TableToTable (which uses FieldMap and FieldMappings objects) to force the values into a field of LONG datatype. Tip: set up the field mapping in the GUI tool, run it, then "Copy As Python Snippet" through the Results window to get the syntax correct.
... View more
02-04-2016
01:26 PM
|
1
|
0
|
4650
|
|
POST
|
Here's a Python script that should emulate your manual editing task using geometry objects, in place, and Basic licensing. Caveats: I have no idea if this works for versioned data. This is a n^2 operation, meaning for each feature in the original dataset, it does something for each feature in the new dataset. This may be problematic for large datasets. >>> main = 'main' # main dataset
... new = 'new' # new dataset
... with arcpy.da.UpdateCursor(main,'SHAPE@') as uCursor:
... for uRow in uCursor: # loop through main polygons
... with arcpy.da.SearchCursor(new,'SHAPE@') as sCursor:
... for sRow in sCursor: # loop through new polygons
... uRow[0] = uRow[0].difference(sRow[0]) # remove overlaps between main/new
... uCursor.updateRow(uRow) # update main polygons minus new polygons
... arcpy.Append_management([new],'main',"NO_TEST") # append new polygons to main Original (no overlaps): With new shapefile overlain: Delete 'differences' (no overlaps, voids for new features): Append new to main (no overlaps):
... View more
02-04-2016
10:41 AM
|
1
|
0
|
524
|
|
POST
|
The problem is to do with using a comma separator. >>> myString = '10000,02837'
>>> float(myString) # it doesn't work
Runtime error
Traceback (most recent call last):
File "<string>", line 1, in <module>
ValueError: invalid literal for float(): 10000,02837
>>> myString = '10000.02837'
>>> float(myString)
10000.02837 # it works! Try changing all the commas in that field to periods.
... View more
02-04-2016
09:17 AM
|
2
|
1
|
1608
|
|
POST
|
Good to know. I can't say I've ever run into that situation (e.g. r'\'), but the lengthy and pointed discussion certainly makes me think it comes up more often than my brief experience.
... View more
02-03-2016
02:28 PM
|
0
|
2
|
4654
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 11-25-2015 01:51 PM | |
| 1 | 08-30-2013 02:22 PM | |
| 1 | 04-12-2011 11:19 AM | |
| 1 | 09-17-2021 09:43 AM | |
| 1 | 04-04-2012 12:05 PM |
| Online Status |
Offline
|
| Date Last Visited |
07-15-2023
12:11 AM
|