Quantcast
Channel: Forums - Geoprocessing
Viewing all 1952 articles
Browse latest View live

Points to Line reoccurring error: "geoprocessing list object is not subscriptable"

$
0
0
This error has been popping up over the last several months, with various point datasets. I have a point shapefile created from an excel sheet. The points are along a river, and represent transects running perpendicular to the river (groups of approximately 20 points per transect). I would like to make lines connecting the first point of one transect to the first point of the next transect, and so on, to create lines running parallel to the river.

My "line field" is the point number (each transect has points numbered 1, 2, 3...). So all points with the point number 1 should connect to create a line. I do not use a sort field.

Almost immediately after hitting "Run", the tool fails to execute and the error message "geoprocessing list object is not subscriptable" is given. I am told this indicates an error within the python script itself. What can I do to make this work?

Saving XYEvent to Feature Class

$
0
0
I have been trying to create an XY Event file from an Excel 2007 table, then preserve it as a FC in a file geodatabase. The XY event seems to be created properly, but the Copy Features tool blows up with Error 99999. Code follows, with error message:
# ---------------------------------------------------------------------------
# TestModel2.py
#
# ---------------------------------------------------------------------------

# Import arcpy module
import arcpy
from arcpy import env

# Set overwrite option
arcpy.env.overwriteOutput = True

# Local variables:
R20060102 = "C:\\Ameet\\Climate\\Tables\\R20060102.xlsx\\R20060102$"
X_Field = "long"
Y_Field = "lat"
Spatial_Reference = "GEOGCS['GCS_Arc_1960',DATUM['D_Arc_1960',SPHEROID['Clarke_1880_RGS',6378249.145,293.465]],PRIMEM['Greenwich',0.0],UNIT['Degree',0.0174532925199433]];-400 -400 1000000000;-100000 10000;-100000 10000;8.98299489570697E-09;0.001;0.001;IsHighPrecision"
R20060102Layer = "R20060102Layer"
R20060102Lyr = "C:\\Ameet\\Climate\\R20060102.lyr"
R20060102FC = "C:\\Ameet\\Climate\\Daily.gdb\\R20060102"

# Process: Make XY Event Layer
#MakeXYEventLayer_management (table, in_x_field, in_y_field, out_layer, {spatial_reference}, {in_z_field})
arcpy.MakeXYEventLayer_management(R20060102, X_Field, Y_Field, R20060102Layer, Spatial_Reference, "")
print "Event created"

# Process: Save To Layer File
#SaveToLayerFile_management (in_layer, out_layer, {is_relative_path}, {version})
#arcpy.SaveToLayerFile_management(R20060102Layer, R20060102Lyr)
#print "Layer created"

#CopyFeatures_management (in_features, out_feature_class, {config_keyword}, {spatial_grid_1}, {spatial_grid_2}, {spatial_grid_3})
arcpy.CopyFeatures_management(R20060102Lyr, R20060102FC)
print "New FC created"

Messages
Executing: CopyFeatures C:\Ameet\Climate\R20060102.lyr C:\Ameet\Climate\Daily.gdb\R20060102 # 0 0 0
Start Time: Fri Jun 27 01:51:44 2014
ERROR 999999: Error executing function.
The XY event source name has not been setup correctly.
Failed to execute (CopyFeatures).
Failed at Fri Jun 27 01:51:45 2014 (Elapsed Time: 0.53 seconds)

How to use a text file (CSV) list as input as well as outputs in Model Builder

$
0
0
Hello All,

An example. I have multiple geo-referenced aerial photographs (TIFF formats) across various directories in the network. I create foot-prints shape file using FME. A sub-set (say 212 out of 2500) of these TIFFs are selected from the shape file and exported as a text file (CSV table).

I was so far using a python script ( a simple one) to re-project these TIFFs from the CSV into a different directory with the same names and extension (.tif). Will I be able to input this CSV file in a model?

Thanks,
Samuel

Pre-release announcement about the New Forums

$
0
0
For the past few months, development work has been underway here at Esri to build a comprehensive online community platform, which will include a new evolved discussion forum.

Esri's new Enterprise Community Manager Timothy Hales just posted with more info and we all look forward to hearing from you over there on that thread.

Please go here for more information.

Create polygon with mouse click

$
0
0
Hello,

I would like to create a polygon with mouse clicks on Arcmap. I know nothing about arcpy and it's very difficult for me to find the good fonction to do that. I think I should use onMouseDownMap() but I don't know how...
Anyone can help me?

Thank you!

How to show a polygon's attribute on the data frame

$
0
0
Helloooooo

I would love to know:

