|
POST
|
In my organization there is 2-3 people that are creating applications with webappbuilder.They are creating the applications on a server where webappbuilder developper is installed. When they are satisfied, they download the application files and copy it to another server for publishing on the internet. One of my roles in the organization is to develop custom widgets or extend existing with new functions, design, etc... I found it difficult to maintain all the customization in every applications they are creating. I have no problem to build widgets that will be generic enough to works in all application, but when I apply some change to those widgets, I found it painful to go in each applications and replace the code with the new version. Is there a way to force every applications to use the same widget code trunk in the server where webappbuilder developer is installled in order to keep them up-to-date automatically? Any thoughts or suggestions on this? P.S.: I have also some problem for testing, but I think I will open a new discussion on this
... View more
06-13-2019
10:08 AM
|
0
|
3
|
904
|
|
POST
|
I have read all this post. It was very interesting. To summarize: GlobalId: Easy to Use but less performant because of inefficient indexing. There is also a limitation when you need to delete and re-insert a feature. The relationships will be lost. GUID: Same as GlobalId except that you have to create it yourself somehow. However the relationships are not lost when you delete and re-insert a feature. A sequential Id: Efficient index. You need to manage it yourself. Risk of loosing uniqueness especially when created on client side or offline. Am I correct? Is there something to correct or to add? Thank you
... View more
03-07-2019
11:34 AM
|
0
|
0
|
646
|
|
POST
|
Hi, I am wondering why it's possible to add a relationshipClass from the catalog into a map in ArcMap 10.3 only when the cardinality is M-N (many-to-many). When I try to drag and drop other relationshipClass with cardinality (1-1 or 1-M) I have the following error: Could not add the specified data object to the map. Thanks for the info, Maxime
... View more
03-07-2019
07:57 AM
|
0
|
0
|
388
|
|
POST
|
Thank you for your answer. Is it normal that if I add a MapService hosted on an ArcGIS Server into the AGOL webmap viewer (https://www.arcgis.com/home/webmap/viewer.html) I just see the first level of relationships in the table view? Nested relationships are displayed as empty (0).
... View more
02-27-2019
05:44 AM
|
0
|
1
|
2047
|
|
POST
|
We are in 2019, does nested relationships in AGOL webb app is enabled or not?
... View more
02-26-2019
12:28 PM
|
0
|
3
|
2047
|
|
POST
|
We are in 2019, does nested relationships in AGOL webb app is enabled or not?
... View more
02-26-2019
12:26 PM
|
2
|
1
|
1773
|
|
POST
|
Hi, Is it possible to use relationships in popupTemplate with sublayers in MapImageLayer? I am doing the following but the related fields are not displayed. var layer = new MapImageLayer({
"url": "https://infogeo.education.gouv.qc.ca/arcgis/rest/services/SandBox_Maxime/TEST_LOISIRS/MapServer",
"imageFormat": "png",
"title": "Test loisirs",
"sublayers": [
{
id: 0,
popupTemplate: {
title: "Sites",
outFields: ["*"],
content: [
{
type: "fields",
fieldInfos: [
{
fieldName: "id",
visible: true,
label: "Id"
},
{
fieldName: "relationships/0/trajet",
visible: true,
label: "Trajet"
}
]
}
]
}
}
]
}); Does the relationships in popupTemplate only works with FeatureLayer?
... View more
02-26-2019
10:49 AM
|
0
|
0
|
669
|
|
POST
|
Thank you for the info! Just a question, how can I link the MapService with the tile cache generated from this tool?
... View more
11-09-2018
11:36 AM
|
0
|
1
|
1130
|
|
POST
|
I have a MapService published on ArcGIS Server v10.3. I would like to generate the tiles cache for this service. For an unknown reason ArcGIS Server CPUs are getting overloaded to 99%-100% after a few day of processing. When that happen, all the other services published to ArcGIS Server are not responding very well until I kill the tool that generate the tiles. Then, I can restart the tool and continue to generate the tiles for another few days before the CPUs get overloaded again. I would like to know if there is a way to generate the tiles for a MapService from another machine, like a virtual machine with an ArcGIS Desktop license and a writing access to the server drive disk. The generate time is not really important. I would like to prevent the tiles generation process to have a negative impact on all the services.
... View more
11-09-2018
09:49 AM
|
0
|
3
|
1291
|
|
POST
|
Hi Joshua, It's simply a question of performance. For a heavy and complex feature class, the Features to JSON tool will output a JSON file of 152Mo in 1 minute 7 secs while my script above returns a 22Mo JSON string in 31 seconds. I think I can improve that speed if I can find a better serialization library. fastJson or JSON.Net takes 25 seconds to convert the Result object into JSON. I already have implemented this script in arcpy but it takes the double of time than arcobjects. However, In arcpy, I was able to use a C/C++ json library (ujson) and the serialization was very fast like 2-3 seconds. In arcpy, the bottleneck lays in calculating the deltas... Also, it's not implemented in the script above but I already zip the JSON output.
... View more
10-22-2018
06:58 AM
|
0
|
0
|
1208
|
|
POST
|
I am working on a C# tool that is looping over polygons geometries vertices in order to create a list of deltas (distance) between vertices coordinates. The output is a json that will be consumed by a custom application. The output is a JSON containing a list of features objects which contains attributes and geometry deltas arrays like this one: {
"features": [
{
"attributes" : {"CD_MUNCP" : 00000, "NOM_MUNCP": "Name1"},
"geometry" : [[5767767, -834778, -10, 199, 99, 332, 9, -9], [5787767, -837709, 123, 33, -31, 121, 0, 12330]]
},
{
"attributes" : {"CD_MUNCP" : 00001, "NOM_MUNCP": "Name2"},
"geometry" : [[5784576, -831278, -190, 54, 0, -2, 5464, 789], [57354576, -837008, 66, 872, 3445, -879, -2, 22]]
},
]
} The geometry deltas output is expected to be on this format: [[x0, y0, (x0-x1), (y0-y1), (x1-x2), (y1-y2)] Exterior rings and interior rings deltas are on the same level in the array: [[ExteriorRing1 deltas], [InteriorRing1 deltas], [ExteriorRing2 deltas], ...] I am using deltas instead of absolute coordinates to compact the size of the json output. This method has proven to be able to reduce size by more than 50% for huge geometry. I am using IEnumerable<> to create the geometry deltas because I thought it would be faster, but it appears this is not really compatible with JSON serialization (it takes very long to serialize) so I transform them using .ToList(); The most important thing with the code is the performance because it aims to be used in a custom GeoProcessing Service on ArcGIS Server. My tests prove that the bottleneck is the JSON serialization that takes more than 50% of the processing time. For instance for a big FeatureClass it could takes 1.5 seconds to create the deltas but 25 seconds to serialize it to JSON. Is there some optimizations or workarounds I can do to improve the performance? Any suggestions would be appreciated. using System;
using System.Collections.Generic;
using fastJSON;
using ESRI.ArcGIS.ADF;
using ESRI.ArcGIS.Geodatabase;
using ESRI.ArcGIS.Geometry;
using ESRI.ArcGIS.esriSystem;
namespace DesktopConsoleApplication1
{
class Program
{
static void Main(string[] args)
{
var watch = System.Diagnostics.Stopwatch.StartNew();
Result result = new Result
{
features = CreateResultFeatures().ToList()
};
string output = JSON.ToJSON(result);
watch.Stop();
Console.WriteLine(watch.ElapsedMilliseconds);
Console.ReadLine();
}
public class Result
{
public IEnumerable<ResultFeature> features { get; set; }
}
public class ResultFeature
{
public Dictionary<string, dynamic> attributes { get; set; }
public IEnumerable<IEnumerable<int>> geometry { get; set; }
}
public static IEnumerable<ResultFeature> CreateResultFeatures()
{
IWorkspace gdbWorkspace = FileGdbWorkspaceFromPath(@"\\vnageop1\geod\Maxime\test.gdb");
IFeatureWorkspace featureWorkspace = (IFeatureWorkspace)gdbWorkspace;
IFeatureClass featureClass = featureWorkspace.OpenFeatureClass(@"GEO09E04_MUNCP_GEN");
IQueryFilter queryFilter = new QueryFilterClass();
queryFilter.SubFields = "CD_MUNCP, NOM_MUNCP, SHAPE";
int cd_muncp_idx = featureClass.FindField("CD_MUNCP");
int nom_muncp_idx = featureClass.FindField("NOM_MUNCP");
using (ComReleaser comReleaser = new ComReleaser())
{
IFeatureCursor cursor = featureClass.Search(queryFilter, false);
comReleaser.ManageLifetime(cursor);
IFeature feature = null;
while ((feature = cursor.NextFeature()) != null)
{
ResultFeature resultFeature = new ResultFeature
{
attributes = new Dictionary<string,dynamic>
{
{ "CD_MUNCP", Convert.ToString(feature.Value[cd_muncp_idx]) },
{ "NOM_MUNCP", Convert.ToString(feature.Value[nom_muncp_idx]) }
},
geometry = PolygonToDeltas(feature.Shape as IPolygon4).ToList()
};
yield return resultFeature;
}
}
}
public static IEnumerable<IEnumerable<int>> PolygonToDeltas(IPolygon4 polygon)
{
IGeometryBag exteriorRingGeometryBag = polygon.ExteriorRingBag;
IGeometryCollection exteriorRingGeometryCollection = exteriorRingGeometryBag as IGeometryCollection;
for (int i = 0; i < exteriorRingGeometryCollection.GeometryCount; i++)
{
IGeometry exteriorRingGeometry = exteriorRingGeometryCollection.get_Geometry(i);
IPointCollection exteriorRingPointCollection = exteriorRingGeometry as IPointCollection;
yield return CreateDeltas(exteriorRingPointCollection);
IGeometryBag interiorRingGeometryBag = polygon.get_InteriorRingBag(exteriorRingGeometry as IRing);
IGeometryCollection interiorRingGeometryCollection = interiorRingGeometryBag as IGeometryCollection;
for (int k = 0; k < interiorRingGeometryCollection.GeometryCount; k++)
{
IGeometry interiorRingGeometry = interiorRingGeometryCollection.get_Geometry(k);
IPointCollection interiorRingPointCollection = interiorRingGeometry as IPointCollection;
yield return CreateDeltas(interiorRingPointCollection );
}
}
}
private static IEnumerable<int> CreateDeltas(IPointCollection pointCollection)
{
int previous_x = (int)pointCollection.get_Point(0).X;
int previous_y = (int)pointCollection.get_Point(0).Y;
yield return previous_x;
yield return previous_y;
for (int i = 1; i < pointCollection.PointCount; i++)
{
int current_x = (int)pointCollection.get_Point(i).X;
int current_y = (int)pointCollection.get_Point(i).Y;
yield return previous_x - current_x;
yield return previous_y - current_y;
previous_x = current_x;
previous_y = current_y;
}
}
}
}
... View more
10-18-2018
05:24 AM
|
1
|
3
|
1521
|
|
POST
|
I have the following error when I try accessing the Shape of a Feature in a console application when using a QueryFilter with SubFields. I am using ArcObjects SDK v10.3 and Visual Studio Express 2012. The element '{http://schemas.microsoft.com/windows/2005/02/color/WcsCommonProfileTypes}Text' is used but not declared in DTD/schema. The thread '<No Name>' (0x12f8) has exited with code 0 (0x0). The Exception is thrown when I do IGeometry geometry = feature.Shape; in the following code. However if I comment the line where I declare queryFilter.SubFields = "CD_CS_FRA, NOM_OFFCL_CS_FRA"; there is no error. Edit: Using the debugger I can see this: using System;
using System.Collections.Generic;
using System.Text;
using ESRI.ArcGIS.ADF;
using ESRI.ArcGIS.Geodatabase;
using ESRI.ArcGIS.Geometry;
using ESRI.ArcGIS.esriSystem;
namespace DesktopConsoleApplication1
{
class Program
{
private static LicenseInitializer m_AOLicenseInitializer = new DesktopConsoleApplication1.LicenseInitializer();
[STAThread()]
static void Main(string[] args)
{
//ESRI License Initializer generated code.
m_AOLicenseInitializer.InitializeApplication(new esriLicenseProductCode[] { esriLicenseProductCode.esriLicenseProductCodeStandard }, new esriLicenseExtensionCode[] { });
//ESRI License Initializer generated code.
//Do not make any call to ArcObjects after ShutDownApplication()
IWorkspace gdbWorkspace = FileGdbWorkspaceFromPath(@"\\vnageop1\geod\Maxime\test.gdb");
IFeatureWorkspace featureWorkspace = (IFeatureWorkspace)gdbWorkspace;
IFeatureClass featureClass = featureWorkspace.OpenFeatureClass("GEO09E01_CS_FRA_GEN");
IQueryFilter queryFilter = new QueryFilterClass();
queryFilter.SubFields = "CD_CS_FRA, NOM_OFFCL_CS_FRA";
queryFilter.WhereClause = "CD_CS_FRA = '711000'";
using (ComReleaser comReleaser = new ComReleaser())
{
IFeatureCursor cursor = featureClass.Search(queryFilter, false);
comReleaser.ManageLifetime(cursor);
IFeature feature = null;
while ((feature = cursor.NextFeature()) != null)
{
//this line below throw the Exception
IGeometry geometry = feature.Shape;
String cdCs = Convert.ToString(feature.Value[cdCsIdx]);
String nom = Convert.ToString(feature.Value[nomIdx]);
Console.WriteLine("{0} - {1}", cdCs, nom);
}
}
Console.ReadLine();
m_AOLicenseInitializer.ShutdownApplication();
}
public static IWorkspace FileGdbWorkspaceFromPath(String path)
{
Type factoryType = Type.GetTypeFromProgID("esriDataSourcesGDB.FileGDBWorkspaceFactory");
IWorkspaceFactory workspaceFactory = (IWorkspaceFactory)Activator.CreateInstance(factoryType);
return workspaceFactory.OpenFromFile(path, 0);
}
}
}
... View more
10-16-2018
05:48 AM
|
0
|
1
|
2592
|
|
POST
|
Thank you for the link, that helps a lot. I read: Standardized queries are applied to the entire ArcGIS Server site; they cannot be enabled for some services and disabled for others. So if it's turned on on the server, standardized queries are being used for the where_clause in a arcpy.da.SearchCursor in a Geoprocessing Service right? That do not just applied to standardized queries of MapServices right?
... View more
10-03-2018
07:52 AM
|
0
|
0
|
602
|
|
POST
|
Hi, I would like to know if a geoprocessing service that is using arcpy.da.SearchCursor can be subject to blind SQL injection if the where_clause parameter of the SearchCursor is one of the service parameter. Is there a possibility that injecting SQL in the where_clause parameter can affect the integrity of the source table especially by using the SLEEP() command? Thank you
... View more
10-03-2018
06:02 AM
|
0
|
2
|
753
|
|
IDEA
|
Hello Thomas Edghill, The point of my request is the following. To be able to publish a geoprocessing service to ArcGIS Server, you have to run it first in ArcGIS Desktop. The parameter values you defined in ArcGIS Desktop for the service will automatically become the default parameter values published on ArcGIS Server. That behavior is not really logical according to me. You don't necessary want to publish the parameters values that was used for testing the service during the publication process. Sometimes, you don't want default parameter values at all. I hope that will clarify my point. Thank you very much for your interest in this idea. Maxime Demers
... View more
09-24-2018
04:58 AM
|
0
|
1
|
3187
|
| Title | Kudos | Posted |
|---|---|---|
| 2 | 06-03-2024 10:33 AM | |
| 2 | 05-14-2025 10:45 AM | |
| 1 | 04-12-2022 07:00 AM | |
| 1 | 02-26-2025 05:37 AM | |
| 1 | 01-30-2023 11:12 AM |
| Online Status |
Offline
|
| Date Last Visited |
11-14-2025
08:29 AM
|