POST
|
Hi @MaximilianGlas, I noticed there wasn't a solution to your question. This is all possible in Azure DevOps services and will require significant setup/understanding of Azure Pipelines. Firstly, some requirements. You will need: A machine with: An account with Administrative privileges, ArcGIS Pro installation with a Single use license allocated, A Self-hosted Windows agent installed to your DevOps organization or instance. Before installing your Self-hosted Windows agent, you should clone the default CONDA environment of your ArcGIS Pro installation. It will allow us to install any additional packages (like pytest-cov & pytest-azurepipelines. We can call it arcgispro-azure-agent-env. We should also set this as an agent capability by adding it as a Windows Environment variable. System or locally is fine. We will call it ARC_AZ_ENV. Run through the installation guide for Self-hosted Windows agent. Your Azure DevOps organization/instance should now have access to your machine via the Agent under an Agent Pool. Assuming your tests are in the root path of your Azure Repo, we can setup a build pipeline which runs a job with your Agent. The job below will pip install pytest-cov and pytest-azurepipelines, run the pytests from the root and finally, publish the coverage results. jobs:
- job: TestWebTool
pool:
name: MyAgentPool
demands:
- ARC_AZ_ENV
steps:
- checkout: self
- script: |
pip.exe install pytest-cov
pip.exe install pytest-azurepipelines
workingDirectory: "$(ARC_AZ_ENV)\Scripts"
- script: |
"$(ARC_AZ_ENV)\python.exe -m pytest --cov --cov-report xml:converage.xml
workingDirectory: $(Build.SourcesDirectory)
- task: PublishCodeCoverageResults@2
inputs:
summaryFileLocation:$(Build.SourcesDirectory)\coverage.xml Azure Pipelines will automatically pickup your pytest results and publish them. Azure DevOps services have a number of formats and test suites which can be published. You can use the task: PublishTestResults@2. The tests and coverage results will appear in your build result like below. Good luck!
... View more
12-11-2023
05:48 PM
|
0
|
1
|
676
|
POST
|
Hi @MobiusSnake, Junctions are used to model the network granularity and can play a part in the connectivity model. Representing individual connection points/terminals as spatial features is problematic as it becomes more difficult to work with stacked geometry and devalues the network's spatial representation. We can use a junction store/represent the network features instead so that lower level details are not lost. An example of their use may include representing a number of connection points/terminals for your transformer device as a junction object. The transformer should not have n number of point geometries, but simply a relationship to a non-spatial object, a junction, containing its connection/terminal path details. But, at the end of the day, it is just another data model so its really up to the application of the model on whether junction objects are required. Hope this helps!
... View more
09-17-2023
09:41 PM
|
0
|
2
|
556
|
POST
|
Hi @Katie_Clark, The developer interviews I have completed did have some form of skills assessment but it varied from company to company. It depends on what skills the company is looking for. As for GIS specific questions during interviews, you should expect general knowledge questions about GIS - data types, OGC standards, common libraries/modules, technology familiarity. Some companies, more so Tech companies, will have an actual interview environment for you to submit an answer through. These questions may be to test common GIS coding in SQL / Python and technology knowledge e.g. AWS/Azure. I haven't come across an algorithm question before but that may be because the company is not looking for those skills. I hope this helps shed some light into the process. Best of luck in your applications!
... View more
06-12-2023
05:32 PM
|
1
|
1
|
1085
|
POST
|
@JoelBennett, that RequestInterceptor is pretty cool! Like an SOI but for client-side. Thanks for sharing 😃
... View more
06-12-2023
05:15 PM
|
0
|
0
|
540
|
POST
|
Hi @נוהאליה , I had a look a the JS Docs and I don't think there's a clear implementation currently available. However, there may be some solutions to try out. My first suggestion is to attempt to use an Arcade Expression as part of your Unique Value Renderer to retrieve the $feature.extras.PHP_2021 value, e.g: let renderer = {
...
valueExpression: "When($feature.extras.PHP_2021, True)"
...
} The second option is not very enticing. You could try flattening the extras and bringing the extras properties up one level into the properties array. Then, you can apply a renderer by each PHP_* field name. Good luck!
... View more
06-11-2023
10:29 PM
|
1
|
3
|
573
|
POST
|
You can use __getattr__() and __setattr__() built in methods on global/local namespaces to get/set variables by string name on an object or module. See: https://docs.python.org/3.7/library/functions.html#getattr and https://docs.python.org/3.7/library/functions.html#setattr
... View more
06-23-2022
09:40 PM
|
0
|
0
|
1215
|
POST
|
Hi @HanhNguyen2 , You may have be confused between the raster and mosaic dataset types. Raster Datasets refer to image formats supported by ArcGIS Pro (most often in TIF/GeoTIFF). A Mosaic Dataset is an image management object. It allows you to display a dataset from your catalog of raster datasets. I would highly recommend going through each of the Image Management documentation as storing and displaying 2TB of imagery aerial data has its complexities and will require a depth of planning to meet your requirements. I would also read through Imagery Workflows which will guide you through most all of the image management planning and processes. In short, the answer is store it as a raster, and have it added into a mosaic dataset. How you configure mosaic dataset to serve your rasters is up to the requirements of your use and users.
... View more
06-20-2022
08:10 PM
|
2
|
1
|
1180
|
POST
|
Hi @NaomiBegg This tool talks about 'facilities' which made me think it works with polygons Facility is only a term used to reference a point location which can be reached via a network. So, you should consider converting your polygons of interest to points of interest. There are a number of methods to convert a polygon to point, e.g: Using its centroid, A vertice along a polygon edge, The centre vertice along its edge (Polygon -> Polyline -> mid-point of polyline)... etc. The point location would be represent the location where your facility can provide the service (e.g. the entrance to a store, a train station, emergency service exit, etc...) If a method above is not accurate enough, then you should consider adjusting the point of interest before generating the service area.
... View more
06-16-2022
07:34 PM
|
0
|
1
|
456
|
POST
|
Hi @RussellTillis , Without going into any spatial statistics, if you are looking to do basic coverage based on average XY of each raster, you can create polygons from points in ArcGIS Pro by following this Technical Support Article. You can apply a min distance to create minimum bounding geometries, however, note that gross assumptions apply with these methods which may invalidate the 'coverage' (e.g: All your rasters are of equal coverage and equal cell size). Should you require further analysis such as weighting the 'coverage' of each raster, I recommend reading into some of the tools in the Spatial Statistics toolbox. Lastly, I would recommend applying the Mosaic Datasets image management model to your large collection of rasters. It will help manage the your image collection, allow you to query/sort your collection by its metadata which includes extents, coverage and more!
... View more
05-05-2022
06:24 PM
|
0
|
0
|
232
|
POST
|
Hi @Hayley , Have you tried the invert spatial relationship parameter on the Select By Location tool ? The alternative is to use Erase after your Intersect on the original properties with the intersected data which will Erase the intersection from the original properties to create a new set - an inverse feature class
... View more
03-27-2022
11:05 PM
|
2
|
1
|
2105
|
POST
|
Hi @JamalNUMAN , A map cache is different to the shared pool instances cache. The map cache is an organised storage structure of images which optimises retrieval of images (e.g. basemap tiles). See notes here The shared pool instance cache, like any cache, may be storage of the ArcSOC.exe (and related ArcGIS Server processes) so that the service can respond quickly when called. Read this blog which will explain the concept of shared instances. Why not having all types of services consuming from all shared instances (cores)? You can, but for any computing solution, there are always drawbacks which you should aware of them. For shared instances, say you set all your services to use the pool but you have a service that has a demand peak that is significantly larger than all the other services. That demanded service will utilise more from the pool and negatively impact your other services and their ability to response to their requests. In this scenario, the high demand service should have it's own dedicated instances to avoid impacts on the pool. I am making guesses here, but for the case of ESRI Utility and System tools, these are set to dedicated as they may be requested internally by services on your ArcGIS Server machine and/or as part of ArcGIS Pro/ArcMap - a requirement by the software.
... View more
02-07-2022
03:47 PM
|
2
|
0
|
1530
|
POST
|
Hi @JamalNUMAN , The answer is complex and will depend on how you use your services (shared/dedicated and type e.g. FeatureServer, GeoAnalytics etc..), what is existing on your machine (usually just the ArcGIS Server install + enterprise security + networking) and the machine's specification (RAM, CPU, threading etc...). According to the notes here: https://enterprise.arcgis.com/en/server/latest/administer/windows/configure-service-instance-settings.htm , the default shared instances per machine is 2 x the number of cores of the machine determined at installation. The cache size controls how many services are cached by each instance in the shared instance pool. The default (of 50) may not be suitable for your machine and I would say that the installation wizard has set the value of 10. The first time a new installation of ArcGIS Server 10.9.1 hosts a compatible map service that uses the shared instance pool, the site starts running shared instances. By default, the number of shared instances in the pool is set to an appropriate number based on the number of physical CPU cores on each machine. If most or all of your site's services use the shared instance pool, consider setting the number of service instances in the shared pool to twice the number of physical CPU cores on the individual machines in your ArcGIS Server site (for example, if you're using 4-core machines, consider setting the pool size to eight instances). These are only suggestions and starting points. Logs from either via ArcGIS Monitor or 3rd party software will allow you to determine optimum performance and fine-tune your setup. Hope this helps!
... View more
01-27-2022
02:40 PM
|
3
|
0
|
1587
|
POST
|
Hi @CCastro_GIS , You can use Python's Built-in vars() function or the Python Class object's Built-in __dict__ variable. Both return a dictionary/mapping object of all the stored attributes of the object. If your object's variables are hard-coded into the Class object, the values will appear. If they are stored via the arcpy.GetParameter within the class method, I suspect the attribute will not appear as it is encapsulated within the class method. You can probably assign the parameter to the class's self to make it appear after executing the method (ArcGIS Tool). Something like the below should cover both scenarios (printing the stored variable in your Tool and printing the input parameter stored as a variable in your class at method call). class MyToolBox(ToolBox):
def __init__(self):
# Use the ArcGIS ToolBox Template (I can't remember how it goes...)
self.tools = [MyTool]
class MyTool(Tool):
def __init__(self):
self.stored_variable_to_print = 'Hello world'
def paramaters(self):
self.dynamic_parameter = arcpy.Parameter("dynamicParameter" ...)
self.parameters = [self.dynamic_parameter]
def getParameters(self):
# ...
return self.parameters
def executeMyTool(self):
print (self.__dict__)
self._executeMyTool_dynamic = arcpy.GetParameter(0)
# See if self.parameters[0] has changed to the set value,
# and check _executeMyTool_dynamic variable
print (self.__dict__)
return
print (vars(MyTool))
... View more
01-15-2022
04:34 PM
|
1
|
1
|
730
|
POST
|
Hi @CCastro_GIS, You can load a pyt file as a module by using the importlib.machinery.SourceFileLoader() method. SourceFileLoader allows you to create a module-like object from a text file which can then be imported in your script. So it would look something like: # Lets load MyToolBox.pyt from Z:\MyToolBox.pyt
import importlib
import os
pytDir = r"Z:"
pytFile = "MyToolBox.pyt"
pytPath = os.path.join(pytDir, pytFile)
# Create module-like object
pytModule = importlibe.machinery.SourceFileLoad(
"MyToolBox", pytPath
)
# Import the file as a module called MyToolbox (similar to a 'import MyToolbox' statement)
MyToolBox = pytModule.load_module("MyToolBox")
# Access the module and print some of its class/methods
print (MyToolBox)
print (MyToolBox.Validation().check_geometry_poly)
... View more
01-13-2022
08:16 PM
|
1
|
3
|
752
|
Title | Kudos | Posted |
---|---|---|
1 | 06-11-2023 10:29 PM | |
1 | 06-12-2023 05:32 PM | |
2 | 06-20-2022 08:10 PM | |
2 | 04-28-2022 09:59 PM | |
2 | 03-27-2022 11:05 PM |
Online Status |
Offline
|
Date Last Visited |
12-16-2023
06:19 AM
|