POST
|
I am really stuck here and chat support has not been available for over an hour. I have a database that we use to plot information for a project. My boss wondered if it would be possible to make the data live so we could play around with the variables used to calculate the number we use to create the plot. Eight variables go into it and several more are calculated using those variables. I thought I could use model builder to prompt the user to enter those 8 parameters and then from there recalculate the values in those fields based on the new variable values. But I can't figure out how to get model builder to prompt the user for values because it has been many years since I have used model builder. Any help would be appreciated because I am really stuck.
... View more
02-13-2013
01:52 PM
|
0
|
1
|
7795
|
POST
|
This may not work with the topo file. When I did the first step (adding in the X direction) my topo is now only showing a line centered around Africa and the United States does not appear.
... View more
08-13-2012
10:04 AM
|
0
|
0
|
412
|
POST
|
A coworker gave me 2 shapefiles which he had exported from Surpac. The shapefiles are not in a real world coordinate system but he would like me to create a map of boreholes in reference to a contour map from Surpac. If I do that the map still won't be georeferenced and the map won't be very useful. I have the USA topo from ESRI and wondered if I could somehow match the topo (just lines) exported from Surpac with the topo from ESRI so I could give the points real world coordinates?
... View more
08-13-2012
08:49 AM
|
0
|
2
|
2672
|
POST
|
One last thing - everything works now except the "clickable" sidebar. The assignment calls for either getting an info window when you click the map or when you click the name in the sidebar. I already have the clicking the map right but the over-achiever in me would like to get the sidebar to work. My code is at the same page indicated above. I know this has to do with the query and defining the query but I don't understand exactly what the query does so I can't work it out. Any help would be appreciated.
... View more
06-05-2012
07:28 PM
|
0
|
0
|
434
|
POST
|
I am attempting to use states as that third layer so the grid is not pulling data from the candidate layers. I want it to pull from the 3rd layer for the sidebar and infoWindow.
... View more
06-05-2012
08:02 AM
|
0
|
0
|
434
|
POST
|
I was able to get a little further last night. However, I still have lines of code that make my map vanish (commented out of my code right now) and the table in my sidebar is not showing up. What I would like is for a third layer that has all those states to be used for the sidebar. Right now when you click a state an info window comes up based on that particular candidate layer. I want it to pull from one layer. I am not sure how right now. I will check out your suggestions as well. http://www.personal.psu.edu/lud143/lesson5e.html
... View more
06-05-2012
06:19 AM
|
0
|
0
|
434
|
POST
|
This is an assignment but I am really stuck and when I can work on the assignment my professor is asleep so I can't get help until the next day (tough when the assignment is due in 2 days and you are only 1/3rd done). Anyway, I created a map with 3 layers. One is a basemap and 2 show election information for two different candidates. I got that part of the map to work but I am having trouble incorporating a clickable sidebar. Right now I get no map with the sidebar titles at the top left of the page. I attached my code. Any help would be greatly appreciated.
... View more
06-04-2012
07:13 PM
|
0
|
6
|
975
|
POST
|
Thank you so much! It worked but I had to move the makefeaturelayer to below the for statement and use delete_management to delete the feature layer before it goes into the next SP. I can't wait to know as much Python as you people all know.
... View more
03-08-2012
09:11 AM
|
0
|
0
|
679
|
POST
|
I appreciate the code - but being the novice that I am I can't get it to work. Likely missing some small thing. First let me show you the code I wrote last night with the addition of two of your lines from the code you gave me. import arcpy arcpy.env.overwriteOutput = True # set table path intable = "C:/Project/Project.gdb/DeltaWL" shapefile="C:/Project/Project.gdb/model_nodes" spField = "SP" deltaField="Delta" cellidField="Cell_ID" rows = arcpy.SearchCursor("C:/Project/Project.gdb/DeltaWL", "SP"=='1', "", "SP; Delta; Cell_ID") currentSP = "" fields= arcpy.ListFields(intable) fieldinfo = arcpy.FieldInfo() for row in rows: if currentSP !=row.SP: currentSP = row.SP currentSP=row.getValue(spField) queryString=currentSP for field in fields: if field.name == "SP": fieldinfo.addField(field.name, "SP_"+str(currentSP), "VISIBLE", "") elif field.name == "ROW": fieldinfo.addField(field.name, field.name, "HIDDEN", "") elif field.name == "COL": fieldinfo.addField(field.name, field.name, "HIDDEN", "") elif field.name =="Delta": fieldinfo.addField(field.name, "Delta_"+str(currentSP), "VISIBLE", "") elif field.name =="Cell_ID": fieldinfo.addField(field.name, "Cell_ID", "VISIBLE", "") arcpy.MakeTableView_management (intable, "out_" +str(currentSP), "", "", fieldinfo) arcpy.AddJoin_management(shapefile,"ID", "out_" +str(currentSP), "Cell_ID","KEEP_COMMON") #save feature layer with joined data arcpy.CopyFeatures_management(shapefile, "Joined_"+field) print queryString print "made table" ----- this now gives me the following error: The value cannot be a feature class ERROR 000840: The value is not a Raster Layer. ERROR 000840: The value is not a Raster Catalog Layer. ERROR 000840: The value is not a Mosaic Layer. WARNING 000970: The join field ID in the join table model_nodes is not indexed. To improve performance, we recommend that an index be created for the join field in the join table. Failed to execute (AddJoin). I tried the code you gave me and made a few modifications based on names and such: import arcpy arcpy.env.overwriteOutput = True from arcpy import env import os arcpy.env.workspace = r"C:\Project\Project.gdb" model_nodes = "model_nodes" spField="SP" dataTable = "DeltaWL" #Create list of feature classes in current workspace #ASSUMPTION: feature class layers share part of name with SP value: eg. layer_1 for SP=1 fcLst = arcpy.ListFeatureClasses() #loop through possible classes and for each create TableView for sp in range(1,11): #range (1 to 10) whereClause = 'spField = ' + str(sp) arcpy.MakeTableView_management(dataTable,"Delta_WL" +str(spField), whereClause) #for corresponding feature class in workspace create Feature Layer fcName = model_nodes + str(spField) #name of input Feature Class if fcName in fcLst: inputFLName = model_nodes + str(spField) #name of temporary Feature Layer arcpy.MakeFeatureLayer_management(fcName, inputFLName) #join data from Table View with 'Add Join' tool #"KEEP_COMMON" parameter cause preserving only maching records arcpy.AddJoin_management(inputFLName,"ID", Delta_WL + str(spField), "Cell_ID","KEEP_COMMON") #save feature layer with joined data arcpy.CopyFeatures_management(inputFLName, "Joined_"+fcName) print "Joined_" + fcName + " created" ---- with this I don't get an error - but nothing is added to my geodatabase. What am I missing?
... View more
03-08-2012
03:29 AM
|
0
|
0
|
679
|
POST
|
I used the maketableview_management command and the script did run. Is there something I can print out that will tell me if a temporary table with the desired information was definitely made? Otherwise I will just have to attempt a join with a shapefile to see if it did what I wanted it to do.
... View more
03-07-2012
06:39 PM
|
0
|
0
|
679
|
POST
|
I would try making a tableview with a where clause. Make a list of your where clauses or create them on the fly depending on the complexity. You may have to convert your data to a different table type first, I don't believe csv is directly supported for this tool. I will try that and let you know. I did not know about tableview.
... View more
03-07-2012
08:17 AM
|
0
|
0
|
679
|
POST
|
I am stuck and hoping someone here can help. I am rather new to Python but came up with something I thought could help me and was attempting to implement it. I have a comma delimited file that contains a few columns of data, three of which I want to use. I have rows of data categorized under one column called "SP" which has numbers from 1 to 10. I want to be able to write a loop script that parses only the data for SP = 1, joins that data to another shapefile based on a column called Cell_ID, then for SP = 2 and joins that to a shapefile based on the column called Cell_ID, then SP = 3 and joins that to another shapefile based on a column called Cell_ID and so on. I thought this task could be done using a search cursor with a where clause but I am not getting too far. My guess is I am making it too hard because that is what I always do :9( Could I get some hints as to if the search cursor would work (can you join to another shapefile based on the results of a search cursor?) and if so how would the where clause be implemented. If that won't work can you point me in the right direction?
... View more
03-07-2012
03:48 AM
|
0
|
8
|
3327
|
POST
|
I was asked to calculate the volume within a reservoir and was asked to do it in Acrobat by tracing the contour lines. Acrobat would then calculate the volume. That was fine when the contour interval was 20 ft and the dam was 100 ft high, but now the contours are 2 ft with a 100 ft high dam. I figured out how to calculate the volume in 3D analyst, but the engineer I am doing this for would like to be able to calculate the volume every 2 ft in height. I am not an engineer so I don't understand why this is needed, but it may relate to knowing how much water can fit into a reservoir given various dam heights. I used the slice tool but I am not really sure what the function is or if it will get me where I want to go. Is there a way to calculate the volume of each 2ft slice in the reservoir? I had also told this engineer about model builder. He wondered if this could be set up in model builder to calculate the volume every 2 feet?
... View more
11-09-2011
11:50 AM
|
0
|
1
|
3170
|
POST
|
I also got the impression at the What's new in 10 event hosted by ESRI that you could group multiple figures into one file. In my group we use ArcMap to make all of our figures for groundwater modeling reports. When we are done we can have 35 .mxd files in our project folder. After one of my coworkers mentioned it at a meeting yesterday (works in a different group) I decided to check it out. I was very disappointed to learn that this multiple feature created a grid of the map area and created maps for each section of the grid. We have no use for that at all. Also at the Whats new in 10 event the ESRI people said they watched users to come up with this new version. You really need to watch members of my unit because a lot of the changes we have found so far either don't help us or make things harder. We don't digitize streets and roads and sewer lines. We don't care about topology. We use ArcMap for data analysis and figure making.
... View more
01-13-2011
10:31 AM
|
0
|
0
|
610
|
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:23 AM
|