|
POST
|
This is caused because you are using the same input data, and output data, and where clause. As you dont change the value for duplicated points field: row[4] #Reservoir When you create the points the first time round the script properly works. Next time, when run the where clause picks up the original input points, plus these newly created ones! So its working correctly. You could add a field say 'Source' and populate with 'Input Data', and then for the duplicate rows populate it with a different value 'Dupe point', and include this in the where clause. e.g. whereClause = (
"RESERVOIR IN('CLEAR FORK', 'STRAWN', 'WOLFBERRY')"
" AND EUR IS NOT NULL"
" AND RESERVOIR2 IS NULL and SOURCE = 'Input Data'"
)
... View more
01-06-2017
01:00 AM
|
0
|
3
|
2911
|
|
POST
|
I dont think hes using the ESRI stack at all Unfortunately we are not the best forum for helping with Django open source framework as we generally utilize ArcGIS Server for these type of requirements.
... View more
12-20-2016
02:10 AM
|
0
|
1
|
921
|
|
POST
|
try this script and see how long it takes to run: import arcpy Depending on your infrastructure, it can take 30 seconds++ to load a license of ArcMAP (the equivilant of opening arcmap desktop) which a external script is required to do each time its run.
... View more
12-13-2016
02:41 AM
|
1
|
3
|
1344
|
|
POST
|
You could use this tool (Cell statistics) to create an raster of the expected response time of the services combined. ArcGIS Desktop then I think you could use this tool (Con), to say (Not 100% sure about the specifics of this bit but from reading help it looks like it may be possible): If JourneyTime Combined = JourneyTime Helicopter --> This is an helicopter area, else it is an fireengine area. ArcGIS Desktop Extra Info!: ArcGIS Desktop ArcGIS Desktop Thinking about areas where values are the same....Maybe you would do it the other way, as its probably cheaper to send a fire engine! If JourneyTimeCombined = JourneyTime FireEngine --> This is an Fireengine area, else it is an helicopter area.
... View more
12-09-2016
05:52 AM
|
0
|
0
|
1591
|
|
POST
|
Do you have an method to populate the data into the tables? If you need the data within anyways you need to do this task either way, and then you can run your existing script. If not, how do you plan to specify the geometry types anyways? You would need to specify them somewhere, then you could create a sample feature for each type of geometry, and have a line of code to copy this feature into the FC. e.g. __author__ = 'WebbL'
import sys
import traceback
import subprocess
import arcpy
try:
arcpy.env.workspace = r"C:\xxESRI\Desktop10.4\ArcCatalog\12C_oracle.sde"
txtPath = r"C:\Users\FCList.txt"
txt = open(txtPath, "r")
for line in txt.readlines():
fcName = line.split(":")[0]
#Add a feature of required geometry type
fcGeometryType = line.split(":")[1]
inputGeometryFeat = [os.path.join(geometryTemplateFolder, fcGeometryType)]
arcpy.Append_management(inputGeometryFeat, fcName, "NO_TEST")
print (fcName)
arcpy.RegisterWithGeodatabase_management(fcName)
print ("{0} ist registriert".format(fcName))
#Clean up the template geometry
arcpy.DeleteFeatures_management(fcName)
txt.close()
except:
try:
txt.close()
except:
pass
tb = sys.exc_info()[2]
tbinfo = traceback.format_tb(tb)[0]
pymsg = "PYTHON ERRORS:\nTraceback Info:\n" + tbinfo + "\nError Info:\n " + \
str(sys.exc_type)+ ": " + str(sys.exc_value) + "\n"
print(pymsg)
msgs = "Arcpy ERRORS:\n" + arcpy.GetMessages(2) + "\n"
print(msgs)
... View more
12-09-2016
05:03 AM
|
0
|
0
|
1528
|
|
POST
|
What you could try to do is print out the path to the rasters that crash during: sumDT + dTTemp Then try to load these 2 files into arcmap, and try and Raster calc them manually (Or whatever that line of code does), and see if you get a better error message or if Arc crashes. If Arc crashes, its likely an issue with your input data / possible data format limitation. e.g. if you are trying to add 2 tiffs, from different extents, the resulting file may exceed the maximum TIFF file size / maybe an individual calculated cell value, ends up larger than the range the TIFF format allows. (Guessing without seeing your data!)
... View more
12-02-2016
07:50 AM
|
1
|
0
|
2258
|
|
POST
|
Tried to see something obvious but couldnt to me! If my python.exe itself crashes, I usually get an exit code at a minimum. (If run from an IDE) e.g. any standard time my process finishes , or crashes with a standard python trackback, it says: Process finished with exit code 0 (Above my console) However if python .exe crashes, my IDE usually has something like: Process finished with exit code -2723923718 Which you can then sometimes google to point you in the right direction.
... View more
12-02-2016
07:41 AM
|
1
|
2
|
2258
|
|
POST
|
When altering between inside / outside of ArcMAP, can you confirm you just change the line of code: mxd = arcpy.mapping.MapDocument(mxdLocation)
to
mxd = arcpy.mapping.MapDocument("CURRENT")
and everything else remains the same?
... View more
12-01-2016
06:47 AM
|
0
|
1
|
479
|
|
POST
|
I dont think we can use style manager within Arcpy. I have tested "Layer.replacedatasource" and it appears to retain the styles! Take a copy of the layer the user set up in the mxd. (ARRRG the copy doesnt retain styles! So skip this step) update its data source update any symbology as required then remove the template. (This step no longer exists due to the ARRG caveat above)
... View more
11-30-2016
08:53 AM
|
2
|
2
|
2367
|
|
POST
|
Possible alternative, setup your map with the right "Style" using any raster....then make your code: layer.replaceDataSource() or whatever the function is?
... View more
11-30-2016
08:13 AM
|
1
|
0
|
2367
|
|
POST
|
Is the style in the legend not the same as a layer in the map? The legend is just a representation of this layers properties, we work in layers within arcpy. EDIT - OK I understand! I was worried about the display symbologys and 'values' becoming incorrect, you are worried about only the visual display of the legend item!
... View more
11-30-2016
08:11 AM
|
0
|
2
|
2367
|
|
POST
|
I think this should work for rasters, it works for FCs: import arcpy
mxd = arcpy.mapping.MapDocument("CURRENT")
lyr_with_source_symbology = arcpy.mapping.ListLayers(mxd,'Name Of The Source Layer in the mxd')[0]
layer_to_symbolise = arcpy.mapping.ListLayers(mxd,'Name of the Target layer in the mxd again')[0]
arcpy.ApplySymbologyFromLayer_management(layer_to_symbolise,lyr_with_source_symbology)
#Version 2, that hints at how to deal with your specific workflow:
import arcpy
mxd = arcpy.mapping.MapDocument("CURRENT")
df = arcpy.mapping.ListDataFrames(mxd, "*")[0]
lyr_with_source_symbology = arcpy.mapping.ListLayers(mxd,'Name Of The Source Layer in the mxd')[0]
addLayer = arcpy.mapping.Layer(r"path_to_the_new_raster")
arcpy.ApplySymbologyFromLayer_management(addLayer, lyr_with_source_symbology)
arcpy.mapping.AddLayer(df, addLayer, "BOTTOM")
arcpy.mapping.RemoveLayer(df, lyr_with_source_symbology)
... View more
11-30-2016
03:31 AM
|
1
|
5
|
2367
|
|
POST
|
Dissolve wont work as standard on the 2 fields as you require, however do you really need to merge where the areas are the same also, is the first 6 characters of the uniqueID not enough? (Your rows for "Armes court" will not dissolve into 1 feature as they have different areas) Anyways, if just the uniqueIDs is just enough, the workflow is: 1) Calculate field using expression: left( [QL_PROPID], 6) 2) Dissolve using this new field as the dissolve field.
... View more
11-25-2016
08:06 AM
|
2
|
2
|
1510
|
|
POST
|
Not really sure, but im pretty sure that in my code...my IDs align better...for example where you have: class Extension(object):
and:
extExtension.enabled = True
In my code I have:
class extExtension(object):
extExtension.enabled = True
... View more
11-24-2016
08:01 AM
|
0
|
1
|
686
|
|
POST
|
Hi, Theres some stuff about field maps here also that may help you! https://community.esri.com/thread/185431-append-tool-and-field-mapping-help-examples
... View more
11-18-2016
04:33 AM
|
1
|
0
|
2256
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 11-29-2019 07:45 AM | |
| 1 | 05-13-2013 07:11 AM | |
| 1 | 05-24-2011 07:53 AM | |
| 1 | 05-22-2017 05:01 AM | |
| 2 | 07-29-2019 05:34 AM |
| Online Status |
Offline
|
| Date Last Visited |
10-22-2024
10:40 AM
|