I want to send a map exported in JPG to a friend because he doesn't know anything about this. But, since he can't open an attribute table to recognize each polygon, can I send him the map showing the number of each polygon so he can check the attributes on a excel file I already sent him? Like a map with polygons with a number inside...

Hope I was clear!
ThanKs!

Creating buffer by area (not distance)

$
0
0
Hello everyone,

I'm beginner in Arcgis, so sorry if this theme is not appropriate for this forum. My question is quite simple. I wanna create a buffer with more 20% of the area of a polygon that already exist. This extra area will surround my polygon. I've just found in help how to create a buffer by distance. But my problem is that I don't know what is the linear distance I must add to my polygon that will add 20% of it's area... Can someone help me?

Many thanks!
Vinicius

Relocating Point Data

$
0
0
I have some point data that is on a site specific grid (SSG) in an Excel table. I need to relocate this
data to the Ordnance Survey Grid. I know what the 0,0 of my SSG is as an OS coordinate and another point
along the X axis. The SSG is not orientated correctly.

I have tried converting the point data into a raster data and georeferencing this data. This works fine and the points
end up where I think they should. However I cannot then update the georeferencing of the data. It tells me to rectify
the data instead. This as far as I can see requires me to reprocess the data. When I do this it results in me losing half
the cells of the point data.

Am I going about this entirely the wrong way? Is there a simpler solution?

thanks

Jonathan

Unable to see layer after changing projection

$
0
0
My CAD person prepared a DGN file, which I converted into a geodatabase. From there, I exported the points, polygons, and lines to a shapefile. The coordinate system is WGS_1984_World_Mercator Meters. I need to get these files into Zone 901 Datum NAD83 HARN. I am assuming that the HARN they want is in feet, but I'm really not sure. So I'm doing it in feet anyway. I am using the Project tool in Arc Toolbox, but I get an error message saying "invalid extent for output coordinate system".

I should add that I also tried setting my workspace to HARN feet, bringing the geodatabase in and doing an export to a shapefile choosing 'use data frame coordinate sytem', and it shows it works, then if I do zoom to layer, I can't see anything.

Any ideas??

Janet
St Lucie County, Florida

How to link Table value in expression field in Modelbuiler

$
0
0
Hi all
I have a tough question about how value can be defined as a variable in expression (the function that I need to use is "Select by attribute").

To be specific, I have two-steps modelbuilder(which means I have to open the modelbuilder two times and then can get the result), the first step aims to calculate mean value and then use this mean value as a threshold value in the second step. Now, I want to make these two steps work together (as a one-step model). This is , I would like to combine this two modelbuilder so that I dont need to input this mean value every time. The ideal situation in my case would be like this: model can automatically calculated mean value and input as a threshold for second processing. In this case, I have to define this mean value as a variable, as this mean value is not constant but variable(Because I have too many works). Before this one-step model has been created, I have to type mean value manually as a input for the second step. For example, I obtained the mean value from the first step, for instance, 500, and then I make a expression : Features < 500. then all the features that are less than 500 would be selected.

If I make this one-step modelbuilder possible, I could define this mean value as a variable , then I could probably make a query in expression, such as feature < value.mean? In this case, I dont need to know exactly what the mean value is, instead, I just use a SQL language and ArcGIS can automatically input every mean value calculated by first steps as a threshold for the second step.

Note: I actually have two files in the second processing, one is this mean value table, another is one shpfile layer. I want to use this mean value as a threshold to acquire those required features from the shpfile layer. However, I dont have any background on SQL in ArcGIS and I just wonder if anyone could help me. I would be much appreciate.

Please note the table calculated by the first steps was stored in one row, which means not all the value stored in table need to be used. Below is a format of table calculated by the first step. I only need that mean value.
Attachment 35034
Attached Thumbnails
Click image for larger version

Name:	mean.jpg‎
Views:	N/A
Size:	67.0 KB
ID:	35034  

NEAR function does just uses one criteria

$
0
0
hi,

If I'm using NEAR with two near features - x and y - but just the distance to "x" is calculated and "y" is completely ignored?

x,y and the target are all feature pologon classes

Want to create a polygon based on points

$
0
0
I would like to create a polygon representing a stream channel. I have points taken along the stream length, with an attribute for the stream channel width at each point. I have tried buffering the points by their given widths, and then aggregating those polygons together, but the resulting polygon is extremely clunky and often exceeds the buffered points. Does anyone have any suggestions? The resulting polygon will obviously not be perfect, as some points are 60 feet apart, but I'd love to get a solution for this as I have quite a few streams to represent.

Thank you!
Attached Thumbnails
Click image for larger version

Name:	Capture.JPG‎
Views:	N/A
Size:	15.8 KB
ID:	35074  
Viewing all 1952 articles
Browse latest View live