|
POST
|
I notice that error that are thrown in the mapView constructor callback are not displayed in the browser console. For instance: var view = new MapView({
"container": "viewDiv",
"map": map,
"zoom": 7
}).when(function(view) {
throw new Error("This error is not displayed in the browser console");
alert("This alert is not executed");
}, function(error) {
console.error(error);
}); This is really difficult to know where the code is breaking. Is there a solution for this?
... View more
01-26-2018
06:04 AM
|
1
|
2
|
1287
|
|
POST
|
I suppose there is no other solution? I dont want to save anything to the disk as it's a part of a Geoprocessing Service that output some json string only.
... View more
12-07-2017
07:00 AM
|
0
|
1
|
1077
|
|
POST
|
I would like to add a join on a layer while keeping the original fields names, so I thought setting the qualifiedFieldNames environment parameter to False would do the job, as the documentation says, but it has no effect. import arcpy, os
arcpy.env.qualifiedFieldNames = False
input_fc = os.path.join("C:\\", "temp", "GEODEV.sde", "dataset", "my_feature_class")
join_table = arcpy.TableToTable_conversion(os.path.join("C:\\", "temp", "to_join.csv"), "in_memory", "join_table")
layer = arcpy.MakeFeatureLayer_management(input_fc, "in_memory\\layer")
arcpy.AddJoin_management(layer, "MY_IN_FIELD", join_table, "MY_JOIN_FIELD")
print([f.name for f in arcpy.ListFields(layer)])
>>>'["GEODEV.dataset.field1", "GEODEV.dataset.field2", "GEODEV.dataset.field3", "join_table.fieldA", "join_table.fieldB", "join_table.fieldC"]' What am I doing wrong? Thank you for your help!
... View more
12-07-2017
06:16 AM
|
0
|
3
|
1319
|
|
POST
|
Good advice, but I prefer to avoid shapefiles, JSON is a better format for sharing data between systems, especially over the net because it's a one file format and can be manipulated by almost every programming language directly.
... View more
11-10-2017
08:05 AM
|
1
|
0
|
1958
|
|
POST
|
It appears there is not that limitation when using arcpy.TableToTable_conversion() instead of arcpy.ExcelToTable() but .xlsx is not supported. You will have to use .xls or other formats. arcpy.TableToTable_conversion("c:\\temp\\input.xls", "in_memory", "table")
... View more
11-07-2017
12:03 PM
|
1
|
3
|
1958
|
|
POST
|
I found out there is a limitation of 10 characters for field names if you output arcpy.ExcelToTable() to a "in_memory" table. Why? Is it because dbf format is used? I dont have this limitation when I use "in_memory" with other tools such arcpy.CopyFeatures_management(). arcpy.ExcelToTable_conversion("C:\\temp\\input.xlsx", "in_memory\table") Is there a way to use get rid of this limitation with arcpy.ExcelToTable() and "in_memory"?
... View more
11-07-2017
10:30 AM
|
0
|
5
|
2320
|
|
POST
|
Yes, it was a known problem of FME 2016 with PYTHONPATH environment variable and arcpy. The workaround is the following: # Fix pythonpath import sys sys.path.append(sys.path.pop(0)) sys.path.append(sys.path.pop(0)) # Business as usual from here import arcpy arcpy.env.workspace = r"\\cnatrtd8\geo\GEODEV011.sde" print arcpy.Exists(r"GEO09_WEB_MERCATOR\GEO09E03_CS_STA") Note that the issue is resolved in FME 2017
... View more
09-01-2017
12:10 PM
|
1
|
0
|
3895
|
|
POST
|
Thank you Thomas for your feedback. I am surprise that labels management is not more developped in the API. Furthermore, in the javascript API v 4.x, labeling is not yet possible at all in 2D for features layers. I dont understand why users are not requesting this. Is it because people are only using map services?
... View more
08-24-2017
10:20 AM
|
0
|
1
|
1391
|
|
POST
|
Is it possible to use dynamic label placement with a feature layer in the javascript API v3.21 ? For instance, if two point features are superposed, I would like to display their labels at different placement. The LabelClass documentation does not specify this possibility. Is there any solution to achieve this? Otherwise, is it possible to set a priority to features for labeling. In case two points features are superposed, is it possible to define which feature's label will be displayer on the map? Thanks Maxime
... View more
08-21-2017
07:06 AM
|
1
|
3
|
2353
|
|
POST
|
Thank you Joshua for testing this issue and for the workaround! The error message makes me think it's not an intentional design...
... View more
07-18-2017
07:12 AM
|
0
|
0
|
2718
|
|
POST
|
Why the arcpy.da.SearchCursor with where_clause="SHAPE IS NOT NULL" returns RuntimeError: An invalid SQL statement was used when the feature class is stored in_memory? For instance this works: source = "\\\\cnatrtd8\\geo\\ArcGIS Server\\Connections\\GEODEV011.sde\\GEO09_WEB_MERCATOR\\GEO09E04_MUNCP_GEN"
with arcpy.da.SearchCursor(query_layer, ["*"], where_clause="SHAPE IS NOT NULL") as cursor:
for row in cursor:
print row[0] while this returns a RuntimeError: An invalid SQL statement was used source = "\\\\disk1\\myDB.sde\\myDataSet\\myFeatureClass"
copy = arcpy.CopyFeatures_management(source, "in_memory\\copy")
with arcpy.da.SearchCursor(copy, ["*"], where_clause="SHAPE IS NOT NULL") as cursor:
for row in cursor:
print row[0] Any idea what is going wrong? Is there a workaround? Thank you!
... View more
07-17-2017
12:32 PM
|
0
|
2
|
3923
|
|
POST
|
Something very weird happen when I use a SearchCursor over a feature class in an Oracle Enterprise Geodatabase The order of the features in the SeachCursors changes depending of the field_names parameter that is used. For instance: source = "\\\\cnatrtd8\\geo\\ArcGIS Server\\Connections\\GEODEV011.sde\\GEO09E01_CS_FRA_GEN"
with arcpy.da.SearchCursor(source, ["OBJECTID"]) as cursor:
ids = [row[0] for row in cursor]
print(ids)
with arcpy.da.SearchCursor(source, ["OBJECTID", "CD_CS_FRA"]) as cursor:
ids = [row[0] for row in cursor]
print(ids)
>>>
[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60]
[39, 40, 41, 42, 43, 44, 45, 46, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 47, 48, 49, 50, 51, 52, 53, 55, 56, 54, 57, 58, 59, 60]
>>> This happen with many different features class, but only in the Enterprise Geodabase. The same features class in a File geodatabase dont do this. What could be the cause of that?
... View more
07-14-2017
10:33 AM
|
0
|
1
|
926
|
|
POST
|
I can confirm the Authentication Type is: Database authentication, and the credentials are saved inside the .sde. I doubt that this is the cause of the problem...
... View more
07-04-2017
07:44 AM
|
0
|
1
|
3895
|
|
POST
|
I have look in the Database Connection properties of the .sde connection file and I can confirm the Authentication Type is: Database authentication, and the username and password are saved inside
... View more
07-04-2017
07:10 AM
|
0
|
0
|
3895
|
|
POST
|
Hi! How can I know if the DB use user authentication or Operating System authentication? I have forgot to mention that FME is not running on a server, but on the same desktop than the python shell, and both are using the same python interpretor (I have double check using sys.version to be sure its the same python interpretor).
... View more
07-04-2017
07:00 AM
|
0
|
4
|
3895
|
| 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
|