POST
|
I see if you download the code for Sketch Tool Demo (arcgis-pro-sdk-community-samples/Editing/SketchToolDemo at master · Esri/arcgis-pro-sdk-community-samples · GitHub ) they take some additional steps to make sure geometry is in the correct projection. while (rowCursor.MoveNext())
{
var feature = rowCursor.Current as Feature;
var geomTest = feature.GetShape();
if (geomTest != null)
{
// make sure we have the same projection for geomProjected and geomTest
var geomProjected = GeometryEngine.Instance.Project(geometry, geomTest.SpatialReference);
//we are looking for polygons that are completely intersected by cut line
if (GeometryEngine.Instance.Relate(geomProjected, geomTest, "TT*F*****"))
{
//add the current feature to the overall list of features to cut
cutOIDs.Add(rowCursor.Current.GetObjectID());
// adjust the attribute before the cut
if (descriptionIndex != -1)
cutOperation.Modify(rowCursor.Current, descriptionIndex, "ProSample");
}
}
}
... View more
10-12-2017
10:19 AM
|
0
|
0
|
308
|
POST
|
I'm new to Visual Studio, C#, and the Pro SDK. I'm trying to go through the guides to learn but I am having trouble with the ProGuide Editing tool (ProGuide Editing tool · Esri/arcgis-pro-sdk Wiki · GitHub ). I am getting this error: Visual Studio seems to indicate the cut line is in State Plane, as is the polygon layer I am trying to cut. Am I missing something? I did deviate from the guide a little bit here because I couldn't get Search to work with two parameters (geometry and SpatialRelationship.Crosses):
... View more
10-12-2017
09:18 AM
|
0
|
1
|
362
|
POST
|
In the Quick Report template, in the RefineLocationPage.qml, I am wondering if there is a way to prevent the user from being able to refine the location (aka move the point from the current location). This would be to prevent users from filing a report in a location that they are not physically located at.
... View more
09-27-2017
10:38 AM
|
0
|
2
|
429
|
POST
|
AppStudio Desktop Standard License. Quick Report app. Is there a way to prevent the user from being able to refine the map location?
... View more
09-27-2017
07:43 AM
|
0
|
4
|
628
|
POST
|
You could do this with a cursor instead of field calculator: # Define search cursor
urows = arcpy.da.UpdateCursor(inPointFeatures, "YEAR")
# Loop through each row in cursor
for urow in urows:
# If the value for YEAR is greater than or equal to 1998 yr is 1997
if urow[0] >= 1998:
yr = 1997
# If not yr is -9999
else:
yr = -9999
# Update the YEAR attribute for this row
urow[0] = yr
urows.updateRow(urow)
# yr variable is available outside for loop
print yr UpdateCursor—Help | ArcGIS for Desktop
... View more
09-08-2017
09:33 AM
|
0
|
0
|
898
|
POST
|
Thank you Nakul! I got it working, here is my code in case it helps others. Any suggestions for code cleanup are welcome. I put my ServiceFeatureTable and QueryParameter objects right outside of the map view. //Feature service for spatial query
ServiceFeatureTable {
id: countyBoundary
url: "https://hangis.hanoverva.gov/arcgis/rest/services/county_boundary/MapServer/0"
onQueryFeaturesStatusChanged: {
if (queryFeaturesStatus === Enums.TaskStatusCompleted) {
if (!queryFeaturesResult.iterator.hasNext) {
errorMsgDialog.visible = true;
return;
}
//Create array for features
var features = []
// get the features
while (queryFeaturesResult.iterator.hasNext) {
features.push(queryFeaturesResult.iterator.next());
}
//Since there is only one feature get the feature at the first index & retrieve geometry property
var countyGeometry = features[0].geometry
console.log("countyGeometry", countyGeometry)
//Get the current map point
var newPoint = mapView.currentViewpointCenter.center
console.log("newPoint", newPoint)
//Check to see if currrent point is within county boundary
var withinCounty = GeometryEngine.within(newPoint, countyGeometry)
console.log("withinCounty", withinCounty)
//If the point is within the county boundary, run nextPage function
if(withinCounty === true) {
nextPage();
}
//If not show alert box and do not continue to next page
else {
invalidGeometryAlertBox.text = qsTr("Invalid entry.");
invalidGeometryAlertBox.informativeText = qsTr("User must be within county boundary.")+"\n";
invalidGeometryAlertBox.visible = true;
}
}
}
}
//Parameters for query
QueryParameters {
id: queryParameters
//Query the first feature in the feature service
whereClause: "1=1"
//Whether feature geometries are returned in the result
returnGeometry: true
} Then I edited the Next button, so it runs the query instead of going straight to the next page: onClicked: {
if(app.captureType=="point") {
//Run query to do geometry check
countyBoundary.queryFeatures(queryParameters);
} else {
invalidGeometryAlertBox.text = qsTr("Invalid geometry. Continue?");
invalidGeometryAlertBox.informativeText = qsTr("You can always save as draft and edit later.")+"\n";
invalidGeometryAlertBox.visible = true;
}
}
... View more
08-16-2017
10:02 AM
|
2
|
0
|
571
|
POST
|
I'm trying to limit the Quick Report app so that points can only be collected if they are within a certain geographic area. I have defined my limiting polygon within the mapView: ServiceFeatureTable {
id: countyBoundary
url: "https://hangis.hanoverva.gov/arcgis/rest/services/county_boundary/MapServer"
} I added a geometry check within the nextPage function so it will not allow the user to proceed if the point is not within the polygon: function nextPage(){
positionSource.active = false;
app.theNewPoint = mapView.currentViewpointCenter.center;
var withinCounty = GeometryEngine.within(app.theNewPoint, countyBoundary)
console.log("withinCounty", withinCounty)
if(withinCounty === true) {
next("");
}
else {
invalidGeometryAlertBox.text = qsTr("Invalid geometry. Point not within Hanover County.")
invalidGeometryAlertBox.visible = true;
}
} The problem is I keep getting false for withinCounty, even when the point is within the county boundary.
... View more
08-14-2017
03:00 PM
|
1
|
2
|
932
|
POST
|
These links may help you: Download and Install OpenSSL - (I used Win64 OpenSSL v1.1.0e Light): https://slproweb.com/products/Win32OpenSSL.html Follow these directions: https://www.joshmorony.com/how-to-create-an-ios-provisioning-profile-and-p12-with-windows/
... View more
08-11-2017
06:43 AM
|
1
|
0
|
684
|
POST
|
In AddPhotoPage.qml "Add upto %1 photos."
Should be: "Add up to %1 photos."
... View more
08-01-2017
01:20 PM
|
0
|
1
|
425
|
POST
|
Is there an equivalent for this box in ArcGIS Pro 2.0? So the name in the legend can be different than the layer name in the Contents Pane?
... View more
07-13-2017
11:44 AM
|
1
|
1
|
1601
|
POST
|
So you can restrict access to services that it uses? I am using the Quick Report template.
... View more
06-23-2017
06:08 AM
|
0
|
0
|
496
|
POST
|
Apparently there are ways to get around using a Mac for every step except publishing to the Apple Store. They seemed complicated though, so I saved myself a headache and rented a virtual Mac from http://www.macincloud.com/ . It's $30 for 30 hours and that's plenty of time to do everything you need to do. In addition to the ESRI docs and video, I found this link useful: https://support.magplus.com/hc/en-us/articles/203808748-iOS-Creating-a-Distribution-Certificate-and-p12-File
... View more
06-23-2017
05:46 AM
|
0
|
0
|
405
|
POST
|
My app was turned down in the iTunes store because UIFileSharingEnabled is set to true. I see you can turn it off here: But what is the 'External Storage' setting for? Is it necessary to save draft reports in the Quick Report app? Here is the full error message from iTunes connect: Your app has the UIFileSharingEnabled key set to true in the Info.plist, but the Documents folder includes files and folders not intended for file sharing. If your app does not require the file sharing feature, please set the UIFileSharingEnabled key in the Info.plist to false.
... View more
06-22-2017
08:50 AM
|
0
|
3
|
1841
|
POST
|
There is a 60 min training seminar "Extend ArcGIS Pro Functionality with Add-Ins" and a 3 day instructor led class "Extending ArcGIS Pro with Add-Ins". https://www.esri.com/training/catalog/57630431851d31e02a43ee57/extend-arcgis-pro-functionality-with-add-ins/ https://www.esri.com/training/catalog/5875286780ac1ffc066b76e3/extending-arcgis-pro-with-add-ins/
... View more
06-15-2017
10:03 AM
|
0
|
0
|
1989
|
Title | Kudos | Posted |
---|---|---|
1 | 07-13-2017 11:44 AM | |
4 | 07-28-2020 08:01 AM | |
4 | 09-20-2018 11:55 AM | |
2 | 09-21-2018 12:19 PM | |
2 | 08-16-2017 10:02 AM |