POST
|
Thanks for your reply. Yes it is possible to do this in the script who use the "ArcGIS API for Python". But it was some kind of frustrating to use this great library to create some geometry-stuff and it worked in an environment and in the other environment it does not work, after some time debugging you can find the answer..... But not in the documentation, or? On the other hand it would really helpful if the answer is syntactically the same.
... View more
02-18-2018
06:08 AM
|
0
|
0
|
707
|
POST
|
Yes this I found too: @property
def extent(self):
"""
The extent of the geometry.
"""
ptX = []
ptY = []
if HASARCPY:
return getattr(self.as_arcpy, "extent", None)
elif isinstance(self, Polygon):
for pts in self['rings']:
for part in pts:
ptX.append(part[0])
ptY.append(part[1])
return min(ptX), min(ptY), max(ptX), max(ptY) But you agree that if you write a function the answer should always syntacticly be the same? Or what I am missing? Otherwise we need to program outside a checker and interpreter of the results: if arcpy is installed interpret the results different.
... View more
02-18-2018
05:38 AM
|
0
|
3
|
707
|
POST
|
If a script runs in an environment with ArcGIS Pro (arcpy) or in environment without the results are different. The "extent" result is ones an array and the other one is a string with all values: Example: import arcgis
from arcgis.gis import GIS
from arcgis.geometry import Polygon
gis = GIS()
webmap_search = gis.content.search(query = 'title:"World Regions" AND owner:esri', item_type = 'Feature Layer Collection')
layer_region = webmap_search[0].layers[0]
query_result = layer_region.query(where="REGION='Western Europe'")
selected_region = query_result.features[0]
from arcgis.geometry import Polygon
polygon = Polygon({
"rings" : selected_region.geometry['rings'],
"spatialReference" : {"wkid" : 3857}
})
extent = polygon.extent
print(extent) Result WITHOUT arcpy:
(-533252.171281941, 5066318.40606212, 1910953.15492337, 7372844.99872111)
Result WITH arcpy (ArcGIS Pro):
-533252.171281941 5066318.40606212 1910953.15492337 7372844.99872111 NaN NaN NaN NaN
This behavior is difficult if you would like to use the same script in different environment.
... View more
02-18-2018
12:01 AM
|
0
|
5
|
914
|
POST
|
Hello ArcGIS Pro SDK question: an addin needs to know if the user change the portal which is active. for this purpose it looks that there is an event: ArcGIS.Desktop.Core.Events.ActivePortalChangedEvent. But it is not fired. I used the Snippet from https://github.com/Esri/arcgis-pro-sdk/wiki/ProSnippets-Sharing ArcGIS.Desktop.Core.Events.ActivePortalChangedEvent.Subscribe((args) => { var active_uri = args.ActivePortal?.PortalUri.ToString(); //etc}); And subscribed the event after Event "ArcGIS.Desktop.Framework.Events.ApplicationStartupEvent" in the initialize-function like it is described in the chapter "Subscribing to Application Events": ProConcepts Configurations · Esri/arcgis-pro-sdk Wiki · GitHub other events like ProjectClosedEvent, ProjectOpenedEvent, ProjectSavedEvent, ProjectItemsChangedEvent works fine. But the events ActivePortalChangedEvent, ArcGISPortalAddedEvent, ArcGISPortalRemovedEvent do not work as i expect. Do I understand something wrong? Thanks in advance
... View more
12-11-2017
04:13 AM
|
0
|
1
|
381
|
POST
|
Thank you very much charles! It workes with the following line System.Net.WebRequest.DefaultWebProxy.Credentials = System.Net.CredentialCache.DefaultNetworkCredentials;
... View more
11-29-2017
10:23 PM
|
0
|
0
|
673
|
POST
|
There are different options for InterProcessCommunication. On the following page you find an overview of the possibilities: Interprocess Communications (Windows) Because you write that you create your own add-in this is easy to realize. On the other side, it depends what kind of possibility you have.
... View more
11-29-2017
05:29 AM
|
0
|
0
|
269
|
POST
|
Hello I would like to implement in an "ArcGIS Pro Module Add-in" some request to rest-api which is different endpoint then ESRI-Servers. This works well if the ArcGIS Pro with the addin is connected to internet direct. But if it is behind a Proxy it does not work with the Exception: "System.Net.WebException: The remote server returned an error: (407) Proxy Authentication Required." In a separate .Net C# WPF Application I set the app.config with following parameters: <?xml version="1.0" encoding="utf-8" ?> <configuration> <system.net> <defaultProxy enabled="true" useDefaultCredentials="true"/> </system.net> </configuration> --> This works! I tried the same in the "ArcGIS Pro Module Add-in" with a file in the project "app.config". After compilation, the content is inside a file beside the dll with the name "demo.dll.config" and the expected content: <?xml version="1.0" encoding="utf-8" ?> <configuration> <system.net> <defaultProxy enabled="true" useDefaultCredentials="true"/> </system.net> </configuration> How can I configure the DefaultProxy I the Add-In for Rest-Api-Calls? Thanks in advance for any help.
... View more
11-29-2017
03:01 AM
|
0
|
2
|
1326
|
POST
|
Hi Jake Thanks again for the response. We are one step further. We configured the forwardproxy with the result to get the bullets to store the credentials. But set to store the credentials or do not store the credentials and "add item" we get the following error-msg: "Invalid service credentials A JSONObject text must begin with '{' at character 1 of " What could cause this error? Cheers
... View more
04-27-2017
09:48 PM
|
0
|
7
|
1474
|
POST
|
Hello Because it looks that it is not possible to change the symbol for the thousands separator (digit grouping symbol) in ArcGIS Online and Portal for ArcGIS i would like to ask if there is a way to disable by default the "Use 1000 Separator" for all pop-up and table views. See also: Default number format (thousands separator, decimal marker) and date format (country specific) ArcGIS Online thousand separator character/symbol Cheers
... View more
04-20-2017
12:46 AM
|
1
|
0
|
834
|
POST
|
Hello Because it looks that it is not possible to change the symbol for the thousands separator (digit grouping symbol) in ArcGIS Online and Portal for ArcGIS i would like to ask if there is a way to disable by default the "Use 1000 Separator" for all pop-up and table views. See also: Default number format (thousands separator, decimal marker) and date format (country specific) https://community.esri.com/ideas/12134 Cheers
... View more
04-20-2017
12:45 AM
|
0
|
0
|
558
|
POST
|
Hello Is it possible to save a map as "Web Map"-item in JSON like is defined in the spec (Web map specification overview | ArcGIS for Developers) directly? I can publish it and use ArcGIS Online Assistant or the rest-api to get the json, but is it possible directly with ArcGIS Pro? And is it possible to load a "Web Map"-Json into ArcGIS Pro? Cheers
... View more
04-19-2017
07:21 AM
|
0
|
0
|
380
|
POST
|
Hello Is there a way to save the items-information as JSON like the JSON we could see with ArcGIS Online Assistant? Espacially I would like to store the "Web Map"-json to backup this information. Cheers
... View more
04-19-2017
07:11 AM
|
1
|
4
|
4752
|
POST
|
Me either. What about the plans to republish/overwrite a web map?
... View more
04-18-2017
09:31 PM
|
7
|
0
|
4014
|
POST
|
Hello How can we change the default number format in "ArcGIS Online" and "Portal for ArcGIS"? thousands separators --> space or ' (high comma) decimal marker --> . (point) And how we can change the default date format to country specific format? We set the "culture" and "region" in the "ArcGIS Portal"-Settings and the region in AGOL without any changes?!? Cheers
... View more
04-13-2017
01:14 AM
|
1
|
0
|
958
|
Title | Kudos | Posted |
---|---|---|
1 | 04-19-2017 07:11 AM | |
1 | 04-20-2017 12:46 AM | |
1 | 04-28-2017 05:12 AM | |
7 | 04-18-2017 09:31 PM | |
1 | 04-13-2017 01:14 AM |
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:23 AM
|