Situation:    I work for a company that creates geodatabases for a client that are restricted to a specific boilerplate schema (eg domains, subtypes, etc.).  During a recent draft review, the client complained that when zooming to full extent during an ArcMap session, the full extent was too far "out."  Desired solution:  Alter xy domain of empty feature classes (contained in feature datasets) to extent of interest area as they are imported into production geodatabase (I know that a feature dataset destination will ignore the xy domain environment setting).  Problem:  No geoprocessing tool (eg feature class-to feature class, import to geodatabase, project, define projection, etc.) will accomplish the task (inside or outside feature datasets).  The domain environment setting (advanced geodatabase) is ignored for all actions I've tried.
31244
I have a featureclass in an Esri file geodatabase. When I edit the features using the editor in ArcMap, and I delete most of my features and keeping only the ones in the middle, the zoom to layer command doesn't work as expected. Instead of zooming to the extent of the features remaining in the feature class, the extent will be the former one (containing all deleted features). When reviewing the extent values in the properties dialog for the feature class, I can clearly see the old values. So the edit session doesn't seem to alter the full extent values.  Is there a way to recalculate these values?  I am pretty sure that this problem should occur to everyone editing features in ArcMap...
92026
I'm trying to write a script and as I want to automate it as much as possible.  Is it possible to set the workspace as a variable so that when it is run as a standalone script, or as a tool in ArcToolbox, that it will allow everything else to run?  Below, for example, I want the user to select a workspace and then for the script to pick up the shapefiles from this workspace and also create the new geodatabase there.   # Create file Geodatabase # Import ArcGIS modules import arcpy print arcpy.ProductInfo() # Check out the ArcGIS Spatial Analyst Extension arcpy.CheckOutExtension("spatial") # Need to be able to OverWrite Outputs arcpy.env.overwriteOutput = True # Set workspace arcpy.env.workspace = "C:/Prog_Data" # Set up variables out_folder_path = "C:/Prog_Data" out_name = "Prog.gdb" # Execute CreateFileGDB arcpy.CreateFileGDB_management(out_folder_path, out_name) # Set local variables before importing shapefiles to Geodatabase inFeatures =  ["Points.shp", "Extent.shp", "Rivers.shp", "Population.shp"] outLocation = "Prog.gdb" # Execute shapefile to Geodatabase arcpy.FeatureClassToGeodatabase_conversion(inFeatures, outLocation)
34637
I feel like I've fallen at the first hurdle, importing a DXF file.  By that I mean, I figured out how to enable the dxf import tool, and imported the file I had, but that's about it.  I'm struggling how to manage the workspace and actually view the file I've imported or do anything with it. Maybe I'm doing the import process wrong? Do I import it as a new scene, do I center geometry, etc, etc?  When I selected center geometry I could at least see something, but it looked like my imported file is maybe way to big for the workspace, as all I could see when I zoomed right out, was the first letter or so of some text from the imported file. (see screen shot).    Ok, I went the other way as you pointed out. Used 0.01, which brought a lot more into view, but still very large, so... used 0.001 which brought more into view, but it doesn't look anything like the plans I see in Autodesk?    To give you an idea of what it should be looking like, this is it in autocad. View from each side, floor plan for ground and 1st floor... two view of the entire building plot, one showing topography and a street view elevation.    Two more Blender screen grabs: this is imported at 0.0001. The first image is relatively close up to the workspace grid, and then second is zoomed out. The closer view looks like I'm getting close to the size I need. In the zoomed out view... I've no idea what is forming the large circular patterns as I can't see anything like that in the original drawings???  Would it help my progress if I removed some of the layers from the original file? I obviously don't need things like drains and internal wood framing, water mains, wiring, etc.     As you can see from the last screen grab... I've kinda got the plans into the work area, but I don't know what is affecting the view. What is causing this grey shading across the work area?  There was more of it, in ever increasing circles going out from the center, but I removed some by hiding certain layers, but can't seem to view just the plans without this shading?
122799
I'm writing a GIS client tool in C# to retrieve "features" in a GML-based XML schema (sample below) from a server. Extracts are limited to 100,000 features.  I guestimate that the largest extract.xml might get up around 150 megabytes, so obviously DOM parsers are out I've been trying to decide between  and  generated bindings --OR--  and a hand-crafted object graph.  Or maybe there's a better way which I haven't considered yet? Like XLINQ, or ????  Please can anybody guide me? Especially with regards to the memory efficiency of any given approach. If not I'll have to "prototype" both solutions and profile them side-by-side.   I'm a bit of a raw prawn in .NET. Any guidance would be greatly appreciated.   Thanking you. Keith.    Sample XML - upto 100,000 of them, of upto 234,600 coords per feature.  &lt;feature featId="27168306" fType="vegetation" fTypeId="1129" fClass="vegetation" gType="Polygon" ID="0" cLockNr="51598" metadataId="51599" mdFileId="NRM/TIS/VEGETATION/9543_22_v3" dataScale="25000"&gt;   &lt;MultiGeometry&gt;     &lt;geometryMember&gt;       &lt;Polygon&gt;         &lt;outerBoundaryIs&gt;           &lt;LinearRing&gt;             &lt;coordinates&gt;153.505004,-27.42196 153.505044,-27.422015 153.503992 .... 172 coordinates omitted to save space ... 153.505004,-27.42196&lt;/coordinates&gt;           &lt;/LinearRing&gt;         &lt;/outerBoundaryIs&gt;       &lt;/Polygon&gt;     &lt;/geometryMember&gt;   &lt;/MultiGeometry&gt; &lt;/feature&gt;
86110
I'm trying to write some code to skip over empty raster sets when converting rasters to point (the empty sets stop the conversion, leaving me with a half complete model run).  I know that I can identify empty rasters using the ALLNODATA result from "Get Raster Properties" .  I know I can delete rasters using the Delete.management tool.  I know I should be able to create a branch using calculate value.  But I'm inexperienced with python and modelbuilder, and haven't been able to put this all together. Could someone help me figure out what I am doing wrong? My code and an image of the modelbuilder setup are below.  def fn(Property):  #Import modules      import arcpy  #ifelse statement if Property == "1":             return "true" elif Property == "0":            return "false"
12494
I'm trying to save filled raster object to geo database by my specified filename.  import arcpy from arcpy import env from arcpy.sa import *  env.workspace = r"C:\GIS Data\Cameron_Run\Topo_NED\Projected"  # Set local variables surfaceRaster = "raw_10m_dem"  # Check out the ArcGIS Spatial Analyst extension license arcpy.CheckOutExtension("Spatial")  # Execute FlowDirection fillRaster = Fill(surfaceRaster) arcpy.RasterToGeodatabase_conversion(fillRaster, r"C:\GIS Data\Cameron_Run\Topo_NED \Projected\fillRasterGDB.gdb")   But this code is saving raster file by its own specified name, for this case Fill_raw_10m1 is the default name of saved raster file.  Is there any way so that I can specify the name of saved raster file?
43224
I have a folder and it contains two feature classes, e.g., a.shp and b.shp. The script tool created has two parameters. The first one is the model location, and the second one needs a feature class (a.shp), as shown in the below picture.  What I really want is every time when I set up the model location for the first input, the second input will automatically find the a.shp as the input rather than the user needs to choose a.shp from that folder. I noticed that the dependency is probably what I really need, but there is no code example. Any suggestions?   I am using ArcGIS 10.3.1 Advanced License.
44301
I'm sure there must be a simple reason for this but I can't seem to be able to import a shp file or a feature class from another file or sde geodatabase into a Feature Dataset without getting an error.  The feature classes come in fine if I don't don't try to import them into a Feature Dataset.  The feature dataset definitely has the same projection as the feature classes I'm trying to import so I don't think that's the problem.  The Error I get is ERROR 000210 and just says Failed to convert and cannot create output and Failed to execute (CopyFeatures).    Any ideas what I may be doing wrong here.  Seems like something so simple.  I'm trying to use the Feature Datasets to better organize my data which I think is there purpose.   Update:  So as you can see below, Jason helped me find the answer.   As suggested by Matt below, I added a new Idea to the ArcGIS Ideas site.  Here is the link to that, so please promote this up if you agree a better error message is needed here:
24886
I am having some issues. In ArcGIS, I created a custom toolbar (with the python addin wizard) to do the following: 1. Button to connect to feature class, 2-5. A series of comboboxes to view, edit data in a field in the feature class. I want each of the combo box classes to directly connect to the field. And be able to write new data from the boxes into the fields.  Example: Combobox 1 to connect to field 1. So that when I deploy this a user can edit data without doing this the traditional way. Its a way to have inexperienced users edit data. I am new to python and willing to pay for the time required to help me as I am out of ideas. And ESRI doesn't have a solution either.   import arcpy import pythonaddins from arcpy import env   class ButtonClass1(object):     """Implementation for QuickTableEdit_addin.button (Button)"""     def __init__(self):         self.enabled = True         self.checked = False     def onClick(self):         print("Button1 Clicked")         env.workspace = "C:/data"         arcpy.CreateTable_management("C:/data", "test_table.dbf","template.dbf")         mxd = arcpy.mapping.MapDocument("CURRENT")         df = arcpy.mapping.ListDataFrames(mxd)[0]         dbf_Table = arcpy.mapping.TableView(r"C:\data\test_table.dbf")         arcpy.mapping.AddTableView(df, dbf_Table)         arcpy.RefreshTOC()         pass  class ComboBoxClass2(object):     """Implementation for QuickTableEdit_addin.combobox_1 (ComboBox)"""     def __init__(self):         self.items = [1,2]         self.editable = True         self.enabled = True         self.dropdownWidth = 'WWWWWW'         self.width = 'WWWWWW'     def onSelChange(self, selection):         global cb1         cb1 = self.value         pass     def onEditChange(self, text):         pass     def onFocus(self, focused):         pass     def onEnter(self):         pass     def refresh(self):         pass
31231
I want to determine the coordinates of my current data frame. To do so I wrote this script:  def DataFrame ():    mxd = arcpy.mapping.MapDocument("CURRENT")    df = arcpy.mapping.ListDataFrames(mxd,"Layers")[0]   return mxd,df  def Center (df):    extent = df.extent    xmin = extent.XMin   xmax = extent.XMax   ymin = extent.YMin   ymax = extent.YMax    x = xmax - ((xmax - xmin)/2)   y = ymax - ((ymax - ymin)/2)   return x,y   As long as I am working with a geographic coordinate system, the results will be exactly the longitude and latitude. But as soon as I have a projected coordinate system it will return map units (i.e. meters). How can I avoid that problem? I always need to get lon/lat independend on the maps projection.
78283
I have a polygon shapefile that has a 100MB .dbf, and 500MB .shp file component. The reason it is so large, is that it is  classified as a landbase for a whole district.   Everytime I view the file in ArcCatalog, or ArcMap, and move the view window slightly, the entire file needs to redraw from scratch. I have tried spatial indexing and importing into a geodatabase - neither approach provides any noticable performance improvement with respect to rendering.  Esri's help page suggests that that to improve shapefile performance, the user can . While this would obviously work, I do not want to lose any information. Splitting the file up is not ideal since I am doing a lot of geoprocessing/queries with its entire area. I guess I could avoid viewing the entire area at once - but sometimes, for example, it is good to see what parts of the file a query has selected.  Is there any other approach I could take to improve rendering performance?   (In theory, building shapefile "pyramids" would be ideal - I'm unsure why ArcGIS has never supported such an approach  - at least that I am aware of...)
58092
ArcGIS 10 features the new ability to  to feature classes stored in a geodatabase. One use of this would be to add multiple pictures to a specific location,  seem to be a popular example (important to know if you're a dog on the internet in need of a pit stop I suppose).  In the database the structure of an attachment enabled feature class is trifold:     the feature class itself,  a table holding the attachments and associated metadata (filename, size, etc), and  a relationship class defining the 1-to-many relationship between the two.     My question is: how to export this data -- feature class, attachments, attachment metadata -- for consumption outside of Arcgis?*  Exporting the FC is easy, FeatureClassToFeatureClass works the same as on a non-attachment enabled FC. Exporting the table of attachments? Not so much. TableToTable to output.dbf extracts the attached file metadata only, to output.csv errors out with unsupported field type, and to output info table fails with a general field error.   This isn't all that surprising as those file types don't support a binary blob datatype. I was expecting/hoping to find a tool which would convert the attached binaries into their native format, e.g.    So, how about it? What do I need to do to get the data out?  * ironically my project of the moment which spawned this Q is to export for use within Arcgis, just not Arcgis Desktop...
112822
I am trying to execute clip tool in python on arcGIS 10.  But it gives error:     ERROR 000732: Output Extent: Dataset   D:/Work/Map/SampleGdb/Sample_02.gdb/Sample_02.gdb/Subcatchments does   not exist or is not supported   My code is here:  input1 = r"C:\Users\DELL\AppData\Local\Temp\tempQYJBTS\tempQYJBTS.gdb\IntRaster" clipG1 = r"D:/Work/Map/SampleGdb/Sample_02.gdb/Sample_02.gdb/Subcatchments" outRaster1 = "D:/Temp/ClipTest/clip1" arcpy.Clip_management(input1,"#",outRaster1, clipG1, "#", "ClippingGeometry")   But, I tried the following , and it works fine:  input2 = r"C:\Users\DELL\AppData\Local\Temp\tempQYJBTS\tempQYJBTS.gdb\IntRaster" clipG2 = r"D:/Temp/Sample_G.gdb/Subcatchments" outRaster2 = "D:/Temp/ClipTest/clip2"   what is the problem in my first code sample? Does not Path name contains numeric value? Is it ArcGIS rule?
43989
In the Upslope Area tool from SAGA it used to be possible to import the point file with multiple points and it would create several catchment/basins areas for those points. Now, it is only possible to MANUALLY enter coordinates for only 1 point. However, for a model we're building, we need to perform this analysis 24 times (as we have 24 different points) so we need to automate this process. I tried to use Run as Batch process + calculate by expression and get the XY coordinates from another layer, however, I run into the problem that I need to reference the XY coordinates that are stored in the other layer and looks like there isn't an easy way of doing so. Any suggestions on how to do that? Tried the geomwithin(targetLayer,targetField) from RefFunctions plugin but that produces empty result  so to resume, I have two questions:   How to calculate upslope areas for multiple points? Is there a way to automatize it in the graphical modeler?
13521
Is there any way to add arbitrary code snippets to an ArcGIS model?   I envision something similar to the "show code block" the expression builder in advanced labelling or .  For example my project of the moment could benefit greatly from fetching the username of the person running the tool. I know in python this is a simple import os; os.environ.get('USERNAME'). I think I could write that snippet to get_username.py, add it to a toolbox in Arccatalog, then add that tool to the model and use it as per-requisite model parameter for my current tool. That's a lot of work for such a small thing, and next time I might want something else, like  or a .  I think a code snippet tool or similar could be address all of these needs in a generic, broadly helpful manner.
39855
I'm trying to create a tool in ModelBuilder that will take a new point from a user, create a feature class for this point and display it on a map.  What I've done is:   I've created a feature class for a point-like feature in ArcCatalog. I've prepared a really simple model in ModelBuilder, that starts with a feature set variable (which takes the feature class as a schema and symbology file). The variable is marked as a parameter. Next I'm using the Copy Features tool that takes the variable as input and saves it as a feature class in my scratch workspace. The output feature class is marked as a parameter with the 'add to display' option.   After the module is run I get a shapefile in my scratch workspace. I can add it manually to TOC and it contains the selected point. However no matter what I do, I can't display it in TOC automatically after the model completes.  There is a known issue described in several places that doesn't allow to display newly created layers in TOC when model finishes with the 'add to display' option. However there's a quick workaround, which is to mark the output layer as parameter. In my case it doesn't work.  I'm using ArcGIS for Desktop 10.1 on Windows 7 x86_64.
16834
I am trying to create Thiessen (Voronoi) polygons, based on points within a defined shapefile extent. The output should be inclusive to the feature.  The output I receive now is the rectangular area around the selected points.    Steps I am using: 1. select points of interest (inside and outside spatial extent) 2. set primary display field to FID (aka:ObjectID) 3. Environment… > Set 'Analysis Mask' to shapefile with feature (in this case, a watershed)  Now here is where the problem starts. I have a set of instructions for arc 9.3, but I am now operating on ArcGIS 10 (Spatial Analyst installed &amp; activated). Also, just to clarify, I did scour the inter-webs for some number of hours- Esri support, gis.SE, Professor Google...  ########  9.3.1 version: Spatial Analyst >> Distance >> Allocation - set 'Assign To' as point shapefile of selected data - set cell size  10.0 methods tried: Analysis >> Create Thiessen Polygons -- Many variations of selected features -- File locations, both inside and out of file geodatabase  I am open to any solution, using Arc 10.0 and/or python would be ideal.  The first image is an example.  The output does not need to be exact.  wiki: