|
POST
|
If you can convince the CAD operators to deliver proper GIS feature classes with associated spatial reference information, then yes, it would be as simple as drag and drop. However, the easy thing for CAD operators to deliver is usually a DWG with no spatial reference, often built upon a custom spatial reference system that is impossible to guess if not given the parameters. If that's the case, it can be a lot of work to track those down, even for a single project.
... View more
03-03-2016
10:33 AM
|
1
|
1
|
2472
|
|
POST
|
Here's how you can do it using Python at 10.1+ (sorry, no data access module at 10.0): >>> points_fc = 'points' # input points
... template_fc = 'template' # template line feature class
... out_fc = r'C:\junk\outputlines.shp' # output feature class
... sr = arcpy.Describe(points_fc).spatialReference # spatial reference
... template_geom = arcpy.da.SearchCursor(template_fc, 'SHAPE@', spatial_reference=sr).next() # get first line
... lines = [] # temporary line container
... points_count = int(arcpy.GetCount_management(points_fc).getOutput(0)) # count points
... for i in range(points_count):
... lines.append(template_geom[0]) # create line copies
... arcpy.CopyFeatures_management(lines, out_fc) # write lines to feature class
... points = arcpy.da.SearchCursor(points_fc, 'SHAPE@XY', spatial_reference=sr) # load points to list for later
... with arcpy.da.UpdateCursor(out_fc,['SHAPE@XY'],spatial_reference=sr) as cursor: # loop through line copies, collecting line centroid
... for row in cursor:
... cur_point = points.next() # get next point geometry
... cursor.updateRow([(cur_point[0][0], cur_point[0][1])]) # move line feature centroid to new location ---->
... View more
03-03-2016
10:12 AM
|
2
|
1
|
2001
|
|
POST
|
The usual way to get unique values from one field is to add all the values to a list and then convert it into a set, but this gets tricky when you instead have multiple fields and you don't know how many fields the user will select! Can't you use the above method to build and filter a list of unique concatenated values, like [field1_field2_field3, field1_field2_field3, etc.]?
... View more
03-02-2016
02:52 PM
|
1
|
0
|
5518
|
|
POST
|
You'll also have to loop through the fields in your field list. row[0] means look at the first field only.
... View more
03-02-2016
10:20 AM
|
1
|
1
|
3728
|
|
POST
|
Remove the quotes around "PrecipFields". Quotes mean text/string. No quotes means variable, in your case, a list of field names.
... View more
03-02-2016
10:12 AM
|
0
|
3
|
3727
|
|
POST
|
Try the next option: are within (Clementini) the source layer.
... View more
03-02-2016
09:20 AM
|
0
|
0
|
1035
|
|
POST
|
That is the WKT property of polygon geometry: >>> with arcpy.da.SearchCursor("YOUR_FEATURE_CLASS","SHAPE@") as cursor:
... for row in cursor:
... print row[0].WKT
...
MULTIPOLYGON (((1104099.6953918971 1638644.7216630857, 1106049.9706553277 1640403.7934693154, 1104197.6684162933 1642457.4329082444, 1102247.3931528646 1640698.3611020166, 1104099.6953918971 1638644.7216630857))) If you have a very long text field, you can also access this through Field Calculator with the expression (Python parser): !Shape!.WKT
... View more
03-02-2016
09:00 AM
|
1
|
0
|
3044
|
|
POST
|
Yes, I'm sure they did, but the actual coordinates may not be where you think they are. You can add a graphic point using the XY tool to confirm:
... View more
03-01-2016
01:58 PM
|
1
|
1
|
2830
|
|
POST
|
Where in your example are the coordinates (5627.989086, 13879.679394) - the X max, Y max? Is that exactly at the red line's corner, or the corner of the clipped raster?
... View more
03-01-2016
01:45 PM
|
0
|
3
|
2830
|
|
POST
|
Do not try to nest old style cursors - they get confused. Instead, nest data access module cursors. Or, better yet, find a way around nesting cursors, like loading the contents of one cursor into a dictionary and referencing those values from the second cursor.
... View more
03-01-2016
01:31 PM
|
4
|
5
|
2867
|
|
POST
|
The contents of 'listing' is a list of strings of the file names, not full paths, which is why it can't locate your csv. You can join the folder name to the file name using os.path.join(), or set the workspace environment to function as a default directory.
... View more
03-01-2016
11:19 AM
|
1
|
0
|
2469
|
|
POST
|
This can be done in any number of ways - as you've mentioned numpy, or Update Cursor, and also Field Calculator. You just need to choose one, get started, and then post what you've got for more help.
... View more
03-01-2016
10:54 AM
|
0
|
0
|
1199
|
|
POST
|
In that case, I'm surprised that it knows what "CURRENT" is (not saying it can't be done, I've just never done it that way). Do you have better luck running MakeFeatureLayer?
... View more
02-29-2016
02:37 PM
|
1
|
0
|
2729
|
|
POST
|
Not an ArcGIS solution, but I use DNRGPS for exactly this task. edit: the "time" field will come in as text data type in the output shapefile (e.g. "2015/05/11 16:07:51").
... View more
02-29-2016
02:09 PM
|
1
|
0
|
3717
|
| 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
|