Tag Info

Hot answers tagged

5

Assuming you have a reference to the feature class pFC: ERSI.ArcGIS.Geometry.ISpatialReference pSP = ((ESRI.ArcGIS.GeoDatabase.IGeoDataset)pFC).SpatialReference; coord=pSP.FactoryCode coord now contains the code for the coordinate system. Note that not all projected coordinate systems are defined in esriSRProjCSType, there are more constants ...


3

It's used to eliminate any whitespace you may have around your layout in the output file. For example, I have some MXDs set up to print on a specific paper size with specific margins, so that the maps I print can be 3-hole punched or bound without the holes affecting the map window. But sometimes I don't care about that and just want everything to fill the ...


2

Here's how you can get Shape.area to display acres if it's in another unit. In ArcMap, go to the layer properties and the Fields tab. Under "Appearance", click "Number Format". Click the little button with the ellipses that is now displayed. Or right-click a field name in the table view, go to Properties, and click the little ellipses button next to ...


1

Not sure by your question if you want the map spatial reference or a layer. For a map you may use the IMap.SpatialReference Property.


1

In the absence of a python parser your only real option is: replace(ltrim(replace( [field] ,"0"," "))," ","0") This assumes that you don't have any spaces inside your text, if you do then you need another two replaces: replace(replace(ltrim(replace(replace( [SourceFC] ," ","~"),"0"," "))," ","0"),"~"," ") Again, assuming that you have no ~ characters ...


1

I'm assuming that you are using ArcGIS 10.1 for Desktop or later, but this may also work with 10.0. Open up the Properties of your layer to the Labels tab. Make sure Label features in this layer is ticked on Change the Parser to Python. In the Expression area, if your field is called Name and your data is stored in a file geodatabase feature class, type: ...


1

Try this: CadastreOut = "C:\\" arcpy.MakeFeatureLayer_management(Cadastre, "cadastre_lyr") arcpy.MakeFeatureLayer_management(Buffer_5km, "buflayer") field = "SiteName" cursor = arcpy.SearchCursor("buflayer") for row in cursor: geometry = row.getValue("Shape") out = str(row.getValue(field)) ...


1

The where clause is currently evaluating stepos literally as the value stepos, not the variable value 22. Move the stepos variable outside the where clause string, casting the numeric value to a string, like: arcpy.UpdateCursor(stefile, ' "POSITION" = ' + str(stepos))


1

No, or at least not without significant server-side hacking. In a WMTS the zoom levels are fixed before hand, and defined in WMTSCapabilities.xml. Each tile is a unique, pre-rendered resource, matching a pattern of zoomlevel/x/y, with an exact, pre-defined pixel size, usually 256 x 256. In WMS, in contrast, there is neither a pre-defined zoom level, nor a ...


1

You would do something like this: dataset = "c:/data/landbase.gdb/Wetlands" spatial_ref = arcpy.Describe(dataset).spatialReference as per the ESRI help page here


1

I see that the question and answers are quite old, but still will post my answer as it could help someone in the future. I get this error mostly because invalid characters in the paths and file names. Keep your whole path strictly in ASCII without spaces and the filename under 13 characters.


1

While this is an old question, the other answers are not appropriate. Converting Distance (Measured Depth), Dip (Inclination), Azimuth to 3D coordinates depends on how you interpret what is happening between the locations where measurements were taken (survey stations). The standard practice today is "Minimum Curvature" where the assumption is that a ...



Only top voted, non community-wiki answers of a minimum length are eligible