You can use rgdal to access feature classes in Esri file geodatabases.
# The input file geodatabase
fgdb <- "C:/path/to/your/filegeodatabase.gdb"
# List all feature classes in a file geodatabase
subset(ogrDrivers(), grepl("GDB", name))
fc_list <- ogrListLayers(fgdb)
# Read the feature class
fc <- readOGR(dsn=fgdb,...
The easiest way to do this is to add a new integer field to the attribute table of the parcels layer. Then, run field calculator with the following expression:
The !Shape!.pointCount returns the total number of vertices in the feature. However, the first vertex of each part is repeated at the end, in order to close the ...
As already posted in this answer, this now also works very nicely with sf:
fc <- sf::st_read("C:/path/to/your/filegeodatabase.gdb", layer = "some_featureclass")
But writing into a fgdb ist not implemented (yet?), you'd have to have a ArcGIS / ArcMap License as well as the R library arcgisbinding (see https://github.com/R-ArcGIS/r-bridge)
dmahr provided a good solution to count vertices. For a non-programmatic way to label each point with the XY coords, try the following workflow:
Feature Vertices to Points
Add two new fields (type: double) in the new point FC "X", "Y"
Calculate geometry. Right click field > Calculate Geometry... > X
Coordinate of Point (repeat for Y field)
Add another ...
To expand a little on Vince's comment, those two fields are just the numeric area of each polygon (in square meters or whatever units the layer was in) and its perimeter.
Whoever created that CSV may have had access to the geometry (the actual shapes) of the layer, but the CSV doesn't include it and therefore you can't recreate the layer from the CSV. You ...
A "feature class" is an abstract name for source data for mapping. The origin of that data can be shapefile, file geodatabase, enterprise geodatabase, or any number of other sources (feature class factories).
File and enterprise geodatabase sources are tables, with naming constraints that include:
The initial character must be alphabetic
The remaining ...
You can access the feature extent of a feature class by using the Describe function
import arcpy, os
fc = r'C:\path\to\your.gdb\fc'
desc = arcpy.Describe(fc)
xmin = desc.extent.XMin
xmax = desc.extent.XMax
ymin = desc.extent.YMin
ymax = desc.extent.YMax
print "xmin: %s \nxmax: %s \nymin: %s \nymax: %s" % (xmin, xmax, ymin, ymax)
You can change the ...
There are a couple of reasons why you want to reference Feature Layers in ModelBuilder, as opposed to Feature Classes. First it is helpful to understand the differences.
"Feature Classes" as simply references to the raw data, in its entirety. One simple example of this where the FC is a shapefile on disk.
"Feature Layers" are references to an ...
You want to use the Append_Management tool.
If you know the attribute tables will match up (including data type), use schema_type NO_TEST anyway (even though the documentation would suggest TEST).
If the attribute tables do not match up you will have to deal with field mappings, which can be a huge pain in arcpy.
(If you are using NO_TEST and a subtype, ...
Here's code for the solution based on the accepted answer:
#define the input table name
tblIN = "LFA_WYKAZ"
#define new feature class name
fcOUT = "LFA"
projection = "c:\Program Files\ArcGIS\Desktop10.0\Coordinate Systems\Projected Coordinate Systems\National Grids\Europe\ETRS 1989 Poland CS92.prj"
#create empty polygon ...
Instead of looking for the Create Fishnet (or any other) tool in ArcToolbox, I recommend using the Search window to search for and open it.
If you are curious to know which toolset it is located in for the ArcGIS version that you are using then after searching for it you can click on the green link returned.
You might want to try dropping the column "Discard".
I've only just started to figure out the solution to this myself but dropping columns that begin with a capital letter seems to be working for me so far.
EDIT: I realise now that ArcCatalog will not consume quotation marks in a query layer. Seeing as Postgres works with columns in lower case and that ...
You make no mention that you have any problems reading your text file, so I am assuming that it is just how to get the coordinates into a feature class that has you stumped.
There are a number of ways to do this so some suggestions to start looking at are:
NumPyArrayToFeatureClass (arcpy.da) (with ExtendTable (arcpy.da)]2 for the attributes)
Incorporating temporary layers into your models also decreases processing time. From a processing standpoint, it is much more efficient writing to memory compared to writing to disk. Similarly, you can write temporary data to in_memory workspace, which is also more computationally efficient.
Many operations in ArcGIS require temporary layers as inputs. ...
The method for removing a feature depends on the cursor.
If you are using a recycling cursor: pCur = pFeatClass.Search(null,true) do not call delete in any way, shape or form. Calling delete on a recycling cursor removes the buffer so there is nothing to load the next feature into which is why it's getting cranky when you call NextFeature() - you've already ...
To put it really simply, a shapefile is a feature class that is not stored within a geodatabase. So you can use a tool like Conversion > Feature Class To Feature Class (or arcpy.FeatureClassToFeatureClass_conversion) and convert a feature class or layer to a shapefile.
Modifying the sample script from Feature Class to Feature Class Desktop Help slightly, ...
R0B0Donuts answer is not far off getting your job done.
BUT you have to alter that last step from the example (XYeventLayer example.).
You do not want to save the XYeventlayer to an layerfile but you do a FeatureClassToFeatureClass conversion (FC to FC conversion). That actually saves the XYeventLayer to a featurelayer.
Couple things wrong in your loop. First you are calling dataset = datasets.Next(); at top and bottom of the loop. Right there you are skipping some feature classes.
If your feature classes are nested in a Feature Dataset then you have to iterate through it also.
It's a good idea to call IEnumDataset.Reset() before starting the loop to ensure you are at the ...
Assuming your project is setup correctly, with all references added and compiles without errors. Using Visual Studio Express 2013, ArcGIS 10.3 and targeting .Net framework 3.5
Also ensure you add ArcObjects Library References to:
Public Sub New()
On Error GoTo Trap
Dim sPathFGDB As String
Dim sFCName As String
Create a Feature layer and then use Select Layer by location with a polygon of your extent. Example:
arcpy.env.workspace = r'D:\test.gdb'
fc = r'Polygon'
fcselectionpolygon = r'selection'
arcpy.SelectLayerByLocation_management(in_layer='fclyr', overlap_type='INTERSECT', ...
I created three sample random point datasets - 10 features, 100k features, 1m features - and tested the following options
Insert Cursor (arcpy.da.InsertCursor())
Feature Class to Feature Class (arcpy.FeatureClassToFeatureClass_conversion())
Copy Features (arcpy.CopyFeatures_management())
Here are the results:
Copying 10 ...
It is pretty simple actually, you just need to iterate through the features of the geojson structure once you have got it in a dictionary format (like from the json.load() function). I don't work with GeoServer WFS services, but I did find a json example online. The first shows just how to iterate through the json and get an arcpy.Geometry object back.
I believe using Append geoprocessing tool would be the most robust approach to load data into the target feature class.
The tool has field_mapping parameter which you can specify to map your input fields to the output fields. If it is just one time job, you might consider running the tool manually in ArcMap, mapping the input/output fields. You could ...
Initially, I hadn't read the question properly, and answered with a python solution. However, I see now that you can't use python, so I have a different solution for you. It requires that you use the ArcObjects File Geodatabase Writer which I believe is only available if you have ArcGIS installed on the same computer as FME.
The trick is to take advantage ...
The code below combines the other answers and adds a bit to number the vertices.
arcpy.env.workspace = "in_memory"
fc = r"...\polygons"
fc_out = r"...\vertices"
# add fields if needed
for FIELD in ["DRAW_ORDER", "COUNT"]:
if FIELD not in [field.name for field in arcpy.ListFields(fc)]:
The easiest way to do this would be to use the arcpy.ValidateTableName(fc, out_workspace) function, which will automatically convert any invalid characters (like spaces) into valid characters (underscores).
You can do this using the Calculate Value tool to modify the "Name" string variable to replace spaces with underscores. When you are saving the Spatial Join feature class output, you can then use inline variable substitution:
....where 'output_value' is the output name from the Calculate value ...
You can name a feature class whatever you like, as long as you dont use special characters.
Almost, there is also a limitation on using a number as the first character. See this page.
Can you have the feature class name be different than the shape file name? If I just rename the files have I renamed the feature classes?
These are two ...
'Export data' does not retain subtypes...use one of the geoprocessing tools like 'Copy Features' or 'Feature Class To Feature Class' -- if you do this within the same ArcGIS process or 'session' as I like to think of it as (such as the current map doc within which you have interactively selected features), then selected features are honored, subtypes are ...