|
POST
|
Are you trying to load spatial data or just a table? Was the SQLite database created by ArcGIS Desktop or some other application? If the latter, try making a SQLite database from ArcGIS Desktop and putting some data in it, and then see if ArcGIS Pro sees that database, especially if working with spatial data.
... View more
02-02-2015
06:32 AM
|
0
|
5
|
4751
|
|
POST
|
If communicating with Esri feels like screaming in the wind at times, dealing with Apple is like having that conversation in an asylum. I gave up on them a long time ago, which is too bad because they do make some good products.
... View more
02-02-2015
06:29 AM
|
0
|
0
|
1576
|
|
POST
|
It is easier for fellow GeoNet community members to provide feedback if you post relevant, functional parts of your code.
... View more
01-30-2015
03:12 PM
|
0
|
0
|
701
|
|
POST
|
I think Esri would agree, i.e., SQLite isn't currently fully supported in ArcGIS Pro. Although "seeing" SQLite databases isn't possible through the Project pane/window, you can load SQLite databases using the Make Feature Layer tool either through the GUI or ArcPy. At least during beta testing, Spatialite-based spatial data wouldn't load because the correct DLLs weren't packaged with the installer, not sure if that changed. I have successfully loading ST_Geometry and GeoPackage spatial data into ArcGIS Pro.
... View more
01-30-2015
10:07 AM
|
1
|
7
|
4751
|
|
POST
|
You can force indexes through Query Hints (Transact - SQL). That said, forcing an index may not improve performance, sometimes it makes performance worse. Since it seems you are in a development/testing phase and not writing production code yet, it might not hurt to experiment with forcing the different indexes to see what happens. If forcing an index does help, especially dramatically, then the question becomes why isn't the query optimizer choosing to use either index. By the way, I believe it is still true that SQL Server can only use one spatial index in a single query, but that may have changed. If you haven't already, you may want to review SQL Server 2012 - Spatial Indexes Overview. The more you understand how MS has implemented spatial indexes, the less of a black box it will all seem, which makes for better SQL troubleshooting. Also, there are some very specific syntax rules for maximizing a nearest neighbor type of query, which you are trying to do in some form. Beyond reading MS's overview, there are some good blogs and MSDN discussions on tuning SQL Server spatial indexes. Taking a quick glance at your specific code, you are missing some of the requirements for a spatial index to be used. As the overview documentation I linked to above states: Geometry Methods Supported by Spatial Indexes Spatial indexes support the following set-oriented geometry methods under certain conditions: STContains(), STDistance(), STEquals(), STIntersects(), STOverlaps(), STTouches(), and STWithin(). To be supported by a spatial index, these methods must be used within the WHERE or JOIN ON clause of a query, and they must occur within a predicate of the following general form: ....
... View more
01-30-2015
09:30 AM
|
0
|
1
|
1712
|
|
POST
|
That error with findAndReplaceWorkspacePath is common when you are trying to not just replace the workspace path but also the workspace type. Are you switching from a personal geodatabases to a file geodatabases? If you are switching workspace types as well, then you need to use replaceDataSource as Xander Bakker suggests. Also, if you are going to be coming across group layers or layers with lots of different data sources, it is good to use the layer.supports method to check the layer supports a data source property.
... View more
01-30-2015
06:44 AM
|
1
|
1
|
2011
|
|
POST
|
The lack of an ObjectID field, in and of itself, doesn't prevent the user from relating a table. As the Essentials of relating tables states: If you relate to a table that does not have an ObjectID column (such as delimited text files or OLE DB tables), you will not be able to apply selections using the relate. The Related Tables command from the Table window's Table Options menu will list the relate, but it will be unavailable. The Identify tool, however, can still be used to find related records. If you are being prevented from making a relate, it isn't the lack of an ObjectID field that is causing the issue. If you want to have an ObjectID field so there is more functionality with your relates, you don't have to add one to the other table. Several Esri tools work with dynamic ObjectIDs, i.e., they create a dynamic/non-permanent ObjectID field. If you are working with OLE DB connection, Make Query Table (Data Management) should work. Assuming you have a primary key for the table, the default option (USE_KEY_FIELDS) will work. Although Make Query Table and OLE DB connections should work for you, they are both older tools or ways of working with data. Query Layers (not just for spatial data) would be a more current approach to working with the data, and Make Query Layer (Data Management) also supports dynamic ObjectIDs.
... View more
01-28-2015
10:22 AM
|
1
|
1
|
1134
|
|
POST
|
You mention "query table." Are you using Make Query Table or Make Query Layer? Make Query Table is powerful, but it is an older tool, and I am not sure if its outputs are editable. I just did a quick test using Make Query Table where I took a single feature class and used Make Query Table to create a layer, so this is a very simple case without multiple data sets or joins. Although I could use an update cursor on the feature class directly, I could not use it on the layer created from Make Query Table.
... View more
01-28-2015
09:06 AM
|
0
|
0
|
1421
|
|
POST
|
Although using lists for field names is much more common, tuples are supported. I am leaning more towards the query table.
... View more
01-28-2015
08:54 AM
|
1
|
1
|
1421
|
|
POST
|
Although I don't think this is related to the error, it looks like your indentation is off on lines 03 and 04. Not sure if the code itself is that way or just a copy & paste problem into the text box. Can you post the specific error output, all of it? Knowing the line of the error is helpful, but usually additional information is output that is also helpful.
... View more
01-28-2015
08:27 AM
|
0
|
2
|
1421
|
|
POST
|
I agree with Xander Bakker, i.e., you can't remove all of the data frames from an MXD. Even through the GUI, you can remove data frames until you get down to the last one, at which point you are not allowed to remove it. If you want the border of the frame to not be visible, you can go in and change it, just not through ArcPy unfortunately.
... View more
01-28-2015
07:02 AM
|
0
|
0
|
701
|
|
POST
|
Interesting, or oddly, IDLE on my 10.3 machine handles it fine. I am still convinced the extra error message is tied to the console where the original error message is trying to be printed. That said, I can't imagine a bit change in IDLE or Python between 10.2.2 and 10.3. As you point out, you already know how to work around the issue, which is really the most important thing. In terms of Unicode characters, it would be interesting to know why the ArcSDE errors are getting returned with a problematic character on the end.
... View more
01-27-2015
06:28 PM
|
0
|
0
|
2691
|
|
POST
|
The issue you are experiencing is likely due to your console the error messages are being printed to and not Python itself. If I run similar code in the interactive Python windows in ArcMap, it prints fine. If I run the code in PyCharm, it prints fine. If I run the code from a Windows command prompt, it generates a similar error you are seeing. My guess is that the PyScripter console is not coping with the Unicode and hence the extra error is being generated.
... View more
01-27-2015
03:40 PM
|
0
|
2
|
2691
|
|
POST
|
Unlike the MXD version of findandreplace, which ends in paths, plural, the LYR version of findandreplace end in path, singular. I am not sure whether the LYR version recursively searches or not, like the MXD version. If not, you can add some code to loop through all the layers in a layer file: layer_paths = [list of layers with paths]
for layer_path in layer_paths:
layer = arcpy.mapping.Layer(layer_path)
for lyr in arcpy.mapping.ListLayers(lyr):
lyr.findAndReplaceWorkspacePath(...)
layer.saveACopy(...)
... View more
01-27-2015
03:17 PM
|
0
|
4
|
2011
|
|
POST
|
Is something like this what you are after: layers = [list of layers with paths]
for layer_path in layers:
lyr = arcpy.mapping.Layer(layer_path)
lyr.findAndReplaceWorkspacePath(...)
lyr.saveACopy(...)
... View more
01-27-2015
03:07 PM
|
0
|
5
|
2011
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | a week ago | |
| 1 | 3 weeks ago | |
| 1 | a month ago | |
| 1 | 12-02-2025 07:31 AM | |
| 1 | 11-03-2025 08:26 AM |
| Online Status |
Offline
|
| Date Last Visited |
16 hours ago
|