|
POST
|
Is there a reason you are looking at 9.3 Help even though you are using 10.2? A lot has changed in nearly 7 years.
... View more
02-04-2015
11:12 AM
|
0
|
9
|
4820
|
|
POST
|
You might want to try: field = "COUNTY_CODE"
where_clause = "{} = '{}'".format(field, code[0]) or where_clause = "COUNTY_CODE = '{}'".format(code[0]) You don't need to put your field name in quotes, but the value itself will need to be in quotes if it is text. I strongly encourage you to read up on Python String Formatting. It is much more powerful and Pythonic for building SQL expressions than concatenating strings together.
... View more
02-04-2015
07:06 AM
|
5
|
2
|
3125
|
|
POST
|
Not completely sure this will address your need, although I think it is in the ballpark: Geodatabase Geek - THE “INVERSE” MULTI-VERSION VIEW Although I am not currently implementing it, I did implement it on a project years back. If my memory serves me, it worked well, and I especially liked that it was a SQL view so you can check for all of the edits at any time you want by refreshing the view.
... View more
02-03-2015
11:00 AM
|
1
|
0
|
2386
|
|
POST
|
It is helpful to review the Help for Building a query expression, where it states: If the string contains a single quote you will first need to use another single quote as an escape character. In Python, the backslash is the dominant escape character, but there are some additional escape sequences. ArcGIS wants users to escape a single quote by using another single quote. I see that Xander Bakker beat me to the punch with the actual code. That's what getting distracted while replying gets me. : )
... View more
02-02-2015
09:43 AM
|
1
|
1
|
3309
|
|
POST
|
It is helpful to post specific error messages, if any, as well. Try changing your second to last line to: arcpy.DeleteField_management(delete, ["Pump", "Well", "Tank"])
... View more
02-02-2015
08:34 AM
|
1
|
1
|
1391
|
|
POST
|
The tool won't "see" the SQLite database for the same reason the Project pane doesn't; however, the tool works with them. Don't rely on the tools Browse button, fully specify the path to the table in the SQLite database in the Input Features text box.
... View more
02-02-2015
07:35 AM
|
1
|
3
|
6363
|
|
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
|
6363
|
|
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
|
2609
|
|
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
|
1033
|
|
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
|
6363
|
|
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
|
2475
|
|
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
|
2831
|
|
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
|
1527
|
|
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
|
2311
|
|
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
|
2311
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 06-11-2026 07:04 AM | |
| 1 | 07-17-2026 06:54 AM | |
| 2 | 07-06-2026 12:29 PM | |
| 1 | 07-06-2026 12:00 PM | |
| 2 | 06-05-2026 10:30 AM |
| Online Status |
Offline
|
| Date Last Visited |
Wednesday
|