Tag Info

New answers tagged

1

Your logic is correct. This help guide may help you out in the future for using python in the field calculator. There are already valid pythonic answers above I'll post another option, in VB (sometime's it is simplier than python). In field calculator choose "show codeblock" for "Q2" under "Pre-logic script code" write: In VB: if [Q1] = "a" then result ...


0

Can't try this since I am not near Arc* Try conditional expressions... Make field Q2 active use the python parser and try 1 if !Q1! == 0 else 0 If it doesn't work...never mind


3

Since you tagged this with python, you can also accomplish this with an updatecursor. Using field calculator in python for multiline statements is sometimes more difficult than the same function in a cursor. with arcpy.da.UpdateCursor("Mange_Waste", ("Q1", "Q2")) as cursor: for row in cursor: if row[0] == "a": row[1] = 1 else: ...


3

you need to use a block or to write everything in a single line (respecting the indentations) block (with Python parser) def myfunction(a,b): if a == 'a': return 1 else: return 0 then you call the function defined in your block myfunction(!Q1!, !Q2!) note that this is a general solution, but in your specific case you could ...


2

Well, before you convert the database, you could run the Domain to Table geoprocessing tool http://resources.arcgis.com/en/help/main/10.1/index.html#/Domain_To_Table/001700000022000000/ which should convert a domain to a stand-alone table that you could put in the database. Then, you should be able to just convert the database, including stand-alone tables ...


3

Those ArcPy functions utilize the SgShape functions lower in the API stack. The ST_GEOMETRY object was built using some of those same functions, but doesn't expose them all (just the set that implements those required by Spatial Types and Functions implementation, which doesn't include LRS). The LRS primitive list exposed at the ArcSDE API isn't large: ...


1

My eventual solution was to avoid the ArcSDE interface and arcpy and use cx_Oracle, as per answers to a question here. The below class returns privileges on an admin/owner connection for either tables (returning a list of users with access) or users (returning a list of tables they can access). I imagine there are more elegant ways to do this, but with my ...


0

To register a feature service residing on ArcGIS for Server on ArcGIS Online, you need to: Go to My Content > Add Item Set The item is On the web Choose ArcGIS Server Web Service Set the URL feature service REST end point (i.e. http://myserver.net:6080/arcgis/rest/services/MyFeatureService/FeatureServer) At this point the feature is editable by anyone ...


1

After some further research I have confirmed that this is a known bug. Hopefully adding this information here will save someone some time in the future as it was not easy to find using Google or the Esri site. Bug NIM-087927 Submitted: Jan 8, 2013 Status: Open http://support.esri.com/en/bugs/nimbus/TklNMDg3OTI3


1

Yes, that's it I think. They are probably libraries we aren't able to distribute, or we don't want to because they could interfere with your existing setup. This is another good resource page for setting up the connection. I'm thinking that if you have ArcGIS installed already then it's most the environment variables that need setting.


3

import arcpy, os, pyodbc def GetPrivileges(table): cnxn = pyodbc.connect('DRIVER={SQL Server};SERVER=servername;DATABASE=dbname;UID=user;PWD=password') cursor = cnxn.cursor() cursor.execute("EXEC sp_helprotect '" + table + "'") rows =cursor.fetchall() privileges = [] for row in rows: privileges.append(row.Grantee) return ...


0

Absolutely. I'd suggest skipping ModelBuilder and go for an ArcPy based solution. You would need to iterate through the table with county codes and states and for each code/state (depending on your business logic) select and export shapefiles. Take a look at search cursors. Select Layer By Attribute or Make Feature Layer will help you when setting the SQL ...


5

The "multiversion" name is somewhat misleading. Every versioned feature class has three tables in the database: The business/base table (this is the table that you could query directly) The additions table (something like A100) The deletes table (something like D100) Any changes in the current version will be in the 'A' table and deletions in the 'D' ...


1

As described in the documentation, Multiversioned views incorporate database views, stored procedures, triggers, and functions to access a specified version of data in a geodatabase table using Structured Query Language (SQL). Not everyone has a need to use them. When you encounter a situation that can only be resolved by accessing versioned data ...


1

You can also backdoor it with a SQL script. The license string is stored in the SDE_SERVER_CONFIG table (SQL Server) or SERVER_CONFIG (Oracle) take a look in one of your existing licensed geodatabases using your SQL tool for the "AUTH_KEY" property and write an update statement that updates this record in the SERVER_CONFIG table in your other geodatabases. ...


0

Potentials issues I can think of... You didn't setup the data store on AGS and a copy of the database was created to support the map service (as stated by Alex Tereshenkov) You are editing the wrong version of geodatabase (unlikely but you never know) You didn't clear the ArcGIS Services Directory cache (see this blog post for details)


0

Try to check the environments, namely processing extent of your project. Maybe while drawing a new feature, parts of it are founded out of extent bounds.


0

The issues is with the OS itself and the way that files work with ArcGIS. You are running two applications. Two applications can have trouble reading the same file. The interface to edit the file and the web application itself. Since the web application can still function the file while editing either SDE is likely caching the results until you close ...


3

There is no post installation available on the latest versions of ArcSDE (since 10.1). You are suppposed to use ArcGIS Desktop GP tools for creating and managing ArcSDE enterprise geodatabase stored in an RDBMS. Please refer to this blog post for detailed instructions. If you don't want to direct connect, that is you want to use application server ...


1

It seems you didn't define your FieldMappings. Since you are using the Append with "NO_TEST" option, you need to dictate which fields go where. You can do it programmaticaly like the provided examples in the link. A shortcut might be to define the field mapping for the Append tool in ModelBuilder and export the model to python script (i.e. Model > Export ...


1

Since the two table schemas are different, you cannot use the Append tool. I would suggest to use the arcpy.da cursors. The general code flow would go something like this: Do a search cursor against the source layer, setup conditional logic or use a where clause to isolate the features/field attributes you would like to pull out of (e.g. geometry x/y ...


5

As John has stated you probably have a lock on your database from the map service. If your feature class is not versioned and the features you are working with are not complex (i.e. they do not participate in a relationship class or a topology), you can do the following safely without interrupting your ArcSDE users: Use ISchemaLock to get an exclusive lock ...



Top 50 recent answers are included