POST
|
Isn't the projection info found in the SitesForDemo_NAD83_Snapped.prj file that's packaged up in the zip file? I guess without arcpy you would have to temporarily unzip that file and read thru it to locate: PROJCS ["NAD_1983_2011_UTM_Zone_11N" However, there's nothing that says/guarantees that what is being uploaded will contain that .prj file and you would have to handle that in your code.
... View more
02-28-2023
12:18 PM
|
1
|
0
|
794
|
POST
|
I went ahead and just got pyScripter setup for now but will need to go back thru the VisualCode install... I got lost tyring to get the correct python install / extensions all setup but I would love to get this working since we do alot of other dev work in VisualCode and would be nice to just stick to one IDE.
... View more
02-28-2023
11:19 AM
|
0
|
0
|
1166
|
POST
|
I think this got me setup with pyScripter. Thanks for the screenshots, very helpful.
... View more
02-28-2023
11:17 AM
|
0
|
0
|
1170
|
POST
|
I hadn't thought to use VSCode! Thank you for your input Shaun.
... View more
02-28-2023
09:42 AM
|
0
|
0
|
1177
|
POST
|
I have had ArcPro installed on a Windows VM that also has an existing install of ArcGIS Desktop 10.8.1 and pyScripter. Up to now I had been writting .py script sources to GP Tools and GP Services for ArcGIS 10.8 and need to move everything over to ArcPro/Enterprise. Issue: how to setup the installation of pyScripter IDE to now use the Pro installed python 3.x and its libraries? Can this be done with envrionment settings in the pyScripter IDE? Do we need to install a different IDE to write py scripts? Do we need to uninstall ArcGIS 10.8? Any info is much appreciated!
... View more
02-28-2023
08:31 AM
|
0
|
6
|
1201
|
POST
|
Your feedback is appreciated. I hoped to just port over our current GP services that implement ConfigParser and AES but coming to terms with the need to just come up with a replacement. Simple is best as this really is more or less about not having any credentials all over the place and maintaining a single .enc file that could be decrypted at runtime is super simple. Also: this will all be part of GP tools as well as them published out as GP services (inside our DMZ). Essentially we're just supporting token-based authentication by having a GP service hit a generateToken endpoint of an on-prem AGS Enterprise -- that token is used by custom widgets in WAB apps.
... View more
02-28-2023
08:24 AM
|
0
|
0
|
589
|
POST
|
Thanks for taking the time to explain this! While I was unsure how to implement your suggestion, I had just added this to the constructor of the widget: constructor: function(args){
lang.mixin(this,args);
window.map = this.map;
projection.load();
}, I don't know if pre-loading the projection in this manner is acceptable way to do it, it does work and allow a much simpler implementation of that createGraphicFromGeometry() funtion and simply returns the graphic in the desired spatref. Again -- the whole issue I'm dealing with is working with services published to an enterprise site that have a different spatial reference than the ESRI basemap that is loaded in the webmap source to this WAB app and just doesn't play well. So simply forcing the same spatial reference on the geometry seems to work.
... View more
02-20-2023
06:56 AM
|
0
|
0
|
954
|
POST
|
thank you, do you have any suggestions where to place .then()
... View more
02-17-2023
03:44 AM
|
0
|
2
|
968
|
POST
|
JS 3.x Code running in a custom widget from WAB We're just trying to determine how to work with geometry from a feature service that has a spatial reference of wkid 2881 but our existing code was failing trying to load a graphics layer with the geometry throwing the error, Geometry (wkid: 2881) cannot be converted to spatial reference of the map (wkid: 102100) So we identified where this was happening and thought to just try and do a reprojection but I keep getting undefined geometry when I attempt to implement, Maybe it's a simple scope issue? getGraphicFromQueryResults: function(queryResults){
if (queryResults && queryResults.features.length > 0){
var theGraphic = this.createGraphicFromGeometry(queryResults.features[0].geometry);
//theGraphic always returns undefined
console.log(theGraphic)
return theGraphic //this.createGraphicFromGeometry(queryResults.features[0].geometry);
}
},
createGraphicFromGeometry: function(geometry){
projection.load().then(lang.hitch(this, function () {
const inSpatialReference = new SpatialReference({ wkid: 2881 });
const spSpatialReference = new SpatialReference({ wkid: 4326 });
const poly = new Polygon(geometry, inSpatialReference);
var geoT = projection.getTransformation(inSpatialReference, spSpatialReference)
const projectedPoly = projection.project(poly, spSpatialReference);
var attributes = {};
attributes[this.config.applicationIdField] = this.appId;
var graphic = new Graphic(projectedPoly,null,attributes);
console.log(graphic)
return graphic;
}).bind(this))
} Or any comment on how to deal with with services with other spatial references than what ESRI basemaps seems to require?
... View more
02-16-2023
02:05 PM
|
0
|
4
|
1013
|
POST
|
Hello! I am in the process of migrating existing implementations over to Pro and running into issues where the py libraries we've been using are not going to be readily available and looking to see if we can replicate functionality with the installed packages that come with ArcPro 2.9 Specifically we've been using these: from Crypto.Cipher import AES
import ConfigParser Where we have an .enc file with credentials that the .py script will decrypt using AES and locate the key required for that decryption using ConfigParser to read an .ini text file on a network folder. I see there's a cryptography library that comes with ArcPro installs https://pro.arcgis.com/en/pro-app/latest/arcpy/get-started/available-python-libraries.htm and wondering if anyone has any simple examples.
... View more
02-14-2023
12:40 PM
|
0
|
4
|
699
|
POST
|
I just tried to replicate what is found in ESRI docs for the combined query parameters. The itemType param is outside of the first combo params for title and user, I didn't see anything for using AND condition anywhere. I'm not totally certain that this was even a problem for my implementation at all: I was attempting to run a report off a Survey123 (which works great) but before execution the requirement was to delete any exisitng report previously created. This was failing and causing a new report to be created with the same title but a datetime stamp was being added to the title. To remedy I simply created another Notebook to cycle through the folder and delete any items of type pdf to guarantee none would exist the next time the generate report Notebook ran.
... View more
02-14-2023
05:43 AM
|
1
|
2
|
917
|
POST
|
I think what I'm running into is that if the item title is not found then it will return a list of all items of that type for that user. This is sort of confusing as I am expecting an empty list!
... View more
02-08-2023
01:41 PM
|
0
|
4
|
970
|
POST
|
I have a Notebook running in AGOL org account that is supposed to find a specific item for a user but it always returns all a list of the items of that type for the user, not the 1 item specified in they query. items_existing = gis.content.search(query="title:SomeItemTitle, owner:someusername", item_type='PDF') This does not return the single expected item with the title "SomeItemTitle" and returns the list of all items of type PDF for that user. Am I not implementing this correctly? Edit: the problem is that I NEED to delete an item with the exact title name because it will be recreated again with the same title (getting a new itemId). What I am running into is that it cannot find the specific item by title and for some reason when it recreates the pdf item it adds on a datetime stamp into the title name.
... View more
02-08-2023
01:33 PM
|
0
|
5
|
982
|
Title | Kudos | Posted |
---|---|---|
1 | 08-08-2022 01:40 PM | |
1 | 02-15-2019 08:21 AM | |
2 | 08-14-2023 07:14 AM | |
1 | 07-10-2023 01:25 PM | |
1 | 05-19-2023 08:38 AM |
Online Status |
Offline
|
Date Last Visited |
a week ago
|