|
POST
|
I need help getting the merge to work on this script. I currently do not get an error but features don't merge. I need the features of wp1 Mile and wp2 Mile to merge into one feature but merge based on the Buff_DIST feild, the attributes with "1" will be one and the ones with "2" will be another. I think the reason why i get 12 features in the mile1_2 is because there is multiple parcels in the SP the code i am working with. Should i be using a Dissolve and if so how we i use the dissolve with my current code? distances = ["1 Mile", "2 Mile"]
for distance in distances:
outfile = "wp%s" % distance
arcpy.Buffer_analysis(SP, outfile, distance, "FULL", "ROUND", "", "BUFF_DIST")
out = arcpy.env.workspace
lyr = ["wp1 Mile", "wp2 Mile"]
#shplist = arcpy.ListFeatureClasses(lyr, "Polygon")
arcpy.Merge_management(lyr, os.path.join(out, "mile1_2"))
... View more
11-09-2016
09:22 AM
|
0
|
3
|
2372
|
|
POST
|
So i built a web app, i added the map i mad on ArcGis online with layers that i uploaded onto ArcGIS online. I upload the layer by using the "Add item, from computer" as a zip file. Once i was happy with the app i download and i tested it on my IIS with a proxy to by pass the login. I finally got the proxy to by pass the login. The problem I am having now is that when i try to print with the stock print widget i get "Error, try again". Chrome console throws this error and i am not sure what it means. init.js:89 Error: Unable to complete operation. at Object.f.load (http://js.arcgis.com/3.18/init.js:862:493) at http://js.arcgis.com/3.18/init.js:87:450 at c (http://js.arcgis.com/3.18/init.js:103:393) at d (http://js.arcgis.com/3.18/init.js:103:182) at b.Deferred.resolve.callback (http://js.arcgis.com/3.18/init.js:105:10) at c (http://js.arcgis.com/3.18/init.js:104:96) at d (http://js.arcgis.com/3.18/init.js:103:182) at b.Deferred.resolve.callback (http://js.arcgis.com/3.18/init.js:105:10) at http://js.arcgis.com/3.18/init.js:92:118 at h (http://js.arcgis.com/3.18/init.js:107:279) So i did a little testing and found something odd. If i add a layer to my ArcGIS online map( map used in my web Appbuilder) and not change a thing to that layer i get it to print fine BUT if i change the style of that layer say to only have a clear fill of the polygons i get the error mentioned above. If i try to change it back to with a fill i still get the error, i have to remove the layer from the map and re add the layer and not change anything for it to print fine. Anyone else having this issue?
... View more
11-09-2016
08:00 AM
|
0
|
5
|
3542
|
|
POST
|
I was trying to use Print Plus which worked fine in Web Appbuilder but once i download and placed the app in wwwroot and launched i get an init.js:89 Error: Unable to complete operation. So i was looking to see what other options i had. Thanks for the info and reply.
... View more
10-27-2016
11:35 AM
|
0
|
0
|
1487
|
|
POST
|
my bad, yes i don't have ArcGIS Server. I am only using AGOL.
... View more
10-27-2016
10:33 AM
|
0
|
2
|
1487
|
|
POST
|
I need some help getting the stock Web Appbuilder 2.0 to print with a header, layout and layer list and scale. I am not supper familiar with java. So if anyone can guide me through to modify the Print.js, i would really really appreciate it. i would like it to look like the the attached. I do not have ArcGIS Web Server.
... View more
10-27-2016
09:39 AM
|
0
|
4
|
1839
|
|
POST
|
oh darn i did not know that. I guess i 'll have to just use the one that come with the builder. It was a very nice widget. i was surprised that ESRI didn't modify/upgrade the print widget that comes with the app builder to include some of the features that Print Plus has...HUGE bummer. How do you remove the the Source: blah blah from the stock print widget?
... View more
10-26-2016
11:33 AM
|
0
|
0
|
1374
|
|
POST
|
Nobody else has had this problem. I would like to get it up and running as the Print Widget that comes with Web Appbuilder doesn't include anything except for the picture. I don't have access to Arcgis Server so some how i really need to fix this problem.
... View more
10-26-2016
10:47 AM
|
0
|
2
|
1374
|
|
POST
|
I add the print plus widget to the Web Appbuilder application the printing work great, but i have download the app with the print plus and placed to my iis to do a test run and i noticed that the when i try to print i get the "Error, try again". I run it in chrome and it gives me the "Error, try again." i am using Print Plus Widget Version 1.1.6 July 12,2015 I have "serviceURL": "http://utility.arcgisonline.com/arcgis/rest/services/Utilities/PrintingTools/GPServer/Export%20Web%20Map%20Task", in the C:\GIS\API\ArcGISWebAppBuilder\WebAppBuilderForArcGIS 2.1\server\apps\6\configs\PrintPlus. I have set up a proxy for this application. I am not sure what is going on. I get the following errors on Chrome console. init.js:89 Error: Unable to complete operation.(…)w @ init.js:89(anonymous function) @ init.js:88c @ init.js:103d @ init.js:103resolve.callback @ init.js:105c @ init.js:104d @ init.js:103resolve.callback @ init.js:105c @ init.js:104d @ init.js:103resolve.callback @ init.js:105c @ init.js:104d @ init.js:103resolve.callback @ init.js:105(anonymous function) @ init.js:92h @ init.js:107k @ init.js:107resolve @ init.js:109a @ init.js:108h @ init.js:107k @ init.js:107resolve @ init.js:109a @ init.js:108h @ init.js:107k @ init.js:107resolve @ init.js:109a @ init.js:108h @ init.js:107k @ init.js:107resolve @ init.js:109n @ init.js:138e @ init.js:142
PrintPlus.js?wab_dv=2.1:1584 Error: Unable to complete operation.
at Object.g.load (http://js.arcgis.com/3.17/init.js:857:426)
at http://js.arcgis.com/3.17/init.js:87:450
at c (http://js.arcgis.com/3.17/init.js:103:393)
at d (http://js.arcgis.com/3.17/init.js:103:182)
at b.Deferred.resolve.callback (http://js.arcgis.com/3.17/init.js:105:10)
at c (http://js.arcgis.com/3.17/init.js:104:96)
at d (http://js.arcgis.com/3.17/init.js:103:182)
at b.Deferred.resolve.callback (http://js.arcgis.com/3.17/init.js:105:10)
at http://js.arcgis.com/3.17/init.js:92:118
at h (http://js.arcgis.com/3.17/init.js:107:279) Error: Unable to complete operation.
at Object.g.load (http://js.arcgis.com/3.17/init.js:857:426)
at http://js.arcgis.com/3.17/init.js:87:450
at c (http://js.arcgis.com/3.17/init.js:103:393)
at d (http://js.arcgis.com/3.17/init.js:103:182)
at b.Deferred.resolve.callback (http://js.arcgis.com/3.17/init.js:105:10)
at c (http://js.arcgis.com/3.17/init.js:104:96)
at d (http://js.arcgis.com/3.17/init.js:103:182)
at b.Deferred.resolve.callback (http://js.arcgis.com/3.17/init.js:105:10)
at http://js.arcgis.com/3.17/init.js:92:118
at h (http://js.arcgis.com/3.17/init.js:107:279)
... View more
10-25-2016
01:20 PM
|
0
|
4
|
2379
|
|
POST
|
http://XXXXXX.maps.arcgis.com when i run the application in Chrome i get the Please sign in to access the item onArcGIS Online (item). How do i find out what "Item" the sign in is referring to?
... View more
10-21-2016
09:10 AM
|
0
|
1
|
2457
|
|
POST
|
yes i see a list of services. Looking at the developer tools in chrome headers i see 3 http://XXXXXX.maps.argis.com/sharing/rest and https//XXXXXX.maps.argis.com/com/sharing/rest. The http://XXXXXX.maps.argis.com/sharing/rest response is red dojo.io.script.jsonp_dojoIoScript1._jsonpCallback({"access":"private","analysisLayersGroupQuery":"title:\"Living Atlas Analysis Layers\" AND owner:esri","basemapGalleryGroupQuery" I am not sure why i have http and https. I have looked through my services and can not locate a http.
... View more
10-21-2016
07:20 AM
|
0
|
3
|
2457
|
|
POST
|
I added both http and https. i am still getting the same error. <?xml version="1.0" encoding="utf-8" ?> <ProxyConfig allowedReferers="*" mustMatch="true"> <serverUrls> <serverUrl url="http://services.arcgisonline.com" matchAll="true"/> <serverUrl url="https://services6.arcgis.com/885XQwwhV5bcCoLj/ArcGIS/rest/services" username="VfKdjecQRxviwDnX" password="884f5ec5cbd946aca3b4ee14179af35f" matchAll="true"/> <serverUrl url="http://XXXXXX.maps.arcgis.com" username="VfKdjecQRxviwDnX" password="884f5ec5cbd946aca3b4ee14179af35f" oauth2Endpoint="https://XXXXXX.maps.arcgis.com/sharing/oauth2/" matchAll="true"> </serverUrl> <serverUrl url="http://services6.arcgis.com/885XQwwhV5bcCoLj/ArcGIS/rest/services" username="VfKdjecQRxviwDnX" password="884f5ec5cbd946aca3b4ee14179af35f" oauth2Endpoint="https://XXXXXX.maps.arcgis.com/sharing/oauth2/ matchAll="true"/> </serverUrls> </ProxyConfig> <!-- See https://github.com/Esri/resource-proxy for more information -->
... View more
10-20-2016
12:01 PM
|
0
|
5
|
2457
|
|
POST
|
I am trying to config a proxy. I have features that are hosted on arcgis online. I have imagery with lables, world transportation, usa Cropland and a feature layer on a map on arcgis online that i set as my map on Web AppBuilder for Arcgis. I created a web application with Web AppBuilder for Arcgis. I download the application and move the app folder to wwwroot folder. I download the proxy file from github.com/Esri/resource-proxy/releases. I copied the DotNet folder in the wwwroot folder and i converted the folder to an application and set applicaiton pool to ASP.NET V4.0. I then opened the proxy.config and entered the services as follows. <?xml version="1.0" encoding="utf-8" ?> <ProxyConfig allowedReferers="*" mustMatch="true"> <serverUrls> <serverUrl url="http://services.arcgisonline.com" matchAll="true"/> <serverUrl url="http://XXXXXXXXXX.maps.arcgis.com" clientId="XXXXXXXXXX" clientSecret="XXXXXXXXXXXXXXXXXXXX" oauth2Endpoint="https://XXXXXXXXXX.maps.arcgis.com/sharing/oauth2/" matchAll="true"> </serverUrl> <serverUrl url="https://services6.arcgis.com/885XQwwhV5bcCoLj/ArcGIS/rest/services" clientId="XXXXXXXXXX" clientSecret="XXXXXXXXXXXXXXXXXXXXf" oauth2Endpoint="https://XXXXXXXXXX.maps.arcgis.com/sharing/oauth2/" matchAll="true"/> </serverUrls> </ProxyConfig> <!-- See https://github.com/Esri/resource-proxy for more information --> my config.json parameters "wabVersion": "2.1", "isTemplateApp": true, "isWebTier": false, "httpProxy": { "useProxy": true, "url": "", "alwaysUseProxy": false, "rules": [{ "urlPrefix": "http://XXXXXXX.maps.arcgis.com/sharing/rest", "proxyUrl": "http://XXXXX.XXXXXXXX.XXX/DotNet/proxy.ashx" }, { "urlPrefix": "http://services6.arcgis.com/885XQwwhV5bcCoLj/ArcGIS/rest/services", "proxyUrl": "http://XXXXX.XXXXXXXX.XXX/DotNet/proxy.ashx" } ] } } I get the following error. XMLHttpRequest cannot load http://XXXXX.XXXXXXXX.XXX/DotNet/proxy.ashx?http://XXXXXX.maps.arcgis.com/sharing/rest/portals/self?f=json&dojo.preventCache=1476978719639. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost' is therefore not allowed access. init.js:89 n {message: "Unable to load http://XXXXX.XXXXXXXX.XXXg/DotNet/pr…?f=json&dojo.preventCache=1476978719639 status: 0", response: Object, status: 0, responseText: "", xhr: XMLHttpRequest…}_ssl: undefinedlog: undefinedmessage: "Unable to load http://XXXXX.XXXXXXXX.XXX/DotNet/proxy.ashx?http://2cweeds.maps.arcgis.com/sharing/rest/portals/self?f=json&dojo.preventCache=1476978719639 status: 0"response: ObjectresponseText: ""stack: (...)get stack: stack()set stack: stack()status: 0xhr: XMLHttpRequest__proto__: Errorw @ init.js:89(anonymous function) @ init.js:88c @ init.js:103d @ init.js:103resolve.callback @ init.js:105c @ init.js:104d @ init.js:103reject.errback @ init.js:105c @ init.js:104d @ init.js:103reject.errback @ init.js:105c @ init.js:104d @ init.js:103reject.errback @ init.js:105(anonymous function) @ init.js:92h @ init.js:107k @ init.js:107w.reject @ init.js:109a @ init.js:108h @ init.js:107k @ init.js:107w.reject @ init.js:109a @ init.js:108h @ init.js:107k @ init.js:107w.reject @ init.js:109a @ init.js:108h @ init.js:107k @ init.js:107w.reject @ init.js:109a @ init.js:108h @ init.js:107k @ init.js:107w.reject @ init.js:109n @ init.js:138f @ init.js:142 portalUtils.js?wab_dv=2.1:73 n {message: "Unable to load http:/XXXXX.XXXXXXXX.XXX/DotNet/pr…?f=json&dojo.preventCache=1476978719639 status: 0", response: Object, status: 0, responseText: "", xhr: XMLHttpRequest…}_ssl: undefinedlog: undefinedmessage: "Unable to load http://XXXXX.XXXXXXXX.XXX/DotNet/proxy.ashx?http://XXXXXXX.maps.arcgis.com/sharing/rest/portals/self?f=json&dojo.preventCache=1476978719639 status: 0"response: ObjectresponseText: ""stack: (...)get stack: stack()set stack: stack()status: 0xhr: XMLHttpRequest__proto__: Error(anonymous function) @ portalUtils.js?wab_dv=2.1:73(anonymous function) @ init.js:63c @ init.js:103d @ init.js:103reject.errback @ init.js:105c @ init.js:104d @ init.js:103reject.errback @ init.js:105c @ init.js:104d @ init.js:103reject.errback @ init.js:105(anonymous function) @ init.js:867c @ init.js:103d @ init.js:103reject.errback @ init.js:105c @ init.js:104d @ init.js:103resolve.callback @ init.js:105c @ init.js:104d @ init.js:103resolve.callback @ init.js:105c @ init.js:104d @ init.js:103reject.errback @ init.js:105c @ init.js:104d @ init.js:103reject.errback @ init.js:105c @ init.js:104d @ init.js:103reject.errback @ init.js:105(anonymous function) @ init.js:92h @ init.js:107k @ init.js:107w.reject @ init.js:109a @ init.js:108h @ init.js:107k @ init.js:107w.reject @ init.js:109a @ init.js:108h @ init.js:107k @ init.js:107w.reject @ init.js:109a @ init.js:108h @ init.js:107k @ init.js:107w.reject @ init.js:109a @ init.js:108h @ init.js:107k @ init.js:107w.reject @ init.js:109n @ init.js:138f @ init.js:142 I can ping the proxy (http://XXXXX.XXXXXXXX.XXX/DotNet/proxy.ashx?ping ) i get { "Proxy Version": "1.1.0", "Configuration File": "OK", "Log File": "Not Exist/Readable"} with http://XXXXX.XXXXXXXX.XXX/DotNet/proxy.ashxhttps://services6.arcgis.com/885XQwwhV5bcCoLj/ArcGIS/rest/services i get. ArcGIS REST Services Directory Home > services API Reference JSON Folder: / Current Version: 10.41 Services: L with http://XXXXX.XXXXXXXX.XXX/DotNet/proxy.ashxhttp://services6.arcgis.com/885XQwwhV5bcCoLj/ArcGIS/rest/services/DSD_ViewerNew i get HTTP Error 500.19 - Internal Server Error I need some serious help please.
... View more
10-20-2016
09:43 AM
|
0
|
7
|
4155
|
|
POST
|
I tried just calling them out by name but i ge the Error 000732 Dataset 1Mile;2Mile does not exist or is not supported Failed to execute (Merge). I am currently trying to do this out of scrip tool to run inside ArcMap. The "1 Mile" and "2 Mile" shp get created, i can see them inside the workspace folder. I guess i need to somehow merge the "1 Mile" and "2 Mile" in side the workspace folder. arcpy.env.workspace = os.path.dirname(mxd.filePath)
wp = os.path.dirname(mxd.filePath)
distances = ["1 Mile", "2 Mile"]
for distance in distances:
outfile = distance
arcpy.Buffer_analysis(SP, outfile, distance, "FULL", "ROUND", "", "ToBufDist")
#out = arcpy.env.workspace
lyr = ["1 Mile", "2 Mile"]
arcpy.Merge_management(lyr, os.path.join(wp, "1_2"))
... View more
10-07-2016
11:01 AM
|
0
|
1
|
2048
|
|
POST
|
Sorry, not sure what you mean by you "you can't create a geodatabase feature class" I mean i do know what you mean but i am not putting or exporting to a geodatabase. The buffer analysis is just exporting them to the workspace folder. I mention that my problem is that after the buffer analysis runs it doesn't add the output to the TOC. I would still like to know why it doesn't add the output to the TOC but... I guess i don't need it to add it the TOC i just need Merge the "1 Miles" & "2 Mile" shapefiels together and update the Buff_Dist field. I tried the following but no luck error
arcpy.Merge_management(shplist, os.path.join(out, "B1_2"))
Parameters are not valid.
ERROR 000468: Input shape types are not equal
Failed to execute (Merge).
distances = ["1 Mile", "2 Mile"]
for distance in distances:
outfile = distance #('In_memory/% distance') #"wp%s" % distance
arcpy.Buffer_analysis(SP, outfile, distance, "FULL", "ROUND", "", "BUFF_DIST")
out = arcpy.env.workspace
shplist = arcpy.ListFeatureClasses(["1 Mile", "2 Mile"])
arcpy.Merge_management(shplist, os.path.join(out, "B1_2"))
... View more
09-30-2016
01:15 PM
|
0
|
3
|
2048
|
|
POST
|
I am trying to apply a python script to a script tool so i can use in ArcMap. This portion of the script when put into ArcMap's python window runs fine, it adds the out put of the output's of "1 Miles" and "2 Miles" to TOC of the MXD and then proceeds to do the Merge, updatecursor and remove the outputs fine. Runs fine in ArcMaps python window import arcpy, os
mxd = arcpy.mapping.MapDocument("CURRENT")
lyr = arcpy.mapping.ListLayers(mxd, "SUBJECT_PROPERTY")[0]
df = arcpy.mapping.ListDataFrames(mxd, "Layers")[0]
#lyrpath = lyr.workspacePath
arcpy.env.workspace = os.path.dirname(mxd.filePath)
wp = os.path.dirname(mxd.filePath)
try:
SP = "SUBJECT_PROPERTY"
lyr.replaceDataSource(wp, "SHAPEFILE_WORKSPACE", SP, True )
except:
pass
df.extent = lyr.getSelectedExtent()
df.scale = 24000
arcpy.RefreshActiveView()
arcpy.RefreshTOC()
try:
SP = "SUBJECT_PROPERTY"
lyr.replaceDataSource(wp, "SHAPEFILE_WORKSPACE", SP, True )
except:
pass
try:
if arcpy.ListFields(SP, "BUFF_DIST"):
print "Field exists"
else:
arcpy.AddField_management("SUBJECT_PROPERTY","BUFF_DIST","Double")
except:
pass
arcpy.RefreshActiveView()
arcpy.RefreshTOC()
distances = ["1 Mile", "2 Mile"]
for distance in distances:
outfile = distance #"wp%s" % distance
arcpy.Buffer_analysis(SP, outfile, distance, "FULL", "ROUND", "", "BUFF_DIST")
arcpy.Merge_management(["1 Mile","2 Mile"], "1_2")
with arcpy.da.UpdateCursor("1_2" , "BUFF_DIST") as cursor:
for row in cursor:
if row[0] == 5280:
row[0] = 1
elif row[0] == 10560:
row[0] = 2
cursor.updateRow(row)
del row
wp1 = "1 Mile"
if arcpy.Exists(wp1):
arcpy.Delete_management("1 Mile")
wp2 = "2 Mile"
if arcpy.Exists(wp2):
arcpy.Delete_management("2 Mile")
A12 = "1_2"
if arcpy.Exists(A12):
arcpy.Delete_management("1_2")
When i create a script tool and it runs but then i get an error at line 57, ExecuteError: Failed to execute. Parameters are not valid.ERROR 000732: Input Datasets: Dataset '1 Mile';'2 Mile' does not exist or is not supportedFailed to execute (Merge). I can see that the the "1 Miles" and "2 Miles" get created but not added to the TOC of the MXD. which i think is why it error's out at the Merge process. Error's out and does not add the "1 Miles" and "2 Miles" to the TOC. import arcpy, string, os
mxd = arcpy.mapping.MapDocument("CURRENT")
df = arcpy.mapping.ListDataFrames(mxd, "Layers")[0]
lyr = arcpy.mapping.ListLayers(mxd, "TAXLOTS")[0]
arcpy.env.workspace = os.path.dirname(mxd.filePath)
wp = os.path.dirname(mxd.filePath)
values = arcpy.GetParameterAsText(0)
fieldName = "DXF_TEXT"
values = values.split(";") # split values into list
values = ["'{0}'".format(v) for v in values] # add single quotes
whereClause = "{0} IN ({1})".format(fieldName, ",".join(values))
arcpy.SelectLayerByAttribute_management(lyr, "NEW_SELECTION", whereClause)
Name = arcpy.GetParameterAsText(1)
for elm in arcpy.mapping.ListLayoutElements(mxd, "TEXT_ELEMENT"):
if elm.text == "Template":
elm.text = Name
df.extent = lyr.getSelectedExtent()
df.scale = 24000
if int(arcpy.GetCount_management("TAXLOTS").getOutput(0)) > 0:
arcpy.Select_analysis("TAXLOTS", "SUBJECT_PROPERTY")
arcpy.SelectLayerByAttribute_management("TAXLOTS", "CLEAR_SELECTION")
del lyr
lyr = arcpy.mapping.ListLayers(mxd, "SUBJECT_PROPERTY")[0]
SP = "SUBJECT_PROPERTY"
lyr.replaceDataSource(wp, "SHAPEFILE_WORKSPACE", SP, True )
arcpy.RefreshActiveView()
arcpy.RefreshTOC()
try:
if arcpy.ListFields(SP, "BUFF_DIST"):
print "Field exists"
else:
arcpy.AddField_management("SUBJECT_PROPERTY","BUFF_DIST","Double")
except:
pass
distances = ["1 Mile", "2 Mile"]
for distance in distances:
outfile = distance #('In_memory/% distance') #"wp%s" % distance
arcpy.Buffer_analysis(SP, outfile, distance, "FULL", "ROUND", "", "BUFF_DIST")
arcpy.Merge_management(["1 Mile","2 Mile"], "1_2")
with arcpy.da.UpdateCursor("1_2" , "BUFF_DIST") as cursor:
for row in cursor:
if row[0] == 5280:
row[0] = 1
elif row[0] == 10560:
row[0] = 2
cursor.updateRow(row)
del row
del mxd, lyr
why doesn't the script add "1 Miles" and "2 Miles" to the TOC of the MXD? Can the Buffer Analysis and Merge be done in "in_memory\ ". if so how? i have tried to set the buffer analysis in memory but i am not sure how to set two distances in_memory. Thanks.
... View more
09-30-2016
09:44 AM
|
0
|
5
|
2963
|
| 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
|