|
POST
|
Honestly, I think your earlier code was easier to read and fairly close to working/workable. The error trapping at the end confuses me because the try statement is at the same indentation as the for statement that loops through the cursor, so cursor.next() should always generate an error by the time it gets to that line. Also, I think the break statement is prematurely breaking you out of one of your cursors. Without having access to sample data to walk through the code with, I have to bow out. Best of luck.
... View more
01-07-2015
12:42 PM
|
1
|
1
|
2849
|
|
POST
|
From 4 months ago in the beta forums for ArcGIS Pro: Charlie Macleod (Esri Staff\Beta Testers\Pro SDK Beta Testers): So, with regards to the SDK, there is no Beta SDK release with Pro Beta5 or pre-release, With regards to the API - right, so, unlike with Arcobjects where a separate set of PIAs were required - "the" Arcobject API if you like - as ArcGIS Pro is managed you already ~have~ the API. The API is part of the product. Add any Pro .Net assembly reference into to a .Net project and Intellisense will show you the API. The Core.Data namespace is indeed the fine grained API. It comes with every release - Beta5, pre-release, etc. as does every other Pro .Net assembly and its API. Each team is responsible for their respective API - mapping team for mapping API, editing team for editing API and so on. The SDK for Pro is the IDE extensibility - Visual Studio 2013 initially. It extends Pro via Pro's framework (essentially any of the UI elements you see in Pro are extensibility points). You use the SDK templates to make Addins - same as at 10x. What the Addins can do is provided by the ArcGIS Pro APIs.
... View more
01-07-2015
08:36 AM
|
0
|
0
|
940
|
|
POST
|
I will have to look at the script more later, but a quick response to your #1. What is it about u'LASTNAME' that you see as wrong? Is it all caps and it shouldn't be? Is it the Unicode notation in front of the first quote? If it is the latter, you have nothing to worry about. The 'u' isn't part of the actual string, it is simply informing you that the string has been stored as Unicode. You shouldn't have any issues passing that Unicode string back into a feature class, but on the remote chance there is an issue, you can always convert it to ASCII.
... View more
01-07-2015
07:58 AM
|
1
|
4
|
2849
|
|
POST
|
Several years back, Microsoft made an announcement that it was moving forward with more focus on ODBC and moving away from OLE DB for connecting to SQL Server. Nearly two years ago, Microsoft introduced the new Microsoft ODBC Drivers for SQL Server. Beyond introducing these new drivers, Microsoft announced the beginning of the end for the SQL Server Native Client. What's New in SQL Server Native Client (2012): SQL Server 2012 contains the final version of SQL Server Native Client. SQL Server Native Client will not be updated in future releases of SQL Server. However, as a convenience to developers, SQL Server 2012 Native Client will ship in future releases of SQL Server. Recently, I was looking over the Microsoft SQL Server database requirements for ArcGIS 10.3. Microsoft SQL Server 2012 SP1? Check. Microsoft SQL Server 2014? Check. As expected, the page addresses the software you need to connect to SQL Server. Software required to connect to a DBMS Your client machine (for example, the one running ArcMap) will need to have the appropriate client files installed for the RDBMS you are using. These client files are available from their respective RDBMS vendors, but some are also available on My Esri as a convenience. See Database clients for more information. So far, so good. Looking at the database clients page, something did grab my attention. Specifically, the page lists Microsoft SQL Server native client and Microsoft ODBC driver 11 for SQL Server. Well, maybe the deprecated native client was included for backwards compatibility with older versions of SQL Server since ArcGIS 10.3 does support back to SQL Server 2008 SP3. Unfortunately, that argument didn't hold up because the download page for Microsoft ODBC Driver 11 for SQL Server - Windows states that the ODBC driver is backwards compatible to SQL Server 2005 even older than what ArcGIS 10.3 supports. The situation got even worse when I looked at the Help pages for administering geodatabases. The Connect to SQL Server from ArcGIS page actively instructs users to install a now-deprecated client to connect to SQL Server. Connect from ArcGIS for Desktop To connect to a database or geodatabase in SQL Server from ArcGIS for Desktop, install the SQL Server native client on the ArcGIS for Desktop computer and create a connection file in the Catalog tree. First, though, be sure your SQL Server instance can accept connections from remote computers. The worst part of it all, though, is that the most appropriate driver to use isn't even mentioned once in the whole page talking about connecting to SQL Server. The SQL Server Native Client may very well work for most, if not all, situations involving ArcGIS 10.3, but it seems a better practice to move users over to the more current driver while both drivers still work rather than wait for the next version of SQL Server where connections could stop working. Microsoft has been encouraging users to switch for years, I think it is time for Esri to finally start.
... View more
01-06-2015
02:34 PM
|
8
|
0
|
11714
|
|
POST
|
On line 28, try replacing wells with wells1. The SelectLayerByLocation needs to have the selected feature(s) passed to it and not the original feature class.
... View more
01-06-2015
11:20 AM
|
0
|
1
|
3875
|
|
POST
|
There are a couple or more ways to get this working. One of the quickest to implement, although it might not be the most peformant, is to include a SelectLayerByAttribute_management statement before the select by location: # Create search cursor which will iterate through wells, selecting all centroids within a distance
with arcpy.da.SearchCursor(wells, ["OBJECTID"]) as cursor:
for row in cursor:
# select by attribute
SelectLayerByAttribute_management (wells,
"NEW_SELECTION",
"OBJECTID = {}".format(row[0]))
# select by location
arcpy.SelectLayerByLocation_management("orps09_FL",
"WITHIN_A_DISTANCE",
wells,
"0.5 kilometers",
"NEW_SELECTION") The above assumes that OBJECTID is numeric and not a string.
... View more
01-06-2015
09:17 AM
|
0
|
3
|
3876
|
|
POST
|
Are you sure the script is running at all when called from the command line by your other program? If you try printing 'hello world' from the script, does that even work from the command line?
... View more
01-05-2015
07:36 PM
|
0
|
0
|
3811
|
|
POST
|
Agreed. The words keep coming out of their mouths, but actual progress has been painfully slow. Now they have released 10.3 and formally retired SDE command line tools, all while still missing quite a bit of functionality that used to exist. It is not uncommon to find SDE-related bugs, especially relating to views, where Esri's Support documentation says to use SDE command line tools as the workaround. I think the Development teams are putting the screws to their own Support staff as much as they are customers with this one.
... View more
01-05-2015
07:22 PM
|
3
|
0
|
4356
|
|
POST
|
What build number or update number are you running? Complaints about not being able to rename database connections started surfacing 7 or so months ago in the beta community forums. At the time, a bug was logged: NIM101677 - Provide a way to rename database connections. A few months ago, Esri developers stated that renaming connection files would "be supported in Prelease." It appears either the functionality isn't supported yet or there are still some bugs to work out with it. Either way, I encourage you to open an Esri Support case so they can fix what is wrong or know more customers really want this before final release.
... View more
01-05-2015
07:10 PM
|
2
|
2
|
5051
|
|
POST
|
Kirsten Pinkston, thanks for the additional information. Yes, seeing more full releases in MyEsri does assuage some of my concerns. I remain quite interested to see how well partial updates work.
... View more
01-05-2015
06:15 PM
|
0
|
0
|
2601
|
|
BLOG
|
I understand, both the situation and frustration. For reasons only a shrink could speculate about, it bothers me more than it should when I have to stick with a workaround because something that seems so simple simply isn't. Although addressing this issue has gotten easier with Python 3.x, it still seems more complicated than it needs to be.
... View more
01-05-2015
05:41 PM
|
0
|
0
|
654
|
|
BLOG
|
Using a list of key-value pairs is definitely the way to go. Sorting a list of keys works in this example, but in general, it doesn't ensure the original ordering is maintained like using a list of key-value pairs.
... View more
01-05-2015
03:51 PM
|
0
|
0
|
654
|
|
BLOG
|
Dan Patterson wrote: Sorted dictionaries should be the norm for namespace, but alas, that won't happen.. Sorted or ordered? If you meant ordered, there is some light around the corner with ArcGIS Pro since it uses Python 3.x. With Python 3.x, one can create a metaclass and use the __prepare__() method to replace the normal/default/unordered namespace dictionary with an ordered dictionary. I can't recall at the moment whether I have seen someone implement similar functionality in Python 2.x, but it surely wouldn't be as straightforward as in Python 3.x.
... View more
01-05-2015
03:39 PM
|
0
|
0
|
654
|
|
POST
|
How are you setting the workspace environment? Can you post the functional part of the code that isn't working? Do you have more than 1 Python install on the machine?
... View more
12-22-2014
06:54 AM
|
0
|
6
|
3811
|
|
POST
|
When it comes to discrete raster data, especially color maps, I have always thought ArcMap's rendering engine falls short. Looking at how a section of 470012130.tif renders on my screen between Windows Photo Viewer and ArcMap. Windows Photo Viewer: ArcMap: Granted, Windows Photo Viewer is treating the image as RGB while ArcMap is dealing with the color map, but it just seems the quality difference shouldn't be this pronounced.
... View more
12-21-2014
08:54 AM
|
0
|
0
|
1247
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 06-11-2026 07:04 AM | |
| 1 | a month ago | |
| 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 |
Friday
|