|
POST
|
Hi Tim, Here is some code to get your started: fc = "Rivers_USA"
list = []
outList = []
# append values to list
rows = arcpy.SearchCursor(fc)
for row in rows:
list.append(row.System)
del row, rows
# create unique list by removing duplicates
for n in list:
if n not in outList:
outList.append(n)
# create layer files
for n in outList:
arcpy.MakeFeatureLayer_management(fc, "River_" + n, "\"SYSTEM\" = " + "'" + n + "'")
arcpy.SaveToLayerFile_management("River_" + n, r"C:\temp\python\River_" + n + ".lyr")
This code creates layer files from a Rivers feature class based on an attribute called 'SYSTEM'. All rivers that are part of the same system will be in one layer file. You can then use the AddLayerToGroup function to add the layer files to a group layer.
... View more
03-16-2012
03:08 AM
|
0
|
0
|
1676
|
|
POST
|
You will need to set the version to query. For example, execute the following first: SELECT sde.sde_set_current_version('VECTOR.Version1'); This will set the version to a versioned named 'Version1'. Then you will be able to query the edits that exist in the version. Here is some more info: http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#/in_PostgreSQL/006z0000001q000000/
... View more
03-15-2012
10:28 AM
|
0
|
0
|
2737
|
|
POST
|
Looks like the problem lies with the fields of type 'timestamp'. I ran a quick test and added a field called 'Date_Modified' of type 'timestamp' to the feature class. I registered the feature class as versioned and then attempted to create the multiversion view. I received a similar error within my log file: Unable to create IMV insert trigger for view airports_mv for table VECTOR.AIRPORTS I then deleted the timestamp field and was able to successfully create the multiversion view. You may want to consider logging a tech support incident regarding this matter to see if there is a workaround.
... View more
03-15-2012
10:16 AM
|
0
|
0
|
2737
|
|
POST
|
Hi Vitor, This problem is most likely users connected to the database that are causing locks. Make sure no users are connected. You can check this by querying the 'sde.sde_process_information' table (SQL Server)/ 'sde.process_information' table (Oracle). Once you verify there are no users connected, try the compress and the delta tables should clear.
... View more
03-15-2012
09:52 AM
|
0
|
0
|
1542
|
|
POST
|
Looks like this may be failing due to a field name. Can you provide a list of one of the feature class' field names and type?
... View more
03-15-2012
09:37 AM
|
0
|
0
|
2737
|
|
POST
|
Did you receive an error when you attempted to delete the 100,000 records? Have you tried using the 'Delete Rows' tool in ArcToolbox? You can make a selection, open this tool and run it on the feature class. It will delete only the selected records.
... View more
03-15-2012
08:58 AM
|
0
|
0
|
1263
|
|
POST
|
Here is an example that may help: fc = "fishnet" rows = arcpy.UpdateCursor(fc) for row in rows: geom = row.shape row.LowerX = geom.extent.XMin row.UpperX = geom.extent.XMax row.LowerY = geom.extent.YMin row.UpperY = geom.extent.YMax rows.updateRow(row) del row, rows
... View more
03-15-2012
08:43 AM
|
0
|
0
|
1803
|
|
POST
|
No problem. Esri has actually made identifying locks much easier at 10.1. This can be accomplished right from the Catalog window. You can simply right-click on the geodatabase and you are presented with an Administration option. Here there is a tab showing which locks exist and which user is placing the lock.
... View more
03-14-2012
07:32 AM
|
0
|
0
|
2114
|
|
POST
|
How are you attempting to connect to the SDE geodatabase, direct connection (i.e. sde:sqlserver:<server>) or 3-tier (i.e. 5151)? What database roles, server roles, and permissions does the user have?
... View more
03-14-2012
06:06 AM
|
0
|
0
|
4675
|
|
POST
|
Can you try creating a 'test' database user and attempt to make a connection. Here is article that will work you through the steps: http://support.esri.com/en/knowledgebase/techarticles/detail/34639 The article is for SQL Server 2005, but it will be the same for 2008.
... View more
03-14-2012
04:52 AM
|
0
|
0
|
4675
|
|
POST
|
Hi Don, There a few tables that you can check to see if there are any locks placed on a feature class. These are: sde.SDE_state_locks sde.SDE_object_locks sde.SDE_layer_locks sde.SDE_table_locks I would first check with the sde.SDE_table_locks table to see if there is a lock there. You can run the following query first: select registration_id from sde.SDE_table_registry where table_name = 'AIRPORTS' Replace 'AIRPORTS' with the feature class name. Take the returned value (i.e. 235) from this query and then execute: select sde_id from sde.SDE_table_locks where registration_id = 235 You can then check the other tables with the value returned (i.e. 5256) from this query to see if there are any additional locks. Ex:
select * from sde.SDE_state_locks where sde_id = 5256
select * from sde.SDE_object_locks where sde_id = 5256
select * from sde.SDE_layer_locks where sde_id = 5256 You can determine the user that is creating the lock(s) by querying the sde.SDE_process_information table. Ex: select * from sde.SDE_process_information where sde_id = 5256
... View more
03-14-2012
03:19 AM
|
0
|
0
|
2114
|
|
POST
|
Try upgrading to the latest service pack (SP4) for ArcGIS Desktop and ArcSDE. http://resources.arcgis.com/content/patches-and-service-packs?fa=viewPatch&PID=66&MetaID=1843 http://resources.arcgis.com/content/patches-and-service-packs?fa=viewPatch&PID=66&MetaID=1841 I ran a quick test and I could not reproduce this with ArcGIS Desktop 10 SP4, and ArcSDE 10 SP4 for SQL Server.
... View more
03-13-2012
08:34 AM
|
0
|
0
|
1584
|
|
POST
|
Make sure that you have the data source selected in the Table of Contents. In ArcMap go to the top of the Table of Contents and select 'List By Source'. Then select the data source and the 'Change Version' tool should become active. [ATTACH=CONFIG]12626[/ATTACH]
... View more
03-13-2012
08:13 AM
|
0
|
1
|
2193
|
|
POST
|
Hi Wendy, I would recommend replicating the feature classes that participate in ArcGIS Server services to a File Geodatabase. You will receive the same, if not faster, performance with a File Geodatabase, and you no longer have a service accessing your production geodatabase. This will eliminate the lock(s) within the geodatabase spawned from the services, allowing you to successfully compress your edits, which will in turn update your spatial views. After edits are made to the feature classes you can simply synchronize the changes from your Oracle geodatabase to the File Geodatabase. This can be accomplished manually, or you could create a model with the Synchronize Changes tool > Export the model to a Python script > use the Windows Task Scheduler to execute the script at any particular interval (hourly, nightly, etc).
... View more
03-08-2012
05:46 AM
|
1
|
0
|
1730
|
|
POST
|
Suppose you have an sde schema database in SQL Server. The sde user owns the repository but no data. Suppose you create a data loader account (SQL account), with create table and create procedure permissions, and load some data. When you connect to your SDE database in ArcCatalog, in order to Create a Replica, the "database user must have write access to the data". Given that requirement, neither the sde user nor the GIS data loader would have that ability as I've outlined above, correct? The GIS data loader will be able to create the replica as long as the data is registered as versioned and has Global IDs. Since the GIS data loader is the owner of the data, it will also have write access.
... View more
03-07-2012
04:30 AM
|
0
|
1
|
920
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | Wednesday | |
| 4 | 05-07-2020 05:14 PM | |
| 1 | 03-25-2026 04:16 AM | |
| 1 | 03-16-2026 01:00 PM | |
| 1 | 12-22-2025 10:39 AM |
| Online Status |
Offline
|
| Date Last Visited |
Thursday
|