Here are a couple of items to explore to determine why ArcGIS is not registering your PostGIS tables as feature classes:
ArcGIS will refuse to acknowledge tables that have mixed geometry types. To clarify, "POLYGON" and "MULTIPOLYGON" types can be mixed within the same column, but POLYGON and POINT cannot. In your case, coming from a shapefile, this is not ...
It's not particularly obvious but it can be done per data frame:
Open your data frame properties;
Click the coordinate system tab;
Click the dropdown next to the coordinate system (globe) button;
In the field calculator, your parser should be set to Python. With "Show Codeblock" checked, your function definition should go in the "Pre-Logic Script Code" and the expression box at the bottom should be populated with:
Your code block should end with the return function as well.
The "Calculate Ranges" example on the ArcGIS help page ...
If you only have access to ArcGIS Desktop or Engine, you need to install the Background Geoprocessing for 64bit, check Python scripting with 64-bit processing at the ArcGIS Blog. If you have ArcGIS Server, the 64bit Python will be automatically installed.
A Help page on that:
What is 64-bit Background Geoprocessing?
You are almost there. What you are trying to do is:
if field_value == 'S1100':
if field_value == 'S1200':
You have to evaluate the value of MTFCC field and then make decision based on that.
Imho a more elegant solution is to use a Python ...
Create midpoints, using one of multiple possible techniques.
Buffer them by small number, e.g. 0.5 m
Clip originals by buffer, output - SHAPEFILE
Use this field calculator expression on field Shape:
Based on @Felix's answer, here's an approach that uses built-in methods on geometry objects. Supported on 10.3+.
from math import atan2, pi
e = 1e-10
def tangentLine(line, dist):
'''creates a tangent line of length dist at line midpoint
line - arcpy.Polyline() object
dist - distance in meters
midpoint = line....
Click on Customize > Customize Mode
When the window opens, just drag the Customize menu option from your toolbar.
Now the Customize option will be gone from your menubar.
To get it back you will need to open Customize Mode again, this time from a right-click on a toolbar > Customize (since you've removed the Customize menu). On the toolbars tab scroll ...
Because the properties of a 'Describe' object are not a fixed list as they are for the other object types in your autocomplete examples. The list of properties depends on the type of object passed to arcpy.Describe(). As the Esri documentation puts it:
The Describe function returns a Describe object, with multiple
properties, such as data type, fields,...
Unfortunately, the Portal for ArcGIS is not available directly to ArcGIS Server 10.1 users. You are supposed to obtain the software/license via your local Esri distributor. In 10.2, however, the Portal for ArcGIS media is included with ArcGIS Server. This means you are able to install the software on your own (i.e., download via Customer Care portal). The ...
An m-aware polyline has the ability to store m-values (in addition to x and y values). M-values are 'measurement' values - distance along a given line. They are used in linear referencing datasets.
Read more on the concept of linear referencing: http://desktop.arcgis.com/en/arcmap/10.3/guide-books/linear-referencing/linear-referencing-datasets-in-arcgis....
You can do this for many fields with some Python. This is a stand alone example, but it'd be easy to write this into a script/Python toolbox. Or you could embed this into another loop and do this on a list of feature classes/tables.
Keep in mind this approach will make the changes to all short/long integer fields:
features = 'SomeGDB.gdb/...
Tkinter is not compatible with any version of Arcmap desktop. As a script you are running pure python, and not using the ArcMap desktop application at all, which is why you are seeing different behavior. Esri has determined that tkinter and Arcmap desktop conflict in their messaging designs and they will not resolve the conflict, so tkinter is not supported ...
You can set the placement properties which should take care of this. Go into your layer properties and click on the Labels tab across the top. Click on Placement Properties... and then check the Only place label inside polygon box as shown below.
There is a bug discovered in ArcGIS 10.3, so it probably applies to newer versions since it hasn't been solved:
Bug BUG-000084520 - Field values in a shapefile attribute table are corrupted when viewed in ArcGIS 10.3.
It shouldn't occur in older versions, but I can't test this to confirm, and it's probably not a convenient option for you neither.
A DataFrame object has an extent property, the extent property/object can be used in the basic spatial relationship methods of contains, within, equals, overlaps, touches and disjoint as well as distanceTo, see here for more details on those methods.
With that in mind you can loop over the layers you retrieve from calling arcpy.mapping.ListLayers(mxd,"", df)...
As a quick and dirty method, you could compare extents, as already answered. However (also mentioned), that doesn't necessarily indicate whether a feature is visible in the current view (e.g. if you zoom in far enough within a feature class' extent, at some point you will not see any features).
There's a definite performance hit if you need to find visible ...
Esri provides a guide on how to choose CELLSIZE, Assessing lidar coverage and sample density
For sampling, choose CELLSIZE. You might think the average point spacing is a good cell size for the output raster, but this typically results in too many empty, or NoData, cells because lidar points are not evenly spaced. Also, the output raster could end up ...
Data is not stored in the MXD, so if you move only the MXD the data will not be moved as well.
If the data is moving with the MXD, then under File > Map Document Properties check off "Store relative pathnames to data source".
If the data is not moving with the MXD then make sure the path where the data is stored is accessible on the new machine.
For Post Request
You send it over inside a form in the body with the key token and the value is the token you received from this document explaining how to get token
For Get Request
You can send them over via a query parameter attached to the url
You are listing field objects with ListFields, not the field names which should be input to DeleteField. So change:
[field for field in fields if field != "FID" or field != "Shape"]
[field.name for field in fields if field.name not in ("FID","Shape")]
But it is probably better to use the required property since object id and shape fields can have ...
The download for the 64 bit geoprocessing installation is not freely available. I found it in my.esri.com under My Organizations -> Downloads -> ArcGIS for Desktop 10.4 -> ArcGIS for Desktop Background Geoprocessing (64-bit).
I tried this code and it worked.
arcpy.env.workspace = r'C:\GIS\MyRasterFolder' #My directory of rasters
rastList = arcpy.ListRasters()
myNewRast = arcpy.CompositeBands_management(rastList, r'C:\GIS\rasterCombined.tif')
(If this doesn't work for you, if you could post the code you're trying to run and the error message you're receiving, that ...
Assuming r"E:\depthtester2.npy" is a saved array, use numpy.load to avoid the ValueError, and as noted in the comments, you need to pass a point object to NumPyArrayToRaster or you'll get a TypeError.
myarray = numpy.load(r"E:\depthtester2.npy")
myRaster = arcpy.NumPyArrayToRaster(myarray,arcpy.Point(0.0,0.0),1.0, 1.0, -99999.0 )
Script below designed to run from mxd. It assumes that you have empty a table (“nearLines”) to populate in mxd:
Where pointID and lineID are fields to store OIDs of input layers (type long), Distance field type double.
# parameters to re-type
mxd = arcpy.mapping.MapDocument("CURRENT")
# get lines
lines = arcpy.mapping....
Assuming your polygons are stored in a geodatabase and are in a projected coordinate system (PCS), you could set a label expression based on the SHAPE_Area field. That field contains the area of your polygon in whatever unit your PCS uses, for example if you are using UTM with meters as the linear unit, SHAPE_Area will give area in square meters. It's also ...
When writing expressions for field calculator that perform string operations, I find it simpler to use triple-quoted strings. It can be tricky to escape otherwise (or, as you tried, you need to use variable substitution, which is strange).
field1 = "FULLST_NAME"
calc1 = """
You can use SelectByAttributed in ModelBuilder as follows:
IF YOUR SHAPEFILE NOT IN TOC:
add Make Feature Layer and just define the input shapefile, don't define the other parameters.
Add select by attributes and define your size
Result of selected attributed:
It works perfectly, the result:
Also, if you want to get a shapefile with your selected ...
If you use the Table to Table tool, you can see how the fields are being imported in the Field Map parameter and change them accordingly by right clicking and changing properties. Probably not the most efficient way, but it should work.
Alternatively, you could read the table into excel and play with the field types there first (link)