POST
|
Good day @MaxNilsson , Splitting our city territory in smaller zones with a different urban model for each is an option that we are considering. We would prefer exploring other solutions before going that way. Thank you for your suggestion, Maxime
... View more
02-07-2023
06:43 AM
|
0
|
0
|
450
|
POST
|
Good day @Till_Schmid , Yes, the loading time issue that our urban users reported is for displaying the projects list in the overview. When we stay in the urban overview, we can open/close the list without loading time (except the initial loading time), but if we open a project, when we go back to the overview, displaying the projects list again can take a lot of time. In my experience, the loading time can vary during the day from 20-30s to more than a minute. Our organization is mainly using urban during meeting between, promoters, urbanists and city council, so this waiting time is noticed. Thank you very much for your support. I would be glad to provide further details if needed. Maxime
... View more
02-07-2023
06:38 AM
|
0
|
1
|
450
|
POST
|
Hi, I am looking for a way to clone projects from UrbanDesignDatabases to the model UrbanDatabase when the project is completed and will not be edited anymore. I tryed the Add from feature layer from the model configuration menu, selecting a UrbanDesignDatabases and the UrbanEvents layer. Howerver, the scenarios and the project design context were not cloned. Adding future buildings from UrbanDesignDatabase does not works neither. The reason for doing this is that we have over 130 projects in our Urban model all within UrbanDesignDatabases. As we add more and more projects, we experience a longer loading time when we are moving from a project to another. We would like to test if the loading time can be improved if we migrate our closed projects in the model UrbanDatabase. Thank you for your advices with this! Greeting, Maxime
... View more
02-06-2023
01:26 PM
|
0
|
5
|
550
|
POST
|
Sorry, this is a typo error in my code. The library is requests and it is installed by default with python3. Yes I can share an online notebook that reproduce the problem. I am using Google Colab, I hope this is correct with you? I just want to add that my UrbanModel is private, and I can access its private UrbanDatabase projects but not its private UrbanDesignDatabases, which I think it's not normal. Maybe there is some limitations with the oauth2 token of "client_credential" type (esri doc). As I want to automatize some routines with the Urban API, having to sign in manually with a username/password before is not convenient. Thanks again for taking the time helping me, it's really appreciated! P.S.: I'll share you a link to Collab in private soon if it's ok.
... View more
02-02-2023
07:37 AM
|
1
|
0
|
954
|
POST
|
Hi, I am trying to use oauth2 with python in order to get a token that will allow me to query content in my organization with the arcgis library. Everything works correctly, except the fact that when I sign in to ArcGIS Online with the oauth2 token, I only have access to the public items. I am administrator in my organization and I have created my oauth2 application in developers.arcgis.com In python I am using the following code to get a token using the clientId and clientSecret import request
import arcgis
def get_client_oauth2_token(portal_url, client_id, client_secret):
url = "{}/sharing/rest/oauth2/token".format(portal_url)
params = {
'client_id': client_id,
'grant_type': "client_credentials",
'client_secret': client_secret
}
r = requests.post(url, params=params, verify=True)
return r.json()
token = get_client_oauth2_token("https://www.arcgis.com", "my_client_id", "my_client_secret")["access_token"]
gis = arcgis.gis.GIS("https://www.arcgis.com", token=token, referer="https")
items = gis.content.search("", item_type="Map Service", max_items=100)
for item in items:
print("{} - {}".format(item.id, item.access)) Only public items are returned. I dont receive any error. What is wrong with my oauth2 authentification here? Thank you for your help!
... View more
02-01-2023
06:06 AM
|
0
|
0
|
346
|
POST
|
The oauth2 application is created by me (DemersM) from the dashboard in developers.arcgis.com I use the Client ID and Client Secret from that oauth2 application above to get a token like this: import requests
from sgqlc.operation import Operation
from sgqlc.endpoint.http import HTTPEndpoint
from . import urban_api_schema as schema
def get_client_oauth2_token(portal_url, client_id, client_secret):
url = "{}/sharing/rest/oauth2/token".format(portal_url)
params = {
'client_id': client_id,
'grant_type': "client_credentials",
'client_secret': client_secret
}
r = requests.post(url, params=params, verify=True)
return r.json()
def query_urban_design_db_projects(endpoint_url, urban_model_id, token):
endpoint = HTTPEndpoint(endpoint_url, {"Authorization": "Bearer " + token, "Content-type": "application/json", "Accept": "application/json"})
op = Operation(schema.Query)
projects = op.urban_model(urban_model_id=urban_model_id).urban_design_databases.projects(
paging={"limit": 100}
)
attributes = projects.attributes()
attributes.event_name()
result = endpoint(op)
errors = result.get("errors")
if errors:
raise Exception(errors)
return result
token = get_client_oauth2_token("https://www.arcgis.com", "my_client_id", "my_client_secret")["access_token"]
projects = query_urban_design_db_projects("https://urban-api.arcgis.com/graphql", "703144ba056e43e59f373b971431a562", token)
print(projects) Thanks again for your help!
... View more
01-31-2023
07:46 AM
|
0
|
0
|
963
|
POST
|
Thank you so much for sharing this! I will definately go that way!
... View more
01-30-2023
11:31 AM
|
0
|
0
|
386
|
POST
|
Hi, We want to remove a set of mapServices that are hosted on ArcGIS Enterprise. We would like to know if some items in ArcGIS Online were created using those mapServices before pulling the plug. Is there a way to scan ArcGIS Online content using a specific url so items that were added "from the web" could be find? Thank you!
... View more
01-30-2023
11:12 AM
|
0
|
2
|
421
|
POST
|
Hi @AgnieszkaRozniak , Thank you for your reply. I have created a UrbanDesignDatabase project and shared it with my organization but it does not works. However, if I share the project with everyone, the project is returned by the function: {'data': {'urbanModel': {'urbanDesignDatabases': [{'projects': [{'attributes': {'EventName': 'Test'}}]}]}}} I have verified that I am the owner of the oauth2 application (client id and secret key) which I use with the Urban API and that's correct. I dont know why I can't query UrbanDesignDatabases that are not publicly shared if I am the owner of the model and the owner of the projects and I am using a valid oauth2 application. Do you have an idea?
... View more
01-29-2023
10:48 AM
|
0
|
0
|
984
|
POST
|
Hi, I am trying to retreive all the projects from a Urban model including those of UrbanDesignDatabases. I am using the following snippet in python using sgqlc but the results is empty. def query_urban_design_db_projects(endpoint_url, urban_model_id, token):
endpoint = HTTPEndpoint(endpoint_url, {"Authorization": "Bearer " + token, "Content-type": "application/json", "Accept": "application/json"})
op = Operation(schema.Query)
projects = op.urban_model(urban_model_id=urban_model_id).urban_design_databases.projects(
paging={"limit": 100}
)
attributes = projects.attributes()
attributes.event_name()
result = endpoint(op)
errors = result.get("errors")
if errors:
raise Exception(errors)
return result This function returns: {'data': {'urbanModel': {'urbanDesignDatabases': []}}} I know there is many projects from UrbanDesignDatabase in the Urban model I am querying. Am I using the API correctly? Do I have to be the owner of the UrbanDesignDatabases to be able to query them? I am the owner of the Urban model. Thank you!
... View more
01-26-2023
01:48 PM
|
0
|
8
|
1024
|
POST
|
Thank you for confirming that the y is the elevation in CityEngine! I am not sure why the z (latitude) is negative in CityEngine but positive in the coordinates system. My data is in the north hemisphere. Anyway, everything seems to work so I dont worry. Thanks again!
... View more
11-28-2022
06:00 AM
|
0
|
0
|
608
|
POST
|
Ok thanks for your reply! Can you confirm that on your side the y and z are not inverted like me? I would like to be sure that it's not a normal behaviour of CityEngine before opening a ticket.
... View more
11-24-2022
01:21 PM
|
0
|
0
|
642
|
POST
|
Hi, I have a weird behaviour in CityEngine 2022. It seems the y and z are inverted somehow. The scene coordinates system is EPSG 3857 just like the layers and terrain. For instance if I use python to get the position of a selected shape I got this: You can see the z is the second argument and the y is the third of the ce.getPosition() returned sequence. Moreover the y (-5677497.278076172) should be positive (north hemisphere), not negative. Except the python, everything seems to work correctly in CityEngine. If I export models in multipatch and open it in ArcGIS Pro the layer is correctly positionned. What is the cause? How can I correct that situation? Thank you! Maxime Demers
... View more
11-21-2022
10:48 AM
|
0
|
7
|
698
|
Title | Kudos | Posted |
---|---|---|
1 | 08-30-2021 06:44 AM | |
1 | 08-30-2021 07:07 AM | |
1 | 08-30-2021 08:21 AM | |
1 | 11-28-2023 02:02 PM | |
1 | 12-04-2023 05:58 AM |
Online Status |
Offline
|
Date Last Visited |
a week ago
|