|
POST
|
I am trying to share a service to my ArcGIS Server through Arcmap. The map has grouped layers but when i try to share the service i get "groupl layer type is not supported for feature service" So my question is how do I this so i can create a map for with group layers for ArcGIS Portal to build a Web App-builder application? Thanks.
... View more
07-03-2019
10:43 AM
|
0
|
3
|
2089
|
|
POST
|
Where is your "NEW" pointing to? Also why do you have line 9 commented out?
... View more
06-27-2019
03:53 PM
|
0
|
1
|
1171
|
|
POST
|
I have set the section grid as the iterate but it appears i am getting an error. I recreated the model and got to work, i guess the first model got corrupted or something.
... View more
06-11-2019
08:20 AM
|
0
|
0
|
1654
|
|
POST
|
Are you running this tool in ArcMap or Pro? I believe once you close out of the program the In_memory is deleted. Do you have a arcpy.Delete_management("in_memory\MN__Table") at the end of you script? Your best bet is to write\export the report out then the next time you run the script overwrite it.
... View more
05-30-2019
03:52 PM
|
0
|
0
|
1232
|
|
POST
|
I am trying to clip the soils layer by sections. I've tried creating a model but i am not getting the results i am looking for. The soils is the layer i need to clip by the sections layer but i need the soils to be clipped by each sections in it's owner feature class. When clipping i would like to retain the section name for each clip if possible, any one have an example of a model, python script or any ideas? See attached the first pic(SectionsSoil) has the soils layer with the sections layer overlaid on top I need to be able to clip each section of soils into it's own section, pic 2 (SectionSoil). Also attached is the pic of the model i tried. Thanks.
... View more
05-13-2019
01:31 PM
|
0
|
2
|
1745
|
|
POST
|
Yes i am good, but still wondering why having arcpy.env.preserveGlobalIds = True would cause an empty feature class.
... View more
03-01-2019
12:59 PM
|
0
|
1
|
1464
|
|
POST
|
After some further investigating i found the issue was with arcpy.env.preserveGlobalIDs. I had this at the top of my script :arcpy.env.preserveGlobalIds = True: I am not sure why it worked after removing this line. Why would this create an empty feature class? The original feature class did not have GlobalIds.
... View more
03-01-2019
09:22 AM
|
1
|
3
|
1464
|
|
POST
|
I modified the code to this but i am still getting empty features... Taxparcels = "C:/Temp/Scratchworkspace.gdb/TaxParcels1"
mem_fc = arcpy.CopyFeatures_management(Taxparcels, r"in_memory\TaxPar")
fl = arcpy.MakeFeatureLayer_management(mem_fc, "TaxPar")
query = "PIN LIKE 'Q%'"
arcpy.SelectLayerByAttribute_management(fl, "NEW_SELECTION", query)
if int(arcpy.GetCount_management(fl).getOutput(0)) > 0:
arcpy.DeleteFeatures_management(fl)
arcpy.FeatureClassToFeatureClass_conversion(fl, "C:/Temp/Scratchworkspace.gdb", "TEST")
... View more
03-01-2019
08:26 AM
|
0
|
0
|
1464
|
|
POST
|
I can't figure out why i am getting an empty feature class after i delete features, add field and calulate and delete empty features. I would appreciate some help. Taxparcels = "C:/Temp/Scratchworkspace.gdb/TaxParcels1"
PT = "Taxparce1s"
arcpy.MakeFeatureLayer_management(Taxparcels, PT)
########################################
# Process: Select Layer By Attribute to remove Q accounts
arcpy.SelectLayerByAttribute_management(PT, "NEW_SELECTION", "\"PIN\" LIKE 'Q%'")
# Process: Delete Features
if int(arcpy.GetCount_management(PT).getOutput(0)) > 0:
arcpy.DeleteFeatures_management(PT)
#arcpy.DeleteField_management(PT, ["ACRES"])
PT1 = "Taxparcels1"
arcpy.MakeFeatureLayer_management(PT, PT1)
arcpy.FeatureClassToFeatureClass_conversion(PT1, "C:\Temp\Scratchworkspace.gdb", "TEST")
... View more
03-01-2019
07:56 AM
|
0
|
5
|
1549
|
|
POST
|
I am not sure what all of it means but these are the ones i believe to know and i could be wrong. Maybe and hopefully someone else can answer what i am missing. Dan Patterson helped me update my field mapping, i had an older version of it. Maybe he can shine some light... Name = DXF_TEXT Alias = DXF_TEXT True = Editable True = Non Editable False = required Length = 11 scale = 0 Precision = 0 Merge rule = First join Delimiter = # (meaning ' ' , Null string) ? = {0} Data source field = DXF_TEXT ? = -1 ? = -1
... View more
02-19-2019
07:45 AM
|
1
|
1
|
10499
|
|
POST
|
It could have to do with your your workspace. Pro doesn't like the database connection links from what i gather. You have to use C:\\Users\\***\\AppData\\Roaming\\Esri\\ArcGISPro\\Favorites\\**sde database**\\**Featuredataset**\\**feature class**. In Pro contents window navigate to the feature class then open Pro paython window drag the feature class to the very bottom python window and that should give you the path and use that for your layer paths. Aslo you need to use the following below to set paths. Python treats a backslash (\) as an escape character. I know it worked in 2.7 but not in 3.6 at least that what i have found. "c:/temp/streams.shp
"c:\\temp\\streams. gdb "
"r"c:\temp\
... View more
02-15-2019
03:45 PM
|
0
|
2
|
2850
|
|
POST
|
I had a hard time understanding field mapping until someone posted a code. I use the code below and works great. import arcpy,sys
from datetime import datetime as d
startTime = d.now()
start_time = time.time()
PT1 = "C:/Temp/Scratchworkspace.gdb/Drain"
FieldMapString = '''
DXF_TEXT "DXF_TEXT" true true false 11 Text 0 0 ,First,#, {0}, DXF_TEXT,-1,-1;
ACCOUNT "ACCOUNT" true true false 11 Text 0 0 ,First,#, {0}, ACCOUNT,-1,-1;
PIN "PIN" true true false 13 Text 0 0 ,First,#, {0}, PIN,-1,-1;
ACRES "ACRES" true true false 4 Double 0 0 ,First,#, {0}, ACRES,-1,-1;
Instrument "Instrument" true true false 10 Text 0 0 ,First,#, {0}, Instrument,-1,-1;
SiteAddres "SiteAddres" true true false 106 Text 0 0 ,First,#, {0}, SiteAddres,-1,-1;
SiteCity "SiteCity" true true false 32 Text 0 0 ,First,#, {0}, SiteZip,-1,-1;
SiteZip "SiteZip" true true false 10 Text 0 0 ,First,#, {0}, SiteZip,-1,-1
'''
def Layers1(PT1):
"""pass the variable and the constant into
the function
"""
fieldmappings = arcpy.FieldMappings()
fieldmappings.loadFromString(FieldMapString)
return fieldmappings
def main(args=None):
if args is None:
args = sys.argv
# Process: Feature Class to Feature Class
arcpy.Append_management(PT1, "C:\Temp\Scratchworkspace.gdb\PT_ALL","NO_TEST", Layers1(PT1))
try:
print ('(Elapsed time: ' + str(d.now() - startTime)[:-3] + ')')
except Exception as e:
# If an error occurred, print line number and error message
import traceback, sys
tb = sys.exc_info()[2]
print ("Line %i" % tb.tb_lineno)
print (e.message)
... View more
02-14-2019
02:53 PM
|
0
|
3
|
10499
|
|
POST
|
I upgrade to Pro 2.3 this morning and now i am getting this error on line 81 and i didn't change the script at all. RuntimeError: ERROR 999999: Something unexpected caused the tool to fail. Contact Esri Technical Support (http://esriurl.com/support) to Report a Bug, and refer to the error help for potential solutions or workarounds. import sys, arcpy, os, fnmatch
from datetime import datetime as d
startTime = d.now()
start_time = time.time()
# Local variables:
print ('Started')
arcpy.env.overwriteOutput = True
arcpy.env.workspace = "C:/Temp/Scratchworkspace.gdb"
arcpy.env.qualifiedFieldNames = False
arcpy.env.preserveGlobalIds = True
PT1 = "C:/Temp/Scratchworkspace.gdb/Drain"
FieldMapString = '''
DXF_TEXT "DXF_TEXT" true true false 11 Text 0 0 ,First,#, {0}, ACRES,-1,-1;
ACCOUNT "ACCOUNT" true true false 11 Text 0 0 ,First,#, {0}, ACCOUNT,-1,-1;
PIN "PIN" true true false 13 Text 0 0 ,First,#, {0}, PIN,-1,-1;
ACRES "ACRES" true true false 4 Double 0 0 ,First,#, {0}, ACRES,-1,-1;
Instrument "Instrument" true true false 10 Text 0 0 ,First,#, {0}, Instrument,-1,-1;
SiteAddres "SiteAddres" true true false 106 Text 0 0 ,First,#, {0}, SiteAddres,-1,-1;
SiteCity "SiteCity" true true false 32 Text 0 0 ,First,#, {0}, SiteZip,-1,-1;
SiteZip "SiteZip" true true false 10 Text 0 0 ,First,#, {0}, SiteZip,-1,-1;
'''
#print(FieldMapString.format(PT1))
def Layers15(PT1, FieldMapString):
"""pass the variable and the constant into
the function
"""
fieldmappings = arcpy.FieldMappings()
fieldmappings.loadFromString(FieldMapString)
return fieldmappings
def main(args=None):
if args is None:
args = sys.argv
# Process: Feature Class to Feature Class
arcpy.FeatureClassToFeatureClass_conversion(PT1, "C:/Temp/Scratchworkspace.gdb", "PT_ALL","", Layers15(PT1, FieldMapString),"")
print ("Finished")
print ('(Elapsed time: ' + str(d.now() - startTime)[:-3] + ')')
try:
print ('(Elapsed time: ' + str(d.now() - startTime)[:-3] + ')')
except Exception as e:
# If an error occurred, print line number and error message
import traceback, sys
tb = sys.exc_info()[2]
print ("Line %i" % tb.tb_lineno)
print (e.message)
... View more
02-06-2019
08:51 AM
|
0
|
1
|
992
|
|
POST
|
ok i think i understand. so i tired to run what you posted to test but i am getting invalid syntax on line with %timeit Tester()
... View more
02-06-2019
07:31 AM
|
0
|
1
|
992
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 10-27-2022 11:37 AM | |
| 1 | 10-31-2023 10:16 AM | |
| 1 | 02-16-2023 01:50 PM | |
| 1 | 08-11-2021 11:13 AM | |
| 1 | 01-06-2021 10:45 AM |
| Online Status |
Offline
|
| Date Last Visited |
09-10-2024
10:42 AM
